diff options
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/arm/boot.c | 11 | ||||
-rw-r--r-- | src/arch/arm64/boot.c | 16 | ||||
-rw-r--r-- | src/arch/mips/boot.c | 4 | ||||
-rw-r--r-- | src/arch/riscv/boot.c | 5 | ||||
-rw-r--r-- | src/arch/x86/boot/boot.c | 5 |
5 files changed, 18 insertions, 23 deletions
diff --git a/src/arch/arm/boot.c b/src/arch/arm/boot.c index 5217a9f3b0..9dc6dbd3cf 100644 --- a/src/arch/arm/boot.c +++ b/src/arch/arm/boot.c @@ -18,17 +18,14 @@ */ #include <arch/cache.h> -#include <arch/stages.h> -#include <cbmem.h> -#include <console/console.h> #include <program_loading.h> void arch_payload_run(const struct payload *payload) { - void (*doit)(void *) = payload->entry; - void *cb_tables = cbmem_find(CBMEM_ID_CBTABLE); + void (*doit)(void *); - printk(BIOS_SPEW, "entry = %p\n", payload->entry); cache_sync_instructions(); - doit(cb_tables); + + doit = prog_entry(&payload->prog); + doit(prog_entry_arg(&payload->prog)); } 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); } diff --git a/src/arch/mips/boot.c b/src/arch/mips/boot.c index b213ffcd1e..6e12d10c71 100644 --- a/src/arch/mips/boot.c +++ b/src/arch/mips/boot.c @@ -17,12 +17,10 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <console/console.h> #include <arch/stages.h> #include <program_loading.h> void arch_payload_run(const struct payload *payload) { - printk(BIOS_SPEW, "entry = %p\n", payload->entry); - stage_exit(payload->entry); + stage_exit(prog_entry(&payload->prog)); } diff --git a/src/arch/riscv/boot.c b/src/arch/riscv/boot.c index ff65cc3008..4c2be031c2 100644 --- a/src/arch/riscv/boot.c +++ b/src/arch/riscv/boot.c @@ -17,14 +17,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <console/console.h> #include <arch/stages.h> #include <program_loading.h> -#include <console/uart.h> void arch_payload_run(const struct payload *payload) { - printk(BIOS_SPEW, "entry = %p\n", payload->entry); // uart_rx_byte(0); - stage_exit(payload->entry); + stage_exit(prog_entry(&payload->prog)); } diff --git a/src/arch/x86/boot/boot.c b/src/arch/x86/boot/boot.c index 8f7f0e01d0..1fb36e2827 100644 --- a/src/arch/x86/boot/boot.c +++ b/src/arch/x86/boot/boot.c @@ -126,8 +126,9 @@ static void jmp_payload(void *entry, unsigned long buffer, unsigned long size) void arch_payload_run(const struct payload *payload) { if (IS_ENABLED(CONFIG_RELOCATABLE_RAMSTAGE)) - jmp_payload_no_bounce_buffer(payload->entry); + jmp_payload_no_bounce_buffer(prog_entry(&payload->prog)); else - jmp_payload(payload->entry, (uintptr_t)payload->bounce.data, + jmp_payload(prog_entry(&payload->prog), + (uintptr_t)payload->bounce.data, payload->bounce.size); } |