]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
armv8: psci: skip setup code if we are not EL3
authorMichael Walle <michael@walle.cc>
Mon, 28 Feb 2022 12:48:39 +0000 (13:48 +0100)
committerPriyanka Jain <priyanka.jain@nxp.com>
Tue, 26 Apr 2022 11:43:57 +0000 (17:13 +0530)
If we are running in EL2 skip PSCI implementation setup. This avoids an
exception if CONFIG_ARMV8_PSCI is set, but u-boot is started by TF-A.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
arch/arm/cpu/armv8/cpu.c

index ea40c55dd2c080c18b8e2bf5e26063128c4e8acb..db5d460eb460e1c7e72e4905ba7a4dde423ccce6 100644 (file)
@@ -79,6 +79,9 @@ static void relocate_secure_section(void)
 
 void armv8_setup_psci(void)
 {
+       if (current_el() != 3)
+               return;
+
        relocate_secure_section();
        secure_ram_addr(psci_setup_vectors)();
        secure_ram_addr(psci_arch_init)();