diff options
Diffstat (limited to 'bl31')
-rw-r--r-- | bl31/bl31.ld.S | 2 | ||||
-rw-r--r-- | bl31/context_mgmt.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/bl31/bl31.ld.S b/bl31/bl31.ld.S index add65b8d..124be85c 100644 --- a/bl31/bl31.ld.S +++ b/bl31/bl31.ld.S @@ -36,7 +36,7 @@ ENTRY(bl31_entrypoint) MEMORY { - RAM (rwx): ORIGIN = BL31_BASE, LENGTH = BL31_LIMIT + RAM (rwx): ORIGIN = BL31_BASE, LENGTH = BL31_LIMIT - BL31_BASE } diff --git a/bl31/context_mgmt.c b/bl31/context_mgmt.c index 698fb6fa..6f27176c 100644 --- a/bl31/context_mgmt.c +++ b/bl31/context_mgmt.c @@ -182,7 +182,10 @@ void cm_init_context(uint64_t mpidr, const entry_point_info_t *ep) * against the CPU support, security state, endianess and pc */ sctlr_elx = EP_GET_EE(ep->h.attr) ? SCTLR_EE_BIT : 0; - sctlr_elx |= SCTLR_EL1_RES1; + if (GET_RW(ep->spsr) == MODE_RW_64) + sctlr_elx |= SCTLR_EL1_RES1; + else + sctlr_elx |= SCTLR_AARCH32_EL1_RES1; write_ctx_reg(get_sysregs_ctx(ctx), CTX_SCTLR_EL1, sctlr_elx); if ((GET_RW(ep->spsr) == MODE_RW_64 |