Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec72f385 authored by Laura Abbott's avatar Laura Abbott Committed by Rohit Vaswani
Browse files

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.

Change-Id: I7202cb2b0eb3c73c9ed08835a4bf0e23e075ba0d
Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Tested-by: default avatarMark Rutland <mark.rutland@arm.com>
Tested-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


git-commit: ac2dec5f6c27a581f8571da605d9ba04df18330d
[rvaswani@codeaurora.org: Resolve merge conflicts]
Signed-off-by: default avatarRohit Vaswani <rvaswani@codeaurora.org>
parent 00b06fb3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -538,7 +538,8 @@ CPU_LE( movk x0, #0x30d0, lsl #16 ) // Clear EE and E0E on LE systems
	msr	vttbr_el2, xzr

	/* Hypervisor stub */
	adr	x0, __hyp_stub_vectors
	adrp	x0, __hyp_stub_vectors
	add	x0, x0, #:lo12:__hyp_stub_vectors
	msr	vbar_el2, x0

	/* spsr */