diff options
author | Borislav Petkov <bp@alien8.de> | 2010-08-28 15:58:33 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-10-20 14:23:55 -0700 |
commit | b40827fa7268fda8a62490728a61c2856f33830b (patch) | |
tree | ae16ce8206c3d72ca672a92a46dc0725faba1ced /arch/x86/kernel/reboot.c | |
parent | d25e6b0b326278a1096e8334584c3e64517057a3 (diff) | |
download | talos-obmc-linux-b40827fa7268fda8a62490728a61c2856f33830b.tar.gz talos-obmc-linux-b40827fa7268fda8a62490728a61c2856f33830b.zip |
x86-32, mm: Add an initial page table for core bootstrapping
This patch adds an initial page table with low mappings used exclusively
for booting APs/resuming after ACPI suspend/machine restart. After this,
there's no need to add low mappings to swapper_pg_dir and zap them later
or create own swsusp PGD page solely for ACPI sleep needs - we have
initial_page_table for that.
Signed-off-by: Borislav Petkov <bp@alien8.de>
LKML-Reference: <20101020070526.GA9588@liondog.tnic>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/reboot.c')
-rw-r--r-- | arch/x86/kernel/reboot.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 7a4cf14223ba..f7f53dcd3e0a 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c @@ -371,16 +371,10 @@ void machine_real_restart(const unsigned char *code, int length) CMOS_WRITE(0x00, 0x8f); spin_unlock(&rtc_lock); - /* Remap the kernel at virtual address zero, as well as offset zero - from the kernel segment. This assumes the kernel segment starts at - virtual address PAGE_OFFSET. */ - memcpy(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY, - sizeof(swapper_pg_dir [0]) * KERNEL_PGD_PTRS); - /* - * Use `swapper_pg_dir' as our page directory. + * Switch back to the initial page table. */ - load_cr3(swapper_pg_dir); + load_cr3(initial_page_table); /* Write 0x1234 to absolute memory location 0x472. The BIOS reads this on booting to tell it to "Bypass memory test (also warm |