mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 21:47:04 +07:00
199c847176
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>
40 lines
1.4 KiB
Makefile
40 lines
1.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for linux kernel
|
|
#
|
|
|
|
#
|
|
# ARM64 maps efi runtime services in userspace addresses
|
|
# which don't have KASAN shadow. So dereference of these addresses
|
|
# in efi_call_virt() will cause crash if this code instrumented.
|
|
#
|
|
KASAN_SANITIZE_runtime-wrappers.o := n
|
|
|
|
obj-$(CONFIG_ACPI_BGRT) += efi-bgrt.o
|
|
obj-$(CONFIG_EFI) += efi.o vars.o reboot.o memattr.o tpm.o
|
|
obj-$(CONFIG_EFI) += capsule.o memmap.o
|
|
obj-$(CONFIG_EFI_VARS) += efivars.o
|
|
obj-$(CONFIG_EFI_ESRT) += esrt.o
|
|
obj-$(CONFIG_EFI_VARS_PSTORE) += efi-pstore.o
|
|
obj-$(CONFIG_UEFI_CPER) += cper.o
|
|
obj-$(CONFIG_EFI_RUNTIME_MAP) += runtime-map.o
|
|
obj-$(CONFIG_EFI_RUNTIME_WRAPPERS) += runtime-wrappers.o
|
|
obj-$(CONFIG_EFI_STUB) += libstub/
|
|
obj-$(CONFIG_EFI_FAKE_MEMMAP) += fake_map.o
|
|
obj-$(CONFIG_EFI_BOOTLOADER_CONTROL) += efibc.o
|
|
obj-$(CONFIG_EFI_TEST) += test/
|
|
obj-$(CONFIG_EFI_DEV_PATH_PARSER) += dev-path-parser.o
|
|
obj-$(CONFIG_APPLE_PROPERTIES) += apple-properties.o
|
|
obj-$(CONFIG_EFI_RCI2_TABLE) += rci2-table.o
|
|
|
|
fake_map-y += fake_mem.o
|
|
fake_map-$(CONFIG_X86) += x86_fake_mem.o
|
|
|
|
arm-obj-$(CONFIG_EFI) := arm-init.o arm-runtime.o
|
|
obj-$(CONFIG_ARM) += $(arm-obj-y)
|
|
obj-$(CONFIG_ARM64) += $(arm-obj-y)
|
|
obj-$(CONFIG_EFI_CAPSULE_LOADER) += capsule-loader.o
|
|
obj-$(CONFIG_EFI_EARLYCON) += earlycon.o
|
|
obj-$(CONFIG_UEFI_CPER_ARM) += cper-arm.o
|
|
obj-$(CONFIG_UEFI_CPER_X86) += cper-x86.o
|