diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2010-12-16 18:39:02 +0100 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-12-17 19:01:30 +0100 |
commit | a2c606d53ab71dee6410f10ef0adf67321d60e06 (patch) | |
tree | 7a4cf519cbfc01fd1c4273c1481f40f4cd7d00bc /arch/x86/kernel | |
parent | x86: avoid E820 regions when allocating address space (diff) | |
download | linux-a2c606d53ab71dee6410f10ef0adf67321d60e06.tar.xz linux-a2c606d53ab71dee6410f10ef0adf67321d60e06.zip |
x86: avoid high BIOS area when allocating address space
This prevents allocation of the last 2MB before 4GB.
The experiment described here shows Windows 7 ignoring the last 1MB:
https://bugzilla.kernel.org/show_bug.cgi?id=23542#c27
This patch ignores the top 2MB instead of just 1MB because H. Peter Anvin
says "There will be ROM at the top of the 32-bit address space; it's a fact
of the architecture, and on at least older systems it was common to have a
shadow 1 MiB below."
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/resource.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c index 89638af2ff19..2a26819bb6a8 100644 --- a/arch/x86/kernel/resource.c +++ b/arch/x86/kernel/resource.c @@ -37,10 +37,11 @@ static void remove_e820_regions(struct resource *avail) void arch_remove_reservations(struct resource *avail) { - /* Trim out BIOS area (low 1MB) and E820 regions */ + /* Trim out BIOS areas (low 1MB and high 2MB) and E820 regions */ if (avail->flags & IORESOURCE_MEM) { if (avail->start < BIOS_END) avail->start = BIOS_END; + resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END); remove_e820_regions(avail); } |