X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86%2Fdesctab.asm;h=737570b01bf837d867f4d004f26d62d3ab7ec652;hb=ca05044548d5c1de87c030d625a305731a6cc665;hp=aad49c5f8b0fb548a808598e3237af62ce51f0ed;hpb=505307eb2af0ae6a06a45677db27074a7d3f476c;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86/desctab.asm b/Kernel/arch/x86/desctab.asm index aad49c5f..737570b0 100644 --- a/Kernel/arch/x86/desctab.asm +++ b/Kernel/arch/x86/desctab.asm @@ -3,10 +3,10 @@ ; desctab.asm [BITS 32] -%if ARCH == "i386" -MAX_CPUS equ 1 -%else +%if USE_MP MAX_CPUS equ 8 +%else +MAX_CPUS equ 1 %endif GDT_SIZE equ (1+2*2+1+MAX_CPUS)*8 @@ -23,22 +23,25 @@ gGDT: dd 0x0000FFFF, 0x00CFF200 ; 20 PL3 Data dd 26*4-1, 0x00408900 ; Double Fault TSS times MAX_CPUS dd 26*4-1, 0x00408900 -gGDTptr: +[global gGDTPtr] +gGDTPtr: dw GDT_SIZE-1 dd gGDT ; IDT ALIGN 8 gIDT: times 256 dd 0x00080000,0x00000F00 +[global gIDTPtr] gIDTPtr: dw 256 * 16 - 1 ; Limit dd gIDT ; Base [section .text] + [global Desctab_Install] Desctab_Install: ; Set GDT - lgdt [gGDTptr] + lgdt [gGDTPtr] mov ax, 0x10 ; PL0 Data mov ss, ax mov ds, ax @@ -202,6 +205,7 @@ Isr240: ; --------------------- [extern ErrorHandler] ErrorCommon: + ;xchg bx, bx pusha push ds push es