diff options
author | Soby Mathew <soby.mathew@arm.com> | 2016-04-04 12:34:24 +0100 |
---|---|---|
committer | Soby Mathew <soby.mathew@arm.com> | 2016-04-07 16:30:45 +0100 |
commit | 99e58f9e6943caeee72b3106c2c8a1cc3cdc7bf5 (patch) | |
tree | d99ce13a2891a11bb714e43349ff4319f85c9a21 /include | |
parent | 61dbb0285f478dcc0be5eb8c86291e203c9c80c2 (diff) |
Enable SCR_EL3.SIF bit
This patch enables the SCR_EL3.SIF (Secure Instruction Fetch) bit in BL1 and
BL31 common architectural setup code. When in secure state, this disables
instruction fetches from Non-secure memory.
NOTE: THIS COULD BREAK PLATFORMS THAT HAVE SECURE WORLD CODE EXECUTING FROM
NON-SECURE MEMORY, BUT THIS IS CONSIDERED UNLIKELY AND IS A SERIOUS SECURITY
RISK.
Fixes ARM-Software/tf-issues#372
Change-Id: I684e84b8d523c3b246e9a5fabfa085b6405df319
Diffstat (limited to 'include')
-rw-r--r-- | include/common/el3_common_macros.S | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/common/el3_common_macros.S b/include/common/el3_common_macros.S index ba80d95d..9b22a734 100644 --- a/include/common/el3_common_macros.S +++ b/include/common/el3_common_macros.S @@ -70,11 +70,12 @@ isb /* --------------------------------------------------------------------- - * Early set RES1 bits in SCR_EL3. Set EA bit as well to catch both - * External Aborts and SError Interrupts in EL3. + * Early set RES1 bits in SCR_EL3. Set EA bit to catch both + * External Aborts and SError Interrupts in EL3 and also the SIF bit + * to disable instruction fetches from Non-secure memory. * --------------------------------------------------------------------- */ - mov x0, #(SCR_RES1_BITS | SCR_EA_BIT) + mov x0, #(SCR_RES1_BITS | SCR_EA_BIT | SCR_SIF_BIT) msr scr_el3, x0 /* --------------------------------------------------------------------- * Enable External Aborts and SError Interrupts now that the exception |