diff mbox series

[RFC,3/4] jumparch64: insert into bootm

Message ID 20200810142652.40669-4-linux@fw-web.de
State New
Delegated to: Tom Rini
Headers show
Series Add 32bit-mode for mt7622 | expand

Commit Message

Frank Wunderlich Aug. 10, 2020, 2:26 p.m. UTC
From: Frank Wunderlich <frank-w@public-files.de>

if uboot is 32bit and linux-kernel is 64bit packed into armhf mkimage
(like official kernels for bpi-r64) call jumparch64 to switch to 64bit
mode after unpacking the kernel-image

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 arch/arm/lib/bootm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 1206e306db..015a5f7f86 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -374,6 +374,16 @@  static void boot_jump_linux(bootm_headers_t *images, int flag)
 					    ES_TO_AARCH64);
 #endif
 	}
+#elif defined(CONFIG_ARCH_MEDIATEK_32) && defined(CONFIG_TARGET_MT7622)
+    extern void jumparch64_smc(ulong addr, ulong arg1, ulong arg2);
+
+    /*
+     * Iverson 20150528 - show message for boot.
+     */
+	debug("images->ep = %lx, images->ft_addr = %lx\n", images->ep, (unsigned long)images->ft_addr);
+
+	announce_and_cleanup(0);
+    jumparch64_smc(images->ep, (unsigned long)images->ft_addr, 0);
 #else
 	unsigned long machid = gd->bd->bi_arch_number;
 	char *s;