diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2012-10-19 12:46:27 -0400 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2012-12-05 06:26:49 -0500 |
commit | 712c6ff4dba4917a440be601dc312506322bffe8 (patch) | |
tree | 70890fcc3d289c04126fea2474f8a31fd79e3fcc /arch/arm64/kernel/head.S | |
parent | f35a92053b45cf8154db5558ede3ba5245c9dc7e (diff) |
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.S | 4 |
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) | |||
185 | msr hstr_el2, xzr // Disable CP15 traps to EL2 | 185 | msr hstr_el2, xzr // Disable CP15 traps to EL2 |
186 | #endif | 186 | #endif |
187 | 187 | ||
188 | /* Hypervisor stub */ | ||
189 | adr x0, __hyp_stub_vectors | ||
190 | msr vbar_el2, x0 | ||
191 | |||
188 | /* spsr */ | 192 | /* spsr */ |
189 | mov x0, #(PSR_F_BIT | PSR_I_BIT | PSR_A_BIT | PSR_D_BIT |\ | 193 | mov x0, #(PSR_F_BIT | PSR_I_BIT | PSR_A_BIT | PSR_D_BIT |\ |
190 | PSR_MODE_EL1h) | 194 | PSR_MODE_EL1h) |