diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-03-20 15:55:08 -0500 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2015-04-03 14:52:47 +0200 |
commit | b3847e64242228166976f425cd42331db7857551 (patch) | |
tree | 36b912ee4d045402534305723fd006a0ec88012f /src/arch/arm | |
parent | 3948e5392bbfd685e6e2f9abfb16c46a2eae18b9 (diff) |
program loading: add prog_run() function
The prog_run() function abstracts away what is required
for running a given program. Within it, there are 2
calls: 1. platform_prog_run() and 2. arch_prog_run().
The platform_prog_run() allows for a chipset to intercept
a program that will be run. This allows for CPU switching
as currently needed in t124 and t132.
Change-Id: I22a5dd5bfb1018e7e46475e47ac993a0941e2a8c
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8846
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/arm')
-rw-r--r-- | src/arch/arm/Makefile.inc | 2 | ||||
-rw-r--r-- | src/arch/arm/boot.c | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/arch/arm/Makefile.inc b/src/arch/arm/Makefile.inc index e739d0b8d5..ffbc8413a7 100644 --- a/src/arch/arm/Makefile.inc +++ b/src/arch/arm/Makefile.inc @@ -54,6 +54,7 @@ ifeq ($(CONFIG_ARCH_BOOTBLOCK_ARM),y) bootblock-y += id.S $(obj)/arch/arm/id.bootblock.o: $(obj)/build.h +bootblock-y += boot.c bootblock-y += stages.c bootblock-y += eabi_compat.c bootblock-y += memset.S @@ -89,6 +90,7 @@ verstage-y += stages.c ifeq ($(CONFIG_ARCH_ROMSTAGE_ARM),y) +romstage-y += boot.c romstage-y += stages.c romstage-y += div0.c romstage-y += eabi_compat.c diff --git a/src/arch/arm/boot.c b/src/arch/arm/boot.c index 9dc6dbd3cf..6a2934b86e 100644 --- a/src/arch/arm/boot.c +++ b/src/arch/arm/boot.c @@ -20,12 +20,17 @@ #include <arch/cache.h> #include <program_loading.h> -void arch_payload_run(const struct payload *payload) +void arch_prog_run(struct prog *prog) { void (*doit)(void *); cache_sync_instructions(); - doit = prog_entry(&payload->prog); - doit(prog_entry_arg(&payload->prog)); + doit = prog_entry(prog); + doit(prog_entry_arg(prog)); +} + +void arch_payload_run(struct payload *payload) +{ + arch_prog_run(&payload->prog); } |