]> git.baikalelectronics.ru Git - kernel.git/commit
x86: zap invalid and unused pmds in early boot
authorThomas Gleixner <tglx@linutronix.de>
Fri, 15 Feb 2008 16:29:12 +0000 (17:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 18 Feb 2008 19:54:14 +0000 (20:54 +0100)
commit7c3a1b8fafb8514a05af8a30a779314fd5c8b1dd
treeaf65f4c77b88f5d907aa54ff1e67b1bdf1488d67
parente499f73e43ee9112ac8aec7c23a8e41132c71145
x86: zap invalid and unused pmds in early boot

The early boot code maps KERNEL_TEXT_SIZE (currently 40MB) starting
from __START_KERNEL_map. The kernel itself only needs _text to _end
mapped in the high alias. On relocatible kernels the ASM setup code
adjusts the compile time created high mappings to the relocation. This
creates invalid pmd entries for negative offsets:

0xffffffff80000000 -> pmd entry: ffffffffff2001e3
It points outside of the physical address space and is marked present.

This starts at the virtual address __START_KERNEL_map and goes up to
the point where the first valid physical address (0x0) is mapped.

Zap the mappings before _text and after _end right away in early
boot. This removes also the invalid entries.

Furthermore it simplifies the range check for high aliases.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/head64.c
arch/x86/kernel/head_64.S
arch/x86/mm/init_64.c
include/asm-x86/pgtable_64.h