x86, efi: Pass a minimal map to SetVirtualAddressMap()
authorMatthew Garrett <mjg@redhat.com>
Thu, 5 May 2011 19:19:45 +0000 (15:19 -0400)
committerH. Peter Anvin <hpa@linux.intel.com>
Mon, 9 May 2011 19:14:39 +0000 (12:14 -0700)
commit7cb00b72876ea2451eb79d468da0e8fb9134aa8a
tree403d22d33c4e050d6d30749e7a7be9a1393368a6
parent202f9d0a41809e3424af5f61489b48b622824aed
x86, efi: Pass a minimal map to SetVirtualAddressMap()

Experimentation with various EFI implementations has shown that functions
outside runtime services will still update their pointers if
SetVirtualAddressMap() is called with memory descriptors outside the
runtime area. This is obviously insane, and therefore is unsurprising.
Evidence from instrumenting another EFI implementation suggests that it
only passes the set of descriptors covering runtime regions, so let's
avoid any problems by doing the same. Runtime descriptors are copied to
a separate memory map, and only that map is passed back to the firmware.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Link: http://lkml.kernel.org/r/1304623186-18261-4-git-send-email-mjg@redhat.com
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
arch/x86/platform/efi/efi.c