diff options
Diffstat (limited to 'src/cpu/x86/lapic/secondary.S')
-rw-r--r-- | src/cpu/x86/lapic/secondary.S | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/cpu/x86/lapic/secondary.S b/src/cpu/x86/lapic/secondary.S index 2ad70296ea..15bae5e5db 100644 --- a/src/cpu/x86/lapic/secondary.S +++ b/src/cpu/x86/lapic/secondary.S @@ -2,8 +2,7 @@ #include <cpu/x86/lapic_def.h> .text - .globl _secondary_start, _secondary_start_end, cpucount - .balign 4096 + .globl _secondary_start, _secondary_start_end, cpucount, ap_protected_start _secondary_start: .code16 cli @@ -25,9 +24,21 @@ _secondary_start: orl $0x60000001, %eax /* CD, NW, PE = 1 */ movl %eax, %cr0 - ljmpl $0x10, $1f -1: + ljmpl $0x10, $__ap_protected_start + +gdtaddr: + .word gdt_limit /* the table limit */ + .long gdt /* we know the offset */ + +_secondary_start_end: + +ap_protected_start: .code32 + lgdt gdtaddr + ljmpl $0x10, $__ap_protected_start + +__ap_protected_start: + movw $0x18, %ax movw %ax, %ds movw %ax, %es @@ -57,9 +68,4 @@ _secondary_start: cpucount: .long 1 -gdtaddr: - .word gdt_limit /* the table limit */ - .long gdt /* we know the offset */ - -_secondary_start_end: .code32 |