diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-03-20 13:00:20 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2015-04-03 14:51:51 +0200 |
commit | 3948e5392bbfd685e6e2f9abfb16c46a2eae18b9 (patch) | |
tree | 480a94bff1f7c2587dfc5943d45dfc8c66ec971b /src/arch/arm64 | |
parent | 3b631615f6c382965e239704b1f417c6a67b6730 (diff) | |
download | coreboot-3948e5392bbfd685e6e2f9abfb16c46a2eae18b9.tar.xz |
program loading: introduce struct prog
The struct prog serves as way to consolidate program
loading. This abstraction can be used to perform more
complicated execution paths such as running a program
on a separate CPU after it has been loaded. Currently
t124 and t132 need to do that in the boot path. Follow
on patches will allow the platform to decide how to
execute a particular program.
Note: the vboot path is largely untouched because it's
already broken in the coreboot.org tree. After getting
all the necessary patches pushed then vboot will be
fixed.
Change-Id: Ic6e6fe28c5660fb41edee5fd8661eaf58222f883
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8839
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Marc Jones <marc.jones@se-eng.com>
Diffstat (limited to 'src/arch/arm64')
-rw-r--r-- | src/arch/arm64/boot.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/arch/arm64/boot.c b/src/arch/arm64/boot.c index 01630f376b..74282a9cde 100644 --- a/src/arch/arm64/boot.c +++ b/src/arch/arm64/boot.c @@ -23,21 +23,23 @@ #include <arch/stages.h> #include <arch/spintable.h> #include <arch/transition.h> -#include <cbmem.h> #include <console/console.h> #include <program_loading.h> #include <string.h> void arch_payload_run(const struct payload *payload) { - void (*payload_entry)(void *) = payload->entry; + void (*doit)(void *); + void *arg; + + doit = prog_entry(&payload->prog); + arg = prog_entry_arg(&payload->prog); - void *cb_tables = cbmem_find(CBMEM_ID_CBTABLE); uint8_t current_el = get_current_el(); - printk(BIOS_SPEW, "entry = %p\n", payload->entry); + printk(BIOS_SPEW, "entry = %p\n", doit); - secmon_run(payload_entry, cb_tables); + secmon_run(doit, arg); /* Start the other CPUs spinning. */ spintable_start(); @@ -46,7 +48,7 @@ void arch_payload_run(const struct payload *payload) if (current_el != EL3) { cache_sync_instructions(); /* Point of no-return */ - payload_entry(cb_tables); + doit(arg); } /* If current EL is EL3, we transition to payload in EL2. */ @@ -57,5 +59,5 @@ void arch_payload_run(const struct payload *payload) exc_state.elx.spsr = get_eret_el(EL2, SPSR_USE_L); cache_sync_instructions(); - transition_with_entry(payload->entry, cb_tables, &exc_state); + transition_with_entry(doit, arg, &exc_state); } |