efi: libstub: Drop handling of EFI properties table
authorArd Biesheuvel <ardb@kernel.org>
Tue, 11 Oct 2022 08:25:36 +0000 (10:25 +0200)
committerArd Biesheuvel <ardb@kernel.org>
Wed, 9 Nov 2022 11:42:01 +0000 (12:42 +0100)
The EFI properties table was a short lived experiment that never saw the
light of day on non-x86 (if at all) so let's drop the handling of it.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efi-stub.c

index 0ebfa2d9628a70b03ce5091fd88e8f717d795470..b55d1009d4c880effb2dde16a9932e0155756049 100644 (file)
@@ -126,7 +126,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
        unsigned long reserve_addr = 0;
        unsigned long reserve_size = 0;
        struct screen_info *si;
-       efi_properties_table_t *prop_tbl;
 
        efi_system_table = sys_table_arg;
 
@@ -205,18 +204,6 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle,
 
        efi_random_get_seed();
 
-       /*
-        * If the NX PE data feature is enabled in the properties table, we
-        * should take care not to create a virtual mapping that changes the
-        * relative placement of runtime services code and data regions, as
-        * they may belong to the same PE/COFF executable image in memory.
-        * The easiest way to achieve that is to simply use a 1:1 mapping.
-        */
-       prop_tbl = get_efi_config_table(EFI_PROPERTIES_TABLE_GUID);
-       flat_va_mapping |= prop_tbl &&
-                          (prop_tbl->memory_protection_attribute &
-                          EFI_PROPERTIES_RUNTIME_MEMORY_PROTECTION_NON_EXECUTABLE_PE_DATA);
-
        /* force efi_novamap if SetVirtualAddressMap() is unsupported */
        efi_novamap |= !(get_supported_rt_services() &
                         EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP);