aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorLaura Abbott <lauraa@codeaurora.org>2014-11-21 16:50:39 -0500
committerWill Deacon <will.deacon@arm.com>2014-11-25 10:56:44 -0500
commitac2dec5f6c27a581f8571da605d9ba04df18330d (patch)
tree82360a06c38a70370d48a777520c5ea4245064bf /arch/arm64
parentfcff588633e848aa728a4437ef96d437299ba03d (diff)
arm64: Switch to adrp for loading the stub vectors
The hyp stub vectors are currently loaded using adr. This instruction has a +/- 1MB range for the loading address. If the alignment for sections is changed the address may be more than 1MB away, resulting in reclocation errors. Switch to using adrp for getting the address to ensure we aren't affected by the location of the __hyp_stub_vectors. Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Tested-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Kees Cook <keescook@chromium.org> Signed-off-by: Laura Abbott <lauraa@codeaurora.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/kernel/head.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 5a76e3ab788c..fddda8565a52 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -341,7 +341,8 @@ CPU_LE( movk x0, #0x30d0, lsl #16 ) // Clear EE and E0E on LE systems
341 msr vttbr_el2, xzr 341 msr vttbr_el2, xzr
342 342
343 /* Hypervisor stub */ 343 /* Hypervisor stub */
344 adr x0, __hyp_stub_vectors 344 adrp x0, __hyp_stub_vectors
345 add x0, x0, #:lo12:__hyp_stub_vectors
345 msr vbar_el2, x0 346 msr vbar_el2, x0
346 347
347 /* spsr */ 348 /* spsr */