summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2017-11-16 16:51:49 +0000
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2017-11-17 09:56:50 +0000
commit12c6484058a8c5a8751c51eb24e9bb95497649c6 (patch)
treee5c011acccfa0cf4164f17dd3c30d1c970d68e09 /OvmfPkg
parent77af86688c2a117f3addd44b8434c92744ac180e (diff)
downloadedk2-12c6484058a8c5a8751c51eb24e9bb95497649c6.tar.gz
edk2-12c6484058a8c5a8751c51eb24e9bb95497649c6.tar.bz2
edk2-12c6484058a8c5a8751c51eb24e9bb95497649c6.zip
OvmfPkg/XenHypercallLib: enable virt extensions for ARM
XenHypercallLib uses the 'hvc' instruction, which is not implemented on all ARMv7 CPUs, and so we need to explicitly specify a CPU that has the virtualization extensions. This override used to be set at the platform level, but this was removed in commit 0d36a219c7bdbb27d775b50837823b2a9928147c ('ArmPlatformPkg/PL031RealTimeClockLib: drop ArmPlatformSysConfigLib reference), under the assumption that all users of the 'hvc' instruction had already been fixed. So fix this for GNU binutils by adding the 'virt' arch extension directive, and for RVCT by setting the --cpu command line option to a CPU that is virt capable. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S2
-rw-r--r--OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf3
2 files changed, 5 insertions, 0 deletions
diff --git a/OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S b/OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S
index c12c8658b7..0adf65840a 100644
--- a/OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S
+++ b/OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S
@@ -16,6 +16,8 @@
#include <IndustryStandard/Xen/arch-arm/xen.h>
.text
+ .arch_extension virt
+
GCC_ASM_EXPORT(XenHypercall2)
ASM_PFX(XenHypercall2):
diff --git a/OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf b/OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
index f4503a4b01..d268e540fe 100644
--- a/OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
+++ b/OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf
@@ -64,3 +64,6 @@
[Guids.IA32, Guids.X64]
gEfiXenInfoGuid
+
+[BuildOptions.ARM]
+ RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15