aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2023-03-16 23:34:37 +0100
committerRafał Miłecki <rafal@milecki.pl>2023-03-16 23:34:56 +0100
commit86cf0f93f1ce603771ea06e581c8937ba1ad8918 (patch)
tree7a5761f20958bcd8556c62c4cff18b432bd68c00 /target
parentcb2661844a5d54d44230ee564d4f17605a794a49 (diff)
downloadupstream-86cf0f93f1ce603771ea06e581c8937ba1ad8918.tar.gz
upstream-86cf0f93f1ce603771ea06e581c8937ba1ad8918.tar.bz2
upstream-86cf0f93f1ce603771ea06e581c8937ba1ad8918.zip
bcm4908: add HVC workaround for booting kernel 5.15
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'target')
-rw-r--r--target/linux/bcm4908/patches-5.15/301-arm64-don-t-issue-HVC-on-boot.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/bcm4908/patches-5.15/301-arm64-don-t-issue-HVC-on-boot.patch b/target/linux/bcm4908/patches-5.15/301-arm64-don-t-issue-HVC-on-boot.patch
new file mode 100644
index 0000000000..d167c2ed00
--- /dev/null
+++ b/target/linux/bcm4908/patches-5.15/301-arm64-don-t-issue-HVC-on-boot.patch
@@ -0,0 +1,30 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
+Date: Thu, 12 Aug 2021 11:52:42 +0200
+Subject: [PATCH] arm64: don't issue HVC on boot
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Broadcom's CFE loader seems to miss setting SCR_EL3.HCE which results in
+generating an UNDEF and kernel panic on the first HVC.
+
+HVC gets issued by kernels 5.12+ while booting, by kexec and KVM. Until
+someone finds a workaround we have to avoid all above.
+
+Workarounds: 0c93df9622d4 ("arm64: Initialise as nVHE before switching to VHE")
+Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
+---
+ arch/arm64/kernel/hyp-stub.S | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm64/kernel/hyp-stub.S
++++ b/arch/arm64/kernel/hyp-stub.S
+@@ -238,7 +238,7 @@ SYM_FUNC_START(switch_to_vhe)
+
+ // Turn the world upside down
+ mov x0, #HVC_VHE_RESTART
+- hvc #0
++// hvc #0
+ 1:
+ ret
+ SYM_FUNC_END(switch_to_vhe)