diff cos/kernel/asmcode.asm @ 36:91f91ff07ea8

Removed test variables
author windel
date Mon, 16 Jan 2012 20:47:05 +0100
parents d8185ddb6c7b
children
line wrap: on
line diff
--- a/cos/kernel/asmcode.asm	Mon Jan 16 17:38:00 2012 +0100
+++ b/cos/kernel/asmcode.asm	Mon Jan 16 20:47:05 2012 +0100
@@ -40,24 +40,25 @@
 %macro ISR_ERRCODE 1
 global INT%1
 INT%1:
-  cli
+  cli ; disable interrupts
   push strict qword %1 ; push interrupt number
   jmp isr_common_stub
 %endmacro
 
 isr_common_stub:
   ; Do some saving:
-  push rax
+  push rax ; regs[6]
   push rcx
   push rdx
   push rbx
   push rbp
   push rsi
-  push rdi
+  push rdi ; regs[0]
 
   ; AMD64 calling convention, first parameter is in rdi:
   mov rdi, rsp ; Load stack pointer into rdi to indicate where the registers on the stack are (so that we can change them!)
 
+   ; TODO: load kernel interrupt stack pointer
   extern isr_handler
   call isr_handler
 
@@ -70,7 +71,7 @@
   pop rax
 
   add rsp, 16 ; cleanup error code and isr number
-  sti
+  sti ; enable interrupts again
   iretq
 
 ; Exception handlers:
@@ -94,6 +95,7 @@
 ISR_ERRCODE 17
 ISR_NOERRCODE 18
 ISR_NOERRCODE 19
+; 20 - 31 are reserved
 
 ; irq handlers:
 ISR_NOERRCODE 32