summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2015-05-07 16:59:31 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-05-19 20:34:55 +0200
commitbbca3a9cfa5248eb49bd2e42e8db25a6733835bb (patch)
tree2700f0ae32d378e7af0137191b715da5d89e7e07
parent883ec987a65939ecccf4b602a02ba2aeaca696b2 (diff)
downloadcoreboot-bbca3a9cfa5248eb49bd2e42e8db25a6733835bb.tar.xz
arm64: Reorganize payload entry code and related Kconfigs
This patch slightly reorganizes arm64/boot.c with the aim of being more readable: Make more obvious that there's no code execution here after payload_entry. [pg: taken from patch linked below] Change-Id: Ia341e5d290b10ad5ba3edb349b8a7f619022d99f Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 5067e47bc03f04ad2dba044f022716e0fc62bb9e Original-Change-Id: I1b2038acc0d054716a3c580ce97ea8e9a45abfa2 Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/270783 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/10247 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--src/arch/arm64/boot.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/arch/arm64/boot.c b/src/arch/arm64/boot.c
index 702953cfa6..1d9987a437 100644
--- a/src/arch/arm64/boot.c
+++ b/src/arch/arm64/boot.c
@@ -50,19 +50,16 @@ static void run_payload(struct prog *prog)
printk(BIOS_SPEW, "entry = %p\n", doit);
/* If current EL is not EL3, jump to payload at same EL. */
- if (current_el != EL3) {
- /* Point of no-return */
+ if (current_el != EL3)
doit(arg);
- }
-
- /* If current EL is EL3, we transition to payload in EL2. */
- struct exc_state exc_state;
-
- memset(&exc_state, 0, sizeof(exc_state));
+ else {
+ /* If current EL is EL3, we transition to payload in EL2. */
+ struct exc_state exc_state;
+ memset(&exc_state, 0, sizeof(exc_state));
+ exc_state.elx.spsr = get_eret_el(EL2, SPSR_USE_L);
- exc_state.elx.spsr = get_eret_el(EL2, SPSR_USE_L);
-
- transition_with_entry(doit, arg, &exc_state);
+ transition_with_entry(doit, arg, &exc_state);
+ }
}
}