aboutsummaryrefslogtreecommitdiff
path: root/board/xilinx
diff options
context:
space:
mode:
authorNitin Jain2018-02-16 12:56:17 +0530
committerMichal Simek2018-03-23 09:34:42 +0100
commit51916864b31f35853c2c6bf94f4dc89a311ee8f1 (patch)
tree1056e6d2cbc972ed0ec7a277c90af409856fd7cc /board/xilinx
parent429f0b9e1410a19b08ac281318a308ebce4b6fbc (diff)
arm64: zynqmp: Add support to load an app at EL1
This patch is adding support to switch to EL1 while loading an EL1 application with u-boot running at EL above EL1 in aarch64 mode. Signed-off-by: Nitin Jain <nitinj@xilinx.com> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/xilinx')
-rw-r--r--board/xilinx/zynqmp/zynqmp.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index ff0b3c75f53..b9825ddaa88 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -316,6 +316,23 @@ int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
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;
+}
+
#if !defined(CONFIG_SYS_SDRAM_BASE) && !defined(CONFIG_SYS_SDRAM_SIZE)
int dram_init_banksize(void)
{