arch/ppc64/boot.c: handle non-OPD entry point
Change-Id: I309be370d66a808b355241fcee880883631f38ce Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/57083 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
956a8b69d2
commit
dba9b54731
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue