aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/e820.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-01 16:17:38 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-03 07:26:27 -0400
commit2944e16b25e7fb8b5ee0dd9dc7197a0f9e523cfd (patch)
tree0114128fdb9d2f54188a1684758e0217eadae1e5 /arch/x86/kernel/e820.c
parente8c27ac9191ab9e6506ae5cbe70d87ac50f8e960 (diff)
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>
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r--arch/x86/kernel/e820.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 0cd9132c9450..cd2b99e27d43 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -739,3 +739,28 @@ u64 __init find_e820_area_size(u64 start, u64 *sizep, u64 align)
739 return -1UL; 739 return -1UL;
740 740
741} 741}
742
743/*
744 * pre allocated 4k and reserved it in e820
745 */
746u64 __init early_reserve_e820(u64 startt, u64 sizet, u64 align)
747{
748 u64 size = 0;
749 u64 addr;
750 u64 start;
751
752 start = startt;
753 while (size < sizet)
754 start = find_e820_area_size(start, &size, align);
755
756 if (size < sizet)
757 return 0;
758
759 addr = round_down(start + size - sizet, align);
760 update_memory_range(addr, sizet, E820_RAM, E820_RESERVED);
761 printk(KERN_INFO "update e820 for early_reserve_e820\n");
762 update_e820();
763
764 return addr;
765}
766