diff options
Diffstat (limited to 'el3/el3.c')
-rw-r--r-- | el3/el3.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -328,6 +328,18 @@ void el3_start(uintptr_t base, uintptr_t size) el3_monitor_init(); + /* Initialize SCR. In particular, we must ensure that SCR_EL3.RW is 1 + * so that we define EL1 as AArch64; otherwise the exception return + * will fail; we also want SCR_EL3.NS to be 0. + * Setting SCR_ST and SCR_HCE isn't necessary but this configuration + * is essentially "turn off all the trap-to-EL3 possibilities". + */ +#ifdef AARCH64 + WRITE_SCR(SCR_ST | SCR_RW | SCR_HCE); +#else + WRITE_SCR(SCR_HCE); +#endif + /* Set-up our state to return to secure EL1 to start its init on exception * return. */ |