+9
−18
Loading
Xen doesn't give direct access to the EFI memory map, but provides a hypercall interface for it. efi_mem_desc_lookup() was already adjusted in aca1d27a "efi: xen: Implement memory descriptor lookup based on hypercall" to (optionally) use it. Now make efi_mem_type() and efi_mem_attributes() use common efi_mem_desc_lookup() too. This also reduces code duplication a bit. efi_mem_type() retains separate check for -ENOTSUPP error case (even though no caller seems to rely on this currently). Signed-off-by:Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> [ardb: Drop erroneous 'const' qualifier] Signed-off-by:
Ard Biesheuvel <ardb@kernel.org>