; AcessOS Microkernel Version
;
; desctab.asm
+%include "arch/x86/common.inc.asm"
[BITS 32]
jmp .jmp
[global Isr0xEE]
-[extern SchedulerBase]
+[extern Proc_EventTimer_LAPIC]
; AP's Timer Interrupt
Isr0xEE:
push eax ; Line up with interrupt number
mov eax, dr1 ; CPU Number
push eax
mov eax, [esp+4] ; Load EAX back
- jmp SchedulerBase
+ jmp Proc_EventTimer_LAPIC
; Spurious Interrupt
[global Isr0xEF]
Isr0xEF:
; - Timer
[global Isr240]
[global Isr240.jmp]
-[extern SchedulerBase]
+[extern Proc_EventTimer_PIT]
[extern SetAPICTimerCount]
Isr240:
push 0 ; Line up with Argument in errors
%if USE_MP
jmp SetAPICTimerCount ; This is reset once the bus speed has been calculated
%else
- jmp SchedulerBase
+ jmp Proc_EventTimer_PIT
%endif
; - Assignable
%assign i 0xF1
-%rep 16
+%rep 15
DEF_IRQ i
%assign i i+1
%endrep
+[extern ReturnFromInterrupt]
; ---------------------
; Common error handling
; ---------------------
[extern ErrorHandler]
ErrorCommon:
- ;xchg bx, bx ; MAGIC BREAK
-
pusha
push ds
push es
call ErrorHandler
add esp, 4
- pop gs
- pop fs
- pop es
- pop ds
- popa
- add esp, 8 ; Error Code and ID
- iret
+ jmp ReturnFromInterrupt
; --------------------------
; Common System Call Handler
; --------------------------
[extern SyscallHandler]
SyscallCommon:
- pusha
- push ds
- push es
- push fs
- push gs
+ PUSH_CC ; Actually a pusha
+ PUSH_SEG
push esp
call SyscallHandler
and eax, 0x100 ; 0x100 = Trace Flag
and WORD [esp+(4+8+2+2)*4], ~0x100 ; Clear
or DWORD [esp+(4+8+2+2)*4], eax ; Set for user
-
- pop gs
- pop fs
- pop es
- pop ds
- popa
- add esp, 8 ; Error Code and ID
- iret
+
+ jmp ReturnFromInterrupt
; ------------
; IRQ Handling
[global IRQCommon_handled]
IRQCommon_handled equ IRQCommon.handled
IRQCommon:
- 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_CC
+ PUSH_SEG
push esp
call IRQ_Handler