linux/drivers/firmware/efi
Dan Williams 199c847176 x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP
Given that EFI_MEMORY_SP is platform BIOS policy decision for marking
memory ranges as "reserved for a specific purpose" there will inevitably
be scenarios where the BIOS omits the attribute in situations where it
is desired. Unlike other attributes if the OS wants to reserve this
memory from the kernel the reservation needs to happen early in init. So
early, in fact, that it needs to happen before e820__memblock_setup()
which is a pre-requisite for efi_fake_memmap() that wants to allocate
memory for the updated table.

Introduce an x86 specific efi_fake_memmap_early() that can search for
attempts to set EFI_MEMORY_SP via efi_fake_mem and update the e820 table
accordingly.

The KASLR code that scans the command line looking for user-directed
memory reservations also needs to be updated to consider
"efi_fake_mem=nn@ss:0x40000" requests.

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-11-07 15:44:23 +01:00
..
libstub arm/efi: EFI soft reservation to memblock 2019-11-07 15:44:19 +01:00
test efi/efi_test: Lock down /dev/efi_test and require CAP_SYS_ADMIN 2019-10-31 09:40:21 +01:00
apple-properties.c efi: Replace GPL license boilerplate with SPDX headers 2019-02-04 08:27:25 +01:00
arm-init.c arm/efi: EFI soft reservation to memblock 2019-11-07 15:44:19 +01:00
arm-runtime.c arm/efi: EFI soft reservation to memblock 2019-11-07 15:44:19 +01:00
capsule-loader.c efi: Replace GPL license boilerplate with SPDX headers 2019-02-04 08:27:25 +01:00
capsule.c efi: Replace GPL license boilerplate with SPDX headers 2019-02-04 08:27:25 +01:00
cper-arm.c efi: Replace GPL license boilerplate with SPDX headers 2019-02-04 08:27:25 +01:00
cper-x86.c efi: Decode IA32/X64 Context Info structure 2018-05-14 08:57:48 +02:00
cper.c efi/cper: Fix endianness of PCIe class code 2019-10-07 15:24:35 +02:00
dev-path-parser.c bus_find_device: Unify the match callback with class_find_device 2019-06-24 05:22:31 +02:00
earlycon.c efi/x86: Convert x86 EFI earlyprintk into generic earlycon implementation 2019-02-04 08:27:30 +01:00
efi-bgrt.c efi/bgrt: Drop BGRT status field reserved bits check 2019-06-11 16:13:05 +02:00
efi-pstore.c efi: Replace GPL license boilerplate with SPDX headers 2019-02-04 08:27:25 +01:00
efi.c efi: Common enable/disable infrastructure for EFI soft reservation 2019-11-07 15:44:08 +01:00
efibc.c efibc: Replace variable set function in notifier call 2019-06-22 10:24:57 +02:00
efivars.c efi: Replace GPL license boilerplate with SPDX headers 2019-02-04 08:27:25 +01:00
esrt.c x86/efi: Push EFI_MEMMAP check into leaf routines 2019-11-07 15:44:04 +01:00
fake_mem.c x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP 2019-11-07 15:44:23 +01:00
fake_mem.h x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP 2019-11-07 15:44:23 +01:00
Kconfig efi: Common enable/disable infrastructure for EFI soft reservation 2019-11-07 15:44:08 +01:00
Makefile x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP 2019-11-07 15:44:23 +01:00
memattr.c efi: Replace GPL license boilerplate with SPDX headers 2019-02-04 08:27:25 +01:00
memmap.c efi/arm: Revert deferred unmap of early memmap mapping 2018-11-15 10:04:46 +01:00
rci2-table.c efi: Make unexported efi_rci2_sysfs_init() static 2019-10-07 15:24:36 +02:00
reboot.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
runtime-map.c efi: Replace GPL license boilerplate with SPDX headers 2019-02-04 08:27:25 +01:00
runtime-wrappers.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 428 2019-06-05 17:37:16 +02:00
tpm.c efi/tpm: Return -EINVAL when determining tpm final events log size fails 2019-10-31 09:40:17 +01:00
vars.c efi: Replace GPL license boilerplate with SPDX headers 2019-02-04 08:27:25 +01:00
x86_fake_mem.c x86/efi: Add efi_fake_mem support for EFI_MEMORY_SP 2019-11-07 15:44:23 +01:00