]> git.baikalelectronics.ru Git - kernel.git/commit
x86, efi: 1:1 pagetable mapping for virtual EFI calls
authorMatt Fleming <matt.fleming@intel.com>
Fri, 7 Sep 2012 17:28:04 +0000 (18:28 +0100)
committerMatt Fleming <matt.fleming@intel.com>
Tue, 30 Oct 2012 10:39:19 +0000 (10:39 +0000)
commitf06b08fd6acd93de944890daba42c4de7d3ef5c7
treeecb81fad559d790db1a0d390a8fa6e209662c315
parent0dbf99f043c3acc8ef4221b7f34b445aca051ab9
x86, efi: 1:1 pagetable mapping for virtual EFI calls

Some firmware still needs a 1:1 (virt->phys) mapping even after we've
called SetVirtualAddressMap(). So install the mapping alongside our
existing kernel mapping whenever we make EFI calls in virtual mode.

This bug was discovered on ASUS machines where the firmware
implementation of GetTime() accesses the RTC device via physical
addresses, even though that's bogus per the UEFI spec since we've
informed the firmware via SetVirtualAddressMap() that the boottime
memory map is no longer valid.

This bug seems to be present in a lot of consumer devices, so there's
not a lot we can do about this spec violation apart from workaround
it.

Cc: JérômeCarretero <cJ-ko@zougloub.eu>
Cc: Vasco Dias <rafa.vasco@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
arch/x86/include/asm/efi.h
arch/x86/platform/efi/efi_64.c