X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Farch%2Fx86%2Fdesctab.asm;h=338253474392d1efa09152c76122b9b3a017cf6e;hb=14d0ba44433f0f828aff710184fd3c597ab73999;hp=6eaa651a239657c58ab6b6d0a77e37285f7ae356;hpb=48743e39650eb1ef988380e9d95f27fd40d3a9ce;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/arch/x86/desctab.asm b/KernelLand/Kernel/arch/x86/desctab.asm index 6eaa651a..33825347 100644 --- a/KernelLand/Kernel/arch/x86/desctab.asm +++ b/KernelLand/Kernel/arch/x86/desctab.asm @@ -1,6 +1,7 @@ ; AcessOS Microkernel Version ; ; desctab.asm +%include "arch/x86/common.inc.asm" [BITS 32] @@ -182,14 +183,14 @@ Isr0xED: 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: @@ -201,7 +202,7 @@ Isr0xEF: ; - Timer [global Isr240] [global Isr240.jmp] -[extern SchedulerBase] +[extern Proc_EventTimer_PIT] [extern SetAPICTimerCount] Isr240: push 0 ; Line up with Argument in errors @@ -211,22 +212,21 @@ Isr240.jmp: %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 @@ -248,24 +248,15 @@ ErrorCommon: 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 @@ -282,14 +273,8 @@ SyscallCommon: 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 @@ -299,17 +284,8 @@ SyscallCommon: [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