Adding support for the Local APIC Timer (requires some hacks)
[tpg/acess2.git] / Kernel / arch / x86 / desctab.asm
index 27b7bb1..1513984 100644 (file)
@@ -21,8 +21,8 @@ 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
@@ -76,6 +76,10 @@ Desctab_Install:
        SETISR  0xAC
        SETUSER 0xAC
        
+       %if USE_MP
+       SETISR  239
+       %endif
+       
        %assign i       0xF0
        %rep 16
        SETISR  i
@@ -187,13 +191,27 @@ ISR_NOERR 31; 31: Reserved
 
 DEF_SYSCALL    0xAC    ; Acess System Call
 
+; AP's Timer Interrupt
+%if USE_MP
+[global Isr239]
+[extern SchedulerBase]
+Isr239:
+       push 0
+       jmp SchedulerBase
+%endif
+
 ; IRQs
 ; - Timer
 [global Isr240]
 [extern SchedulerBase]
+[extern SetAPICTimerCount]
 Isr240:
        push 0
+       %if USE_MP
+       jmp SetAPICTimerCount
+       %else
        jmp SchedulerBase
+       %endif
 ; - Assignable
 %assign i      0xF1
 %rep 16
@@ -258,6 +276,7 @@ SyscallCommon:
 ; IRQ Handling
 ; ------------
 [extern IRQ_Handler]
+[global IRQCommon]
 IRQCommon:
        pusha
        push ds

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