From: Frank Wunderlich <linux@fw-web.de>
To: u-boot@lists.denx.de
Subject: [RFC PATCH 4/4] jumparch64: add go64
Date: Mon, 10 Aug 2020 16:26:52 +0200 [thread overview]
Message-ID: <20200810142652.40669-5-linux@fw-web.de> (raw)
In-Reply-To: <20200810142652.40669-1-linux@fw-web.de>
From: Frank Wunderlich <frank-w@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@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@address 'addr'\n"
+ " passing 'arg' as arguments"
+);
+#endif
+
#endif
U_BOOT_CMD(
--
2.25.1
prev parent reply other threads:[~2020-08-10 14:26 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 14:26 [RFC PATCH 0/4] Add 32bit-mode for mt7622 Frank Wunderlich
2020-08-10 14:26 ` [RFC PATCH 1/4] mt7622: Support to build 32 bits version Frank Wunderlich
2020-08-11 2:11 ` Sam Shih
2020-08-11 10:01 ` Frank Wunderlich
2020-08-10 14:26 ` [RFC PATCH 2/4] mt7622: add lowlevel_init from 2014-04 Frank Wunderlich
2020-08-10 14:26 ` [RFC PATCH 3/4] jumparch64: insert into bootm Frank Wunderlich
2020-08-10 14:26 ` Frank Wunderlich [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200810142652.40669-5-linux@fw-web.de \
--to=linux@fw-web.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox