mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 14:02:37 -04:00
arch/x86: Do not access EFI memory map if it is not available
Do not access EFI memory map if it is not available. At least Xen dom0 EFI implementation does not have an access to it. Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
This commit is contained in:
committed by
Matt Fleming
parent
abc93f8eb6
commit
67a9b9c53c
@@ -946,6 +946,9 @@ u64 efi_mem_attributes(unsigned long phys_addr)
|
||||
efi_memory_desc_t *md;
|
||||
void *p;
|
||||
|
||||
if (!efi_enabled(EFI_MEMMAP))
|
||||
return 0;
|
||||
|
||||
for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) {
|
||||
md = p;
|
||||
if ((md->phys_addr <= phys_addr) &&
|
||||
|
||||
Reference in New Issue
Block a user