* [PATCH] arm64: versal: Add support to load an app at EL1
@ 2022-05-06 5:53 Ashok Reddy Soma
2022-05-06 8:18 ` Michal Simek
0 siblings, 1 reply; 2+ messages in thread
From: Ashok Reddy Soma @ 2022-05-06 5:53 UTC (permalink / raw)
To: u-boot; +Cc: michal.simek, git-dev, somaashokreddy, Ashok Reddy Soma
Add support to switch to EL1 and load an EL1 app from U-Boot which is
executing at EL2 or EL3 in aarch64 mode.
Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
---
board/xilinx/versal/board.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index 2e2807eee4..a0f937eb45 100644
--- a/board/xilinx/versal/board.c
+++ b/board/xilinx/versal/board.c
@@ -91,6 +91,23 @@ int board_early_init_r(void)
return 0;
}
+unsigned long do_go_exec(ulong (*entry)(int, char * const []), int argc,
+ char *const argv[])
+{
+ int ret = 0;
+
+ if (current_el() > 1) {
+ smp_kick_all_cpus();
+ dcache_disable();
+ armv8_switch_to_el1(0x0, 0, 0, 0, (unsigned long)entry,
+ ES_TO_AARCH64);
+ } else {
+ printf("FAIL: current EL is not above EL1\n");
+ ret = EINVAL;
+ }
+ return ret;
+}
+
static u8 versal_get_bootmode(void)
{
u8 bootmode;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: versal: Add support to load an app at EL1
2022-05-06 5:53 [PATCH] arm64: versal: Add support to load an app at EL1 Ashok Reddy Soma
@ 2022-05-06 8:18 ` Michal Simek
0 siblings, 0 replies; 2+ messages in thread
From: Michal Simek @ 2022-05-06 8:18 UTC (permalink / raw)
To: u-boot, Ashok Reddy Soma; +Cc: michal.simek, git-dev, somaashokreddy
On Thu, 5 May 2022 23:53:45 -0600, Ashok Reddy Soma wrote:
> Add support to switch to EL1 and load an EL1 app from U-Boot which is
> executing at EL2 or EL3 in aarch64 mode.
>
>
Applied, thanks!
[1/1] arm64: versal: Add support to load an app at EL1
https://source.denx.de/u-boot/custodians/u-boot-microblaze/-/commit/dca041d17910dcef75abca1c4f9262bf747fe4dc
Best regards,
--
Michal Simek <michal.simek@amd.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-05-06 8:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-06 5:53 [PATCH] arm64: versal: Add support to load an app at EL1 Ashok Reddy Soma
2022-05-06 8:18 ` Michal Simek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.