diff options
author | Daniel Kiper <[email protected]> | 2017-06-22 12:51:36 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2017-06-23 11:11:02 +0200 |
commit | 457ea3f7e97881f937136ce0ba1f29f82b9abdb0 (patch) | |
tree | 0d5e14635e148ff402d0f53a0c99bc4e25095c6c | |
parent | bb817bef3b1989a9cdb40362cfb8d2aa224ac1bc (diff) |
efi: Process the MEMATTR table only if EFI_MEMMAP is enabled
Otherwise e.g. Xen dom0 on x86_64 EFI platforms crashes.
In theory we can check EFI_PARAVIRT too, however,
EFI_MEMMAP looks more targeted and covers more cases.
Signed-off-by: Daniel Kiper <[email protected]>
Reviewed-by: Ard Biesheuvel <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | drivers/firmware/efi/efi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index b372aad3b449..045d6d311bde 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -528,7 +528,8 @@ int __init efi_config_parse_tables(void *config_tables, int count, int sz, } } - efi_memattr_init(); + if (efi_enabled(EFI_MEMMAP)) + efi_memattr_init(); /* Parse the EFI Properties table if it exists */ if (efi.properties_table != EFI_INVALID_TABLE_ADDR) { |