bcm4008: prepare to work on kernel 6.6
[openwrt/openwrt.git] / target / linux / bcm4908 / patches-6.6 / 301-arm64-don-t-issue-HVC-on-boot.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Date: Thu, 12 Aug 2021 11:52:42 +0200
3 Subject: [PATCH] arm64: don't issue HVC on boot
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 Broadcom's CFE loader seems to miss setting SCR_EL3.HCE which results in
9 generating an UNDEF and kernel panic on the first HVC.
10
11 HVC gets issued by kernels 5.12+ while booting, by kexec and KVM. Until
12 someone finds a workaround we have to avoid all above.
13
14 Workarounds: 0c93df9622d4 ("arm64: Initialise as nVHE before switching to VHE")
15 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
16 ---
17 arch/arm64/kernel/hyp-stub.S | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20 --- a/arch/arm64/kernel/hyp-stub.S
21 +++ b/arch/arm64/kernel/hyp-stub.S
22 @@ -252,7 +252,7 @@ SYM_FUNC_START(finalise_el2)
23 b.ne 1f
24
25 mov x0, #HVC_FINALISE_EL2
26 - hvc #0
27 +// hvc #0
28 1:
29 ret
30 SYM_FUNC_END(finalise_el2)