[RFC PATCH 4/4] jumparch64: add go64

Frank Wunderlich linux at fw-web.de
Mon Aug 10 16:26:52 CEST 2020


From: Frank Wunderlich <frank-w at public-files.de>

adding a new uboot command go64 which allows booting 64bit
kernel-image from 32bit uboot using the jumparch64 target in mt7622 ATF

Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
---
 cmd/boot.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/cmd/boot.c b/cmd/boot.c
index 36aba22b30..1448eb3854 100644
--- a/cmd/boot.c
+++ b/cmd/boot.c
@@ -53,6 +53,32 @@ U_BOOT_CMD(
 	"      passing 'arg' as arguments"
 );
 
+#if defined(CONFIG_ARCH_MEDIATEK_32) && defined(CONFIG_TARGET_MT7622)
+static int do_go64(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[])
+{
+	ulong	addr;
+
+	if (argc < 2)
+		return CMD_RET_USAGE;
+
+	addr = simple_strtoul(argv[1], NULL, 16);
+
+	printf ("## Starting application at 0x%08lX ...\n", addr);
+
+	extern void jumparch64_smc(ulong addr, ulong arg1, ulong arg2);
+	jumparch64_smc(addr, 0, 0);
+
+	return 0;
+}
+
+U_BOOT_CMD(
+	go64, CONFIG_SYS_MAXARGS, 1,	do_go64,
+	"start 64bit application at address 'addr'",
+	"addr [arg ...]\n    - start 64bit application at address 'addr'\n"
+	"      passing 'arg' as arguments"
+);
+#endif
+
 #endif
 
 U_BOOT_CMD(
-- 
2.25.1



More information about the U-Boot mailing list