summaryrefslogtreecommitdiff
path: root/src/arch/x86/boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/boot.c')
-rw-r--r--src/arch/x86/boot.c11
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));
}