diff --git a/src/arch/i386/smp/secondary.S b/src/arch/i386/smp/secondary.S index d702332fca..149f8880a8 100644 --- a/src/arch/i386/smp/secondary.S +++ b/src/arch/i386/smp/secondary.S @@ -1,8 +1,9 @@ -#include -#include +.text #include #include - .text +#include +#include + .globl _secondary_start .balign 4096 _secondary_start: @@ -44,6 +45,9 @@ _secondary_start: orl $APIC_DEFAULT_BASE, %eax wrmsr + /* Do I want to set the absolute memory limits in C ? */ + CALLSP(set_memory_size) + /* Get the apic_id */ movl (APIC_ID + APIC_DEFAULT_BASE), %edi shrl $24, %edi @@ -65,12 +69,11 @@ _secondary_start: subl %eax, %esp call EXT(secondary_cpu_init) -1: hlt - jmp 1b + jmp __cpu_reset gdtaddr: - .word gdt_limit /* the table limit */ - .long gdt /* we know the offset */ - - + .word gdt_end - gdt - 1 /* compute the table limit */ + .long gdt /* we know the offset */ + +.previous .code32