x86/efi: Drop support for fake EFI memory maps
authorArd Biesheuvel <ardb@kernel.org>
Thu, 20 Jun 2024 07:10:49 +0000 (09:10 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Mon, 1 Jul 2024 22:26:24 +0000 (00:26 +0200)
commit37aee82c213d352dccb850dc4228dda2e7e591b1
tree9d85222c219bb5ccd4ae1e0070de9514e6f7f339
parentf2661062f16b2de5d7b6a5c42a9a5c96326b8454
x86/efi: Drop support for fake EFI memory maps

Between kexec and confidential VM support, handling the EFI memory maps
correctly on x86 is already proving to be rather difficult (as opposed
to other EFI architectures which manage to never modify the EFI memory
map to begin with)

EFI fake memory map support is essentially a development hack (for
testing new support for the 'special purpose' and 'more reliable' EFI
memory attributes) that leaked into production code. The regions marked
in this manner are not actually recognized as such by the firmware
itself or the EFI stub (and never have), and marking memory as 'more
reliable' seems rather futile if the underlying memory is just ordinary
RAM.

Marking memory as 'special purpose' in this way is also dubious, but may
be in use in production code nonetheless. However, the same should be
achievable by using the memmap= command line option with the ! operator.

EFI fake memmap support is not enabled by any of the major distros
(Debian, Fedora, SUSE, Ubuntu) and does not exist on other
architectures, so let's drop support for it.

Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Documentation/admin-guide/kernel-parameters.txt
arch/x86/Kconfig
arch/x86/boot/compressed/kaslr.c
arch/x86/include/asm/efi.h
arch/x86/kernel/setup.c
arch/x86/platform/efi/Makefile
arch/x86/platform/efi/efi.c
arch/x86/platform/efi/fake_mem.c [deleted file]
arch/x86/platform/efi/memmap.c
drivers/firmware/efi/libstub/x86-stub.c