diff options
Diffstat (limited to 'i386/i386at/boothdr.S')
-rw-r--r-- | i386/i386at/boothdr.S | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/i386/i386at/boothdr.S b/i386/i386at/boothdr.S index 82d4b34a..d1d1fa51 100644 --- a/i386/i386at/boothdr.S +++ b/i386/i386at/boothdr.S @@ -1,6 +1,6 @@ #include <mach/machine/asm.h> - +#include <i386/apic.h> #include <i386/i386asm.h> /* @@ -54,7 +54,18 @@ boot_entry: movw %ax,%ss /* Switch to our own interrupt stack. */ - movl $_intstack+INTSTACK_SIZE,%esp + movl $solid_intstack+INTSTACK_SIZE-4, %esp + andl $0xfffffff0,%esp + + /* Enable local apic */ + xorl %eax, %eax + xorl %edx, %edx + movl $APIC_MSR, %ecx + rdmsr + orl $APIC_MSR_ENABLE, %eax + orl $APIC_MSR_BSP, %eax + movl $APIC_MSR, %ecx + wrmsr /* Reset EFLAGS to a known state. */ pushl $0 @@ -91,9 +102,6 @@ iplt_done: /* Jump into C code. */ call EXT(c_boot_entry) - .comm _intstack,INTSTACK_SIZE - .comm _eintstack,0 - .align 16 .word 0 boot_gdt_descr: |