diff options
author | York Sun <york.sun@nxp.com> | 2017-05-15 15:51:59 (GMT) |
---|---|---|
committer | York Sun <york.sun@nxp.com> | 2017-06-02 02:57:24 (GMT) |
commit | 399e2bb60cb76131c49446baf350697142af7c07 (patch) | |
tree | 5e13e5deea8e8d73302f4731e1ea1d6d42ef3236 /arch/arm/cpu/armv8/fsl-layerscape/ppa.c | |
parent | 1f55a93802ab1522e4f479d1d2730158e26b3567 (diff) | |
download | u-boot-399e2bb60cb76131c49446baf350697142af7c07.tar.xz |
armv8: layerscape: Make U-Boot EL2 safe
When U-Boot boots from EL2, skip some lowlevel init code requiring
EL3, including CCI-400/CCN-504, trust zone, GIC, etc. These
initialization tasks are carried out before U-Boot runs. This applies
to the RAM version image used for SPL boot if PPA is loaded first.
Signed-off-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'arch/arm/cpu/armv8/fsl-layerscape/ppa.c')
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/ppa.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c index 26c47a1..35c612d 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/ppa.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/ppa.c @@ -32,6 +32,7 @@ DECLARE_GLOBAL_DATA_PTR; int ppa_init(void) { + unsigned int el = current_el(); void *ppa_fit_addr; u32 *boot_loc_ptr_l, *boot_loc_ptr_h; int ret; @@ -45,6 +46,12 @@ int ppa_init(void) #endif #endif + /* Skip if running at lower exception level */ + if (el < 3) { + debug("Skipping PPA init, running at EL%d\n", el); + return 0; + } + #ifdef CONFIG_SYS_LS_PPA_FW_IN_XIP ppa_fit_addr = (void *)CONFIG_SYS_LS_PPA_FW_ADDR; debug("%s: PPA image load from XIP\n", __func__); |