aboutsummaryrefslogtreecommitdiff
path: root/board/xilinx
diff options
context:
space:
mode:
authorAshok Reddy Soma <ashok.reddy.soma@xilinx.com>2022-05-05 23:53:45 -0600
committerMichal Simek <michal.simek@amd.com>2022-06-24 14:11:05 +0200
commit2eeceb4842b2465e07e654b78133bb035c28b7c2 (patch)
treee95d5ea35ab6cd1452853c76c1d4e68c5a04f4e2 /board/xilinx
parenta110caa206b5a19f2b8ed1f26a6bbd5e4c96597d (diff)
downloadu-boot-2eeceb4842b2465e07e654b78133bb035c28b7c2.zip
u-boot-2eeceb4842b2465e07e654b78133bb035c28b7c2.tar.gz
u-boot-2eeceb4842b2465e07e654b78133bb035c28b7c2.tar.bz2
arm64: versal: Add support to load an app at EL1
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> Link: https://lore.kernel.org/r/20220506055345.1921-1-ashok.reddy.soma@xilinx.com Signed-off-by: Michal Simek <michal.simek@amd.com>
Diffstat (limited to 'board/xilinx')
-rw-r--r--board/xilinx/versal/board.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
index a88f5bb..81663e0 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;