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
539539 unsigned long runtime; /* runtime table */
540540 unsigned long config_table; /* config tables */
541541 unsigned long esrt; /* ESRT table */
542− unsigned long mem_attr_table; /* memory attributes table */
543542 unsigned long tpm_log; /* TPM2 Event Log table */
544543 unsigned long tpm_final_log; /* TPM2 Final Events Log table */
545544 unsigned long mem_reserve; /* Linux EFI memreserve table */
@@ -641,6 +640,8 @@ extern void __init efi_fake_memmap(void); · 95 unmodified lines
641640 static inline void efi_fake_memmap(void) { }
642641 #endif
643642
643+extern unsigned long efi_mem_attr_table;
644+
644645 /*
645646 * efi_memattr_perm_setter - arch specific callback function passed into
646647 * efi_memattr_apply_permissions() that updates the