1 /* Hook for machine specific memory setup.
3 * This is included late in kernel/setup.c so that it can make use of all of
4 * the static functions. */
6 static char * __init
machine_specific_memory_setup(void)
12 if(voyager_level
== 5) {
19 for(i
=0; voyager_memory_detect(i
, &addr
, &length
); i
++) {
20 add_memory_region(addr
, length
, E820_RAM
);
23 } else if(voyager_level
== 4) {
25 __u16 catbase
= inb(VOYAGER_SSPB_RELOCATION_PORT
)<<8;
26 /* select the DINO config space */
27 outb(VOYAGER_DINO
, VOYAGER_CAT_CONFIG_PORT
);
28 /* Read DINO top of memory register */
29 tom
= ((inb(catbase
+ 0x4) & 0xf0) << 16)
30 + ((inb(catbase
+ 0x5) & 0x7f) << 24);
32 if(inb(catbase
) != VOYAGER_DINO
) {
33 printk(KERN_ERR
"Voyager: Failed to get DINO for L4, setting tom to EXT_MEM_K\n");
34 tom
= (EXT_MEM_K
)<<10;
37 add_memory_region(0, 0x9f000, E820_RAM
);
38 /* map from 1M to top of memory */
39 add_memory_region(1*1024*1024, tom
- 1*1024*1024, E820_RAM
);
40 /* FIXME: Should check the ASICs to see if I need to
41 * take out the 8M window. Just do it at the moment
43 add_memory_region(8*1024*1024, 8*1024*1024, E820_RESERVED
);
50 * Try to copy the BIOS-supplied E820-map.
52 * Otherwise fake a memory map; one section from 0k->640k,
53 * the next section from 1mb->appropriate_mem_k
55 sanitize_e820_map(E820_MAP
, &E820_MAP_NR
);
56 if (copy_e820_map(E820_MAP
, E820_MAP_NR
) < 0) {
57 unsigned long mem_size
;
59 /* compare results from other methods and take the greater */
60 if (ALT_MEM_K
< EXT_MEM_K
) {
69 add_memory_region(0, LOWMEMSIZE(), E820_RAM
);
70 add_memory_region(HIGH_MEMORY
, mem_size
<< 10, E820_RAM
);