Re: [RFC] [PATCH] Allow empty e820 map if EFI map will be providedlater.

From: H. Peter Anvin
Date: Wed Jun 02 2010 - 12:15:19 EST


No! Bloody **** hell no!

This is yet another attempt at doing more of the wrong thing, which not only will make it harder to push things that should be earlier in the kernel there.

This was settled in 2007 -- it is the boot loaders duty to provide a memory map. The fact that we allowed a hack in to let the kernel itself add additional ranges from EFI has proven to be an utter mistake, and this is yet another example of it.

Vetoed in the extreme.

-hpa



On 06/02/2010 05:16 PM, Bill Richardson wrote:
If you are booting an x86-based system from an EFI BIOS that does not
provide any e820-style memory maps, setup_arch() calls functions that expect
to find the e820 maps long before it calls functions to find the EFI maps.
The default behavior in arch/x86/kernel/e820.c is that if no e820 map
exists, default_machine_specific_memory_setup() adds two default regions
just in case. Later, when you get around to using the EFI maps, these
default regions interfere with the real memory map.

This patch provides a config option that allows the lack of e820 maps to be
ignored, under the assumption that you know what you're doing and will
provide a valid EFI memory map to use.

The reason this problem has not arisen before now is that under most
circumstances either the EFI BIOS' Compatibility Support Module provides an
e820-style memory map in the first place, or the EFI-aware bootloader
(grub2, elilo) translates the EFI map to the e280 format before booting the
kernel.

I'm trying to reduce the boot time and BIOS footprint, so I'm booting
without either of those pre-boot map translations. This patch allows that to
happen.

Signed-off-by: Bill Richardson<wfrichar@xxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/