Commenting is nice (also disabled debug in FDD driver)
[tpg/acess2.git] / Kernel / arch / x86 / desctab.asm
index b5d060d..9d19300 100644 (file)
@@ -21,14 +21,15 @@ gGDT:
        dd 0x0000FFFF, 0x00CF9200       ; 10 PL0 Data
        dd 0x0000FFFF, 0x00CFFA00       ; 18 PL3 Code
        dd 0x0000FFFF, 0x00CFF200       ; 20 PL3 Data
-       dd 26*4-1, 0x00408900   ; Double Fault TSS
-       times MAX_CPUS  dd 26*4-1, 0x00408900
+       dd 26*4-1, 0x00408900   ; 28 Double Fault TSS
+       times MAX_CPUS  dd 26*4-1, 0x00408900   ; 30+ TSSes
 [global gGDTPtr]
 gGDTPtr:
        dw      GDT_SIZE-1
        dd      gGDT
 ; IDT
 ALIGN 8
+[global gIDT]
 gIDT:
        times   256     dd      0x00080000,0x00000F00
 [global gIDTPtr]
@@ -146,7 +147,6 @@ Isr%1:
 %macro DEF_IRQ 1
 [global Isr%1]
 Isr%1:
-       ;cli    ; HACK!
        push    0
        push    %1
        jmp     IRQCommon
@@ -190,6 +190,7 @@ DEF_SYSCALL 0xAC    ; Acess System Call
 ; IRQs
 ; - Timer
 [global Isr240]
+[extern SchedulerBase]
 Isr240:
        push 0
        jmp SchedulerBase
@@ -205,12 +206,19 @@ Isr240:
 ; ---------------------
 [extern ErrorHandler]
 ErrorCommon:
+       ;xchg bx, bx
        pusha
        push ds
        push es
        push fs
        push gs
        
+       mov ax, 0x10
+       mov ds, ax
+       mov es, ax
+       mov fs, ax
+       mov gs, ax
+       
        push esp
        call ErrorHandler
        add esp, 4
@@ -257,6 +265,12 @@ IRQCommon:
        push fs
        push gs
        
+       mov ax, 0x10
+       mov ds, ax
+       mov es, ax
+       mov fs, ax
+       mov gs, ax
+       
        push esp
        call IRQ_Handler
        add esp, 4
@@ -268,34 +282,3 @@ IRQCommon:
        popa
        add esp, 8      ; Error Code and ID
        iret
-
-; --------------
-; Task Scheduler
-; --------------
-[extern Proc_Scheduler]
-SchedulerBase:
-       pusha
-       push ds
-       push es
-       push fs
-       push gs
-       
-       mov eax, [esp+12*4]     ; CPU Number
-       push eax        ; Pus as argument
-       
-       call Proc_Scheduler
-       
-       add esp, 4      ; Remove Argument
-       
-       pop gs
-       pop fs
-       pop es
-       pop ds
-
-       mov dx, 0x20
-       mov al, 0x20
-       out dx, al              ; ACK IRQ
-       popa
-       add esp, 4      ; CPU ID
-       ; No Error code / int num
-       iret

UCC git Repository :: git.ucc.asn.au