History

efi: Move mem_attr_table out of struct efi

The memory attributes table is only used at init time by the core EFI code, so there is no need to carry its address in struct efi that is shared with the world. So move it out, and make it __ro_after_init as well, considering that the value is set during early boot.

Ard Biesheuvel committed 6 years ago

Commit a17e8091 parent 5d288db4 files · +11 −10Browse files

Showing the changes to include/linux (1 of 4 files). Show all

Unified · Split

include/linux/efi.h+2−1
@@ -539,7 +539,6 @@ extern struct efi { · 538 unmodified lines
539 unsigned long runtime; /* runtime table */539 unsigned long runtime; /* runtime table */
540 unsigned long config_table; /* config tables */540 unsigned long config_table; /* config tables */
541 unsigned long esrt; /* ESRT table */541 unsigned long esrt; /* ESRT table */
542 unsigned long mem_attr_table; /* memory attributes table */
543 unsigned long tpm_log; /* TPM2 Event Log table */542 unsigned long tpm_log; /* TPM2 Event Log table */
544 unsigned long tpm_final_log; /* TPM2 Final Events Log table */543 unsigned long tpm_final_log; /* TPM2 Final Events Log table */
545 unsigned long mem_reserve; /* Linux EFI memreserve table */544 unsigned long mem_reserve; /* Linux EFI memreserve table */
@@ -641,6 +640,8 @@ extern void __init efi_fake_memmap(void); · 95 unmodified lines
641static inline void efi_fake_memmap(void) { }640static inline void efi_fake_memmap(void) { }
642#endif641#endif
643 642
643extern unsigned long efi_mem_attr_table;
644
644/*645/*
645 * efi_memattr_perm_setter - arch specific callback function passed into646 * efi_memattr_perm_setter - arch specific callback function passed into
646 * efi_memattr_apply_permissions() that updates the647 * efi_memattr_apply_permissions() that updates the