Attention is currently required from: Ron Minnich. Sergii Dmytruk has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/57083 )
Change subject: arch/ppc64/boot.c: handle non-OPD entry point ......................................................................
arch/ppc64/boot.c: handle non-OPD entry point
Change-Id: I309be370d66a808b355241fcee880883631f38ce Signed-off-by: Sergii Dmytruk sergii.dmytruk@3mdeb.com --- M src/arch/ppc64/boot.c 1 file changed, 19 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/57083/1
diff --git a/src/arch/ppc64/boot.c b/src/arch/ppc64/boot.c index dc4bb42..bbd0d39 100644 --- a/src/arch/ppc64/boot.c +++ b/src/arch/ppc64/boot.c @@ -2,9 +2,28 @@
#include <program_loading.h>
+#if ENV_PAYLOAD_LOADER + +/* + * Payload's entry point is an offset to the real entry point, not to OPD + * (Official Procedure Descriptor) for entry point. + */ +void arch_prog_run(struct prog *prog) +{ + asm volatile( + "mtctr %1\n" + "mr 3, %0\n" + "bctr\n" + :: "r"(prog_entry_arg(prog)), "r"(prog_entry(prog)) : "memory"); +} + +#else + void arch_prog_run(struct prog *prog) { void (*doit)(void *) = prog_entry(prog);
doit(prog_entry_arg(prog)); } + +#endif