diff options
author | Arthur Heymans <arthur@aheymans.xyz> | 2019-10-19 22:56:44 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2019-10-30 08:32:39 +0000 |
commit | b7cc68ae6aa5d3effec7606ea1020adfe69384e6 (patch) | |
tree | 6eb70b76f03cefa8f112c5b866a648d55d5da920 /src/arch | |
parent | 9b8d28f013b9540ab89578e0ea317054d4ae106e (diff) | |
download | coreboot-b7cc68ae6aa5d3effec7606ea1020adfe69384e6.tar.xz |
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>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/boot.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/arch/x86/boot.c b/src/arch/x86/boot.c index 5f60f1394a..ada49d0368 100644 --- a/src/arch/x86/boot.c +++ b/src/arch/x86/boot.c @@ -30,13 +30,12 @@ int payload_arch_usable_ram_quirk(uint64_t start, uint64_t size) void arch_prog_run(struct prog *prog) { - __asm__ volatile ( #ifdef __x86_64__ - "jmp *%%rdi\n" + void (*doit)(void *arg); #else - "jmp *%%edi\n" + /* Ensure the argument is pushed on the stack. */ + asmlinkage void (*doit)(void *arg); #endif - - :: "D"(prog_entry(prog)) - ); + doit = prog_entry(prog); + doit(prog_entry_arg(prog)); } |