summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kernel/head.S
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2012-10-19 17:46:27 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2012-12-05 11:26:49 +0000
commit712c6ff4dba4917a440be601dc312506322bffe8 (patch)
tree70890fcc3d289c04126fea2474f8a31fd79e3fcc /arch/arm64/kernel/head.S
parentf35a92053b45cf8154db5558ede3ba5245c9dc7e (diff)
downloadlinux-712c6ff4dba4917a440be601dc312506322bffe8.tar.gz
linux-712c6ff4dba4917a440be601dc312506322bffe8.tar.bz2
linux-712c6ff4dba4917a440be601dc312506322bffe8.zip
arm64: add hypervisor stub
If booted in EL2, install an dummy hypervisor whose only purpose is to be replaced by a full fledged one. A minimal API allows to: - obtain the current HYP vectors (__hyp_get_vectors) - set new HYP vectors (__hyp_set_vectors) Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel/head.S')
-rw-r--r--arch/arm64/kernel/head.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index bc6d991f8c59..5792749e34c4 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -185,6 +185,10 @@ ENTRY(el2_setup)
msr hstr_el2, xzr // Disable CP15 traps to EL2
#endif
+ /* Hypervisor stub */
+ adr x0, __hyp_stub_vectors
+ msr vbar_el2, x0
+
/* spsr */
mov x0, #(PSR_F_BIT | PSR_I_BIT | PSR_A_BIT | PSR_D_BIT |\
PSR_MODE_EL1h)