Sam Lewis has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/44376 )
Change subject: arch/arm: Enable booting Linux payloads ......................................................................
arch/arm: Enable booting Linux payloads
Enables booting in a Linux kernel payload with the calling convention the kernel requires. As there is no method in coreboot to check the type of payload being booted (Linux or otherwise) this assumes any payload is a Linux payload.
Change-Id: If50c834c8f434bc02dee8f84370d1dbf8f9b69e2 Signed-off-by: Sam Lewis sam.vr.lewis@gmail.com --- M src/arch/arm/boot.c 1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/44376/1
diff --git a/src/arch/arm/boot.c b/src/arch/arm/boot.c index 8c876de..fc87f2c 100644 --- a/src/arch/arm/boot.c +++ b/src/arch/arm/boot.c @@ -3,12 +3,28 @@ #include <arch/cache.h> #include <program_loading.h>
+static void run_linux_payload(struct prog *prog) +{ + void (*kernel_entry)(void *sbz, void *sbo, void *dtb); + void *fdt; + + kernel_entry = prog_entry(prog); + fdt = prog_entry_arg(prog); + kernel_entry(0, (void *)~0, fdt); +} + void arch_prog_run(struct prog *prog) { void (*doit)(void *);
cache_sync_instructions();
+ if (ENV_RAMSTAGE && prog_type(prog) == PROG_PAYLOAD) { + dcache_mmu_disable(); + run_linux_payload(prog); + return; + } + doit = prog_entry(prog); doit(prog_entry_arg(prog)); }