Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36143 )
Change subject: arch/x86/boot.c: Pass arguments when running programs ......................................................................
arch/x86/boot.c: Pass arguments when running programs
Payloads can use coreboot tables passed on the stack. Stages could make use of an argument passed on the stack.
The assumption is made that stages and payloads start in assembly where stack alignment does not matter.
Change-Id: Ie0f44e9e1992221e02c49d0492cdd2a3d9013560 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/x86/boot.c 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/36143/1
diff --git a/src/arch/x86/boot.c b/src/arch/x86/boot.c index 5f60f13..4cdced3 100644 --- a/src/arch/x86/boot.c +++ b/src/arch/x86/boot.c @@ -32,11 +32,13 @@ { __asm__ volatile ( #ifdef __x86_64__ + "push %%rax\n" "jmp *%%rdi\n" #else + "push %%eax\n" "jmp *%%edi\n" #endif
- :: "D"(prog_entry(prog)) + :: "a" (prog_entry_arg(prog)), "D"(prog_entry(prog)) ); }