arch/x86/boot.c: Pass arguments when running programs
Payloads can use coreboot tables passed on via arguments instead of via a pointer in lower memory. Stages can make use of the argument to pass on information. Change-Id: Ie0f44e9e1992221e02c49d0492cdd2a3d9013560 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36143 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
9b8d28f013
commit
b7cc68ae6a
@ -30,13 +30,12 @@ int payload_arch_usable_ram_quirk(uint64_t start, uint64_t size)
|
|||||||
|
|
||||||
void arch_prog_run(struct prog *prog)
|
void arch_prog_run(struct prog *prog)
|
||||||
{
|
{
|
||||||
__asm__ volatile (
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
"jmp *%%rdi\n"
|
void (*doit)(void *arg);
|
||||||
#else
|
#else
|
||||||
"jmp *%%edi\n"
|
/* Ensure the argument is pushed on the stack. */
|
||||||
|
asmlinkage void (*doit)(void *arg);
|
||||||
#endif
|
#endif
|
||||||
|
doit = prog_entry(prog);
|
||||||
:: "D"(prog_entry(prog))
|
doit(prog_entry_arg(prog));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user