diff --git a/arch/x86/core/ia32/crt0.S b/arch/x86/core/ia32/crt0.S index e611c884274..1f431489bfe 100644 --- a/arch/x86/core/ia32/crt0.S +++ b/arch/x86/core/ia32/crt0.S @@ -240,6 +240,7 @@ __csSet: #endif pushl %ebx /* pointer to multiboot info, or NULL */ + pushl %eax /* junk, unused argument */ call z_x86_prep_c /* enter kernel; never returns */ _x86_bss_zero: diff --git a/arch/x86/core/intel64/cpu.c b/arch/x86/core/intel64/cpu.c index 15cd04e6463..751373c2143 100644 --- a/arch/x86/core/intel64/cpu.c +++ b/arch/x86/core/intel64/cpu.c @@ -9,7 +9,7 @@ #include #include -extern FUNC_NORETURN void z_x86_prep_c(struct multiboot_info *); +extern FUNC_NORETURN void z_x86_prep_c(int, struct multiboot_info *); extern u8_t _exception_stack[]; diff --git a/arch/x86/core/intel64/locore.S b/arch/x86/core/intel64/locore.S index 2a065239e91..58bf6b031b6 100644 --- a/arch/x86/core/intel64/locore.S +++ b/arch/x86/core/intel64/locore.S @@ -104,7 +104,7 @@ __start: /* don't replace CALL with JMP; honor the ABI stack alignment! */ - movq __x86_cpuboot_t_arg_OFFSET(%rbp), %rdi + movq __x86_cpuboot_t_arg_OFFSET(%rbp), %rsi call *__x86_cpuboot_t_fn_OFFSET(%rbp) /* enter kernel; never return */ /* diff --git a/arch/x86/core/prep_c.c b/arch/x86/core/prep_c.c index 6c3b22e5f46..b7ce0777330 100644 --- a/arch/x86/core/prep_c.c +++ b/arch/x86/core/prep_c.c @@ -10,8 +10,10 @@ extern FUNC_NORETURN void z_cstart(void); -FUNC_NORETURN void z_x86_prep_c(struct multiboot_info *info) +FUNC_NORETURN void z_x86_prep_c(int unused, struct multiboot_info *info) { + ARG_UNUSED(unused); + _kernel.cpus[0].nested = 0; _kernel.cpus[0].irq_stack = Z_THREAD_STACK_BUFFER(_interrupt_stack) + CONFIG_ISR_STACK_SIZE;