summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/libstub/Makefile
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-02-10 19:29:36 +0100
committerArd Biesheuvel <ardb@kernel.org>2020-02-22 23:37:37 +0100
commitb92165d2ba869a9d0b43d00a5676c4b341194c88 (patch)
tree141967686b12a5d5a9a1998ab55841380db661a7 /drivers/firmware/efi/libstub/Makefile
parent55087c5713dcf1c6279d223e380cc79f8f9b4f23 (diff)
downloadlinux-b92165d2ba869a9d0b43d00a5676c4b341194c88.tar.bz2
efi/libstub/arm64: Use 1:1 mapping of RT services if property table exists
The UEFI spec defines (and deprecates) a misguided and shortlived memory protection feature that is based on splitting memory regions covering PE/COFF executables into separate code and data regions, without annotating them as belonging to the same executable image. When the OS assigns the virtual addresses of these regions, it may move them around arbitrarily, without taking into account that the PE/COFF code sections may contain relative references into the data sections, which means the relative placement of these segments has to be preserved or the executable image will be corrupted. The original workaround on arm64 was to ensure that adjacent regions of the same type were mapped adjacently in the virtual mapping, but this requires sorting of the memory map, which we would prefer to avoid. Considering that the native physical mapping of the PE/COFF images does not suffer from this issue, let's preserve it at runtime, and install it as the virtual mapping as well. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/Makefile')
-rw-r--r--drivers/firmware/efi/libstub/Makefile1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
index 98a81576213d..f14b7636323a 100644
--- a/drivers/firmware/efi/libstub/Makefile
+++ b/drivers/firmware/efi/libstub/Makefile
@@ -43,7 +43,6 @@ lib-y := efi-stub-helper.o gop.o secureboot.o tpm.o \
# include the stub's generic dependencies from lib/ when building for ARM/arm64
arm-deps-y := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c fdt_empty_tree.c fdt_sw.c
-arm-deps-$(CONFIG_ARM64) += sort.c
$(obj)/lib-%.o: $(srctree)/lib/%.c FORCE
$(call if_changed_rule,cc_o_c)