Skip to content

Commit

Permalink
arch/x86: Do not access EFI memory map if it is not available
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Kiper authored and Matt Fleming committed Jul 18, 2014
1 parent abc93f8 commit 67a9b9c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/platform/efi/efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) &&
Expand Down

0 comments on commit 67a9b9c

Please sign in to comment.