diff options
| -rw-r--r-- | arch/arm64/kernel/setup.c | 1 | ||||
| -rw-r--r-- | drivers/firmware/efi/efi.c | 4 | ||||
| -rw-r--r-- | drivers/firmware/efi/libstub/arm-stub.c | 3 | ||||
| -rw-r--r-- | include/linux/efi.h | 7 |
4 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c index 953e316521fc..f4fc1e0544b7 100644 --- a/arch/arm64/kernel/setup.c +++ b/arch/arm64/kernel/setup.c | |||
| @@ -313,6 +313,7 @@ void __init setup_arch(char **cmdline_p) | |||
| 313 | arm64_memblock_init(); | 313 | arm64_memblock_init(); |
| 314 | 314 | ||
| 315 | paging_init(); | 315 | paging_init(); |
| 316 | efi_apply_persistent_mem_reservations(); | ||
| 316 | 317 | ||
| 317 | acpi_table_upgrade(); | 318 | acpi_table_upgrade(); |
| 318 | 319 | ||
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 249eb70691b0..72a4da76d274 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c | |||
| @@ -592,7 +592,11 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz, | |||
| 592 | 592 | ||
| 593 | early_memunmap(tbl, sizeof(*tbl)); | 593 | early_memunmap(tbl, sizeof(*tbl)); |
| 594 | } | 594 | } |
| 595 | return 0; | ||
| 596 | } | ||
| 595 | 597 | ||
| 598 | int __init efi_apply_persistent_mem_reservations(void) | ||
| 599 | { | ||
| 596 | if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) { | 600 | if (efi.mem_reserve != EFI_INVALID_TABLE_ADDR) { |
| 597 | unsigned long prsv = efi.mem_reserve; | 601 | unsigned long prsv = efi.mem_reserve; |
| 598 | 602 | ||
diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index 30ac0c975f8a..3d36142cf812 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c | |||
| @@ -75,6 +75,9 @@ void install_memreserve_table(efi_system_table_t *sys_table_arg) | |||
| 75 | efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID; | 75 | efi_guid_t memreserve_table_guid = LINUX_EFI_MEMRESERVE_TABLE_GUID; |
| 76 | efi_status_t status; | 76 | efi_status_t status; |
| 77 | 77 | ||
| 78 | if (IS_ENABLED(CONFIG_ARM)) | ||
| 79 | return; | ||
| 80 | |||
| 78 | status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv), | 81 | status = efi_call_early(allocate_pool, EFI_LOADER_DATA, sizeof(*rsv), |
| 79 | (void **)&rsv); | 82 | (void **)&rsv); |
| 80 | if (status != EFI_SUCCESS) { | 83 | if (status != EFI_SUCCESS) { |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 845174e113ce..100ce4a4aff6 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
| @@ -1167,6 +1167,8 @@ static inline bool efi_enabled(int feature) | |||
| 1167 | extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); | 1167 | extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); |
| 1168 | 1168 | ||
| 1169 | extern bool efi_is_table_address(unsigned long phys_addr); | 1169 | extern bool efi_is_table_address(unsigned long phys_addr); |
| 1170 | |||
| 1171 | extern int efi_apply_persistent_mem_reservations(void); | ||
| 1170 | #else | 1172 | #else |
| 1171 | static inline bool efi_enabled(int feature) | 1173 | static inline bool efi_enabled(int feature) |
| 1172 | { | 1174 | { |
| @@ -1185,6 +1187,11 @@ static inline bool efi_is_table_address(unsigned long phys_addr) | |||
| 1185 | { | 1187 | { |
| 1186 | return false; | 1188 | return false; |
| 1187 | } | 1189 | } |
| 1190 | |||
| 1191 | static inline int efi_apply_persistent_mem_reservations(void) | ||
| 1192 | { | ||
| 1193 | return 0; | ||
| 1194 | } | ||
| 1188 | #endif | 1195 | #endif |
| 1189 | 1196 | ||
| 1190 | extern int efi_status_to_err(efi_status_t status); | 1197 | extern int efi_status_to_err(efi_status_t status); |
