x86: update mptable

make mptable to be consistent with acpi routing, so we could:

1. kexec kernel with acpi=off
2. work around BIOSes where acpi routing is working, but mptable is
   not right, so can use kernel/kexec to start other OSes that don't have
   good acpi support.

command line: update_mptable

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Yinghai Lu
2008-06-01 13:17:38 -07:00
committed by Ingo Molnar
parent e8c27ac919
commit 2944e16b25
7 changed files with 445 additions and 17 deletions

View File

@@ -739,3 +739,28 @@ u64 __init find_e820_area_size(u64 start, u64 *sizep, u64 align)
return -1UL;
}
/*
* pre allocated 4k and reserved it in e820
*/
u64 __init early_reserve_e820(u64 startt, u64 sizet, u64 align)
{
u64 size = 0;
u64 addr;
u64 start;
start = startt;
while (size < sizet)
start = find_e820_area_size(start, &size, align);
if (size < sizet)
return 0;
addr = round_down(start + size - sizet, align);
update_memory_range(addr, sizet, E820_RAM, E820_RESERVED);
printk(KERN_INFO "update e820 for early_reserve_e820\n");
update_e820();
return addr;
}