--- linux/arch/i386/kernel/setup.c.original Mon Jul 22 21:44:45 2002 +++ linux/arch/i386/kernel/setup.c Tue Jul 23 03:38:08 2002 @@ -808,21 +808,29 @@ userdef = 1; } else { /* If the user specifies memory size, we - * limit the BIOS-provided memory map to - * that size. exactmap can be used to specify - * the exact map. mem=number can be used to - * trim the existing memory map. + * blow away any automatically generated + * size */ unsigned long long start_at, mem_size; + if (userdef == 0) { + /* first time in: zap the whitelist + * and reinitialize it with the + * standard low-memory region. + */ + e820.nr_map = 0; + userdef = 1; + add_memory_region(0, LOWMEMSIZE(), E820_RAM); + } mem_size = memparse(from+4, &from); - if (*from == '@') { + if (*from == '@') start_at = memparse(from+1, &from); - add_memory_region(start_at, mem_size, E820_RAM); - } else { - limit_regions(mem_size); + else { + start_at = HIGH_MEMORY; + mem_size -= HIGH_MEMORY; userdef=1; } + add_memory_region(start_at, mem_size, E820_RAM); } }