diff options
author | Damien Zammit <damien@zamaudio.com> | 2023-02-13 01:27:00 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-02-13 01:27:00 +0100 |
commit | 64799765e2af5f52a74de10c9575cc30009bdfd0 (patch) | |
tree | 72a20eb964f2ae182d0b7c47e72a84931f4936ca /i386/i386at/boothdr.S | |
parent | ea2646b6d6f2dc02a59a2693d08957596c84e9d3 (diff) | |
download | gnumach-64799765e2af5f52a74de10c9575cc30009bdfd0.tar.gz gnumach-64799765e2af5f52a74de10c9575cc30009bdfd0.tar.bz2 gnumach-64799765e2af5f52a74de10c9575cc30009bdfd0.zip |
i386: Refactor int stacks to be per cpu for SMP
This also serialises the AP bringup, so paging can be enabled per cpu
one by one.
Also-by: Almudena Garcia <liberamenso10000@gmail.com>
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: |