From 005f60d3be2e789cd5fdeeca6973cea4bfe858d1 Mon Sep 17 00:00:00 2001 From: Travis Geiselbrecht Date: Mon, 26 May 2008 07:50:19 +0000 Subject: [PATCH] oops, fix the stage2 -> kernel call to actually work git-svn-id: svn+ssh://newos.org/var/svn/newos/newos@1250 c25cc9d1-44fa-0310-b259-ad778cb1d433 --- boot/pc/x86_64/stage2.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/boot/pc/x86_64/stage2.c b/boot/pc/x86_64/stage2.c index 930e815..62331d1 100644 --- a/boot/pc/x86_64/stage2.c +++ b/boot/pc/x86_64/stage2.c @@ -322,9 +322,13 @@ void stage2_main(void *multiboot_info, unsigned int memsize, void *extended_mem_ ka->cons_line = screenOffset / SCREEN_WIDTH; asm volatile("mov %0, %%rsp;" - "call *%1" - :: "r" (ka->cpu_kstack[0].start + ka->cpu_kstack[0].size), "r" (kernel_entry), - "rdi" (ka), "rsi" (0)); + "mov %1, %%rdi;" + "mov %2, %%rsi;" + "call *%3" + :: "r" (ka->cpu_kstack[0].start + ka->cpu_kstack[0].size), + "rdi" (ka), + "rsi" (0), + "r" (kernel_entry)); for(;;); } -- 2.11.4.GIT