1 /*
2  * init.c: PROM library initialisation code.
3  *
4  * Copyright (C) 1998 Gleb Raiko & Vladimir Roganov
5  */
6 
7 #include <linux/mm.h>
8 #include <asm/bootinfo.h>
9 #include <asm/addrspace.h>
10 #include <asm/hp-lj/asic.h>
11 #include <linux/bootmem.h>
12 
13 #include "utils.h"
14 
15 
16 #define Delimiter "CMDLINE="
17 const char CommandLine[] = Delimiter
18   "root=/dev/hda3                                                                                                                                                                                                                                            ";
19 
20 char arcs_cmdline[CL_SIZE];
21 
prom_init(int argc,char ** argv,char ** envp)22 int __init prom_init(int argc, char ** argv, char **envp)
23 {
24 	ulong mem_size = get_mem_avail();
25         int reserve_size = 0;
26 
27 	printk("Total Memory: %ld bytes\n", mem_size);
28 
29 	reserve_buffer(CommandLine, mem_size);
30 
31 	reserve_size = get_reserved_buffer_size();
32 	mem_size -= reserve_size;
33 
34 	add_memory_region(0x0,mem_size, BOOT_MEM_RAM);
35         add_memory_region(mem_size,reserve_size, BOOT_MEM_RESERVED);
36 
37 	printk("Main Memory: %ld bytes\n", mem_size);
38 	printk("Reserved Memory: %ld bytes at 0x%08x\n",
39 		get_reserved_buffer_size(), (ulong)get_reserved_buffer());
40 
41 	printk("Detected %s ASIC\n", GetAsicName());
42 	mips_machgroup  = MACH_GROUP_HP_LJ;
43 	mips_machtype   = MACH_UNKNOWN;
44 
45 	strcpy(arcs_cmdline, CommandLine+strlen(Delimiter));
46 
47 	return 0;
48 }
49 
50 
prom_free_prom_memory(void)51 void prom_free_prom_memory (void)
52 {
53 }
54