diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index fc293dc..2aee594 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -26,6 +26,11 @@ #define pa(X) ((X) - __PAGE_OFFSET) /* + * Initial stack pointer for the boot processor + */ +initial_stack_pointer = init_thread_union+THREAD_SIZE + +/* * References to members of the new_cpu_data structure. */ @@ -99,8 +104,10 @@ ENTRY(startup_32) movl %eax,%es movl %eax,%fs movl %eax,%gs + movl %eax,%ss 2: - + movl $pa(initial_stack_pointer), %esp + /* * Clear BSS first so that there are no surprises... */ @@ -282,6 +289,9 @@ ENTRY(startup_32_smp) movl %eax,%es movl %eax,%fs movl %eax,%gs + movl pa(stack_start),%ecx + movl %eax,%ss + leal -__PAGE_OFFSET(%ecx),%esp #endif /* CONFIG_SMP */ default_entry: @@ -671,7 +681,7 @@ ENTRY(initial_page_table) .data ENTRY(stack_start) - .long init_thread_union+THREAD_SIZE + .long initial_stack_pointer .long __BOOT_DS ready: .byte 0