diff options
author | Julius Werner <jwerner@chromium.org> | 2015-05-13 11:19:33 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-05-19 20:35:10 +0200 |
commit | da3a146caea1e85c9651a7f5889ad2a547d6f5e7 (patch) | |
tree | 186a8d3d727aed1c7bb601f90b487c4383ff4313 /src/arch/arm64/boot.c | |
parent | 745a75faac970ec5dd35472412ddb94e888e4198 (diff) | |
download | coreboot-da3a146caea1e85c9651a7f5889ad2a547d6f5e7.tar.gz coreboot-da3a146caea1e85c9651a7f5889ad2a547d6f5e7.tar.bz2 coreboot-da3a146caea1e85c9651a7f5889ad2a547d6f5e7.zip |
arm64: Make SPSR exception masking on EL2 transition explicit
The configuration of SPSR bits that mask processor exceptions is kinda
oddly hidden as an implict part of the transition() function right now.
It would be odd but not impossible for programs to want to be entered
with enabled exceptions, so let's move these bits to be explicitly set
by the caller like the rest of SPSR instead.
Also clear up some macro names. The SPSR[I] bit is currently defined as
SPSR_IRQ_ENABLE, which is particularly unfortunate since that bit
actually *disables* (masks) interrupts. The fact that there is an
additional SPSR_IRQ_MASK definition with the same value but a different
purpose doesn't really help. There's rarely a point to have all three of
xxx_SHIFT, xxx_MASK and xxx_VALUE macros for single-bit fields, so
simplify this to a single definition per bit. (Other macros in
lib_helpers.h should probably also be overhauled to conform, but I want
to wait and see how many of them really stay relevant after upcoming
changes first.)
BRANCH=None
BUG=None
TEST=None
Change-Id: Id126f70d365467e43b7f493c341542247e5026d2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 715600c83aef9794d1674e8c3b62469bdc57f297
Original-Change-Id: I3edc4ee276feb8610a636ec7b4175706505d58bd
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/270785
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/10250
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/arch/arm64/boot.c')
-rw-r--r-- | src/arch/arm64/boot.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/arm64/boot.c b/src/arch/arm64/boot.c index f67f82590bc7..226d8d77b536 100644 --- a/src/arch/arm64/boot.c +++ b/src/arch/arm64/boot.c @@ -37,7 +37,7 @@ static void run_payload(struct prog *prog) doit = prog_entry(prog); arg = prog_entry_arg(prog); - u64 payload_spsr = get_eret_el(EL2, SPSR_USE_L); + u64 payload_spsr = SPSR_EXCEPTION_MASK | get_eret_el(EL2, SPSR_USE_L); if (IS_ENABLED(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE)) arm_tf_run_bl31((u64)doit, (u64)arg, payload_spsr); |