diff options
author | H. Peter Anvin | 2013-02-27 21:46:40 +0100 |
---|---|---|
committer | H. Peter Anvin | 2013-02-27 22:38:57 +0100 |
commit | 7c10093692ed2e6f318387d96b829320aa0ca64c (patch) | |
tree | f314c7fcd202c7c6e70fff730667f7f09c6f4a0e /arch/x86/include | |
parent | x86, efi: Mark disable_runtime as __initdata (diff) | |
download | kernel-qcow2-linux-7c10093692ed2e6f318387d96b829320aa0ca64c.tar.gz kernel-qcow2-linux-7c10093692ed2e6f318387d96b829320aa0ca64c.tar.xz kernel-qcow2-linux-7c10093692ed2e6f318387d96b829320aa0ca64c.zip |
x86: Make sure we can boot in the case the BDA contains pure garbage
On non-BIOS platforms it is possible that the BIOS data area contains
garbage instead of being zeroed or something equivalent (firmware
people: we are talking of 1.5K here, so please do the sane thing.)
We need on the order of 20-30K of low memory in order to boot, which
may grow up to < 64K in the future. We probably want to avoid the
lowest of the low memory. At the same time, it seems extremely
unlikely that a legitimate EBDA would ever reach down to the 128K
(which would require it to be over half a megabyte in size.) Thus,
pick 128K as the cutoff for "this is insane, ignore." We may still
end up reserving a bunch of extra memory on the low megabyte, but that
is not really a major issue these days. In the worst case we lose
512K of RAM.
This code really should be merged with trim_bios_range() in
arch/x86/kernel/setup.c, but that is a bigger patch for a later merge
window.
Reported-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Matt Fleming <matt.fleming@intel.com>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/n/tip-oebml055yyfm8yxmria09rja@git.kernel.org
Diffstat (limited to 'arch/x86/include')
0 files changed, 0 insertions, 0 deletions