[PATCH] Remove non e820 fallbacks in high level code

Drop support for non e820 BIOS calls to get the memory map.

The boot assembler code still has some support, but not the C code now.

Signed-off-by: Andi Kleen <ak@suse.de>
This commit is contained in:
Andi Kleen 2006-09-26 10:52:37 +02:00 committed by Andi Kleen
parent b3698c03eb
commit 8380aabb99
2 changed files with 9 additions and 23 deletions

View file

@ -536,10 +536,14 @@ static int __init copy_e820_map(struct e820entry * biosmap, int nr_map)
return 0; return 0;
} }
void early_panic(char *msg)
{
early_printk(msg);
panic(msg);
}
void __init setup_memory_region(void) void __init setup_memory_region(void)
{ {
char *who = "BIOS-e820";
/* /*
* Try to copy the BIOS-supplied E820-map. * Try to copy the BIOS-supplied E820-map.
* *
@ -547,24 +551,10 @@ void __init setup_memory_region(void)
* the next section from 1mb->appropriate_mem_k * the next section from 1mb->appropriate_mem_k
*/ */
sanitize_e820_map(E820_MAP, &E820_MAP_NR); sanitize_e820_map(E820_MAP, &E820_MAP_NR);
if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0)
unsigned long mem_size; early_panic("Cannot find a valid memory map");
/* compare results from other methods and take the greater */
if (ALT_MEM_K < EXT_MEM_K) {
mem_size = EXT_MEM_K;
who = "BIOS-88";
} else {
mem_size = ALT_MEM_K;
who = "BIOS-e801";
}
e820.nr_map = 0;
add_memory_region(0, LOWMEMSIZE(), E820_RAM);
add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM);
}
printk(KERN_INFO "BIOS-provided physical RAM map:\n"); printk(KERN_INFO "BIOS-provided physical RAM map:\n");
e820_print_map(who); e820_print_map("BIOS-e820");
} }
static int __init parse_memopt(char *p) static int __init parse_memopt(char *p)

View file

@ -22,10 +22,6 @@
#define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */ #define E820_ACPI 3 /* usable as RAM once ACPI tables have been read */
#define E820_NVS 4 #define E820_NVS 4
#define HIGH_MEMORY (1024*1024)
#define LOWMEMSIZE() (0x9f000)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
struct e820entry { struct e820entry {
u64 addr; /* start of memory segment */ u64 addr; /* start of memory segment */