diff options
| author | Hanjie Wu <hanjiew@andrew.cmu.edu> | 2023-04-22 23:25:43 -0400 |
|---|---|---|
| committer | Hanjie Wu <hanjiew@andrew.cmu.edu> | 2023-04-22 23:25:43 -0400 |
| commit | a7e1cbd3cb53bd4fb43a52a806fd50ab6fa24a24 (patch) | |
| tree | ed823adb61b2b43d7c4f2f5ca45cff0dd9f66df5 /kern/interrupt_asm.S | |
| parent | ed4192548143468362124ee7ee6105c001fe29c0 (diff) | |
pv
Diffstat (limited to 'kern/interrupt_asm.S')
| -rw-r--r-- | kern/interrupt_asm.S | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kern/interrupt_asm.S b/kern/interrupt_asm.S index 3941d16..2a5b098 100644 --- a/kern/interrupt_asm.S +++ b/kern/interrupt_asm.S @@ -15,7 +15,7 @@ default_handler: iret -.macro FAULT_HANDLER_ERR name cause +.macro FAULT_HANDLER_ERR name cause .global \name\()_handler .type \name\()_handler, %function \name\()_handler: @@ -45,11 +45,11 @@ default_handler: iret .endm -.macro FAULT_HANDLER_NOERR name cause +.macro FAULT_HANDLER_NOERR name cause .global \name\()_handler .type \name\()_handler, %function \name\()_handler: - sub $0x4, %esp /* dummy error code */ + push $0 /* dummy error code */ pusha push %gs push %fs @@ -91,6 +91,7 @@ FAULT_HANDLER_ERR np 0xb FAULT_HANDLER_ERR ss 0xc FAULT_HANDLER_ERR gp 0xd FAULT_HANDLER_ERR pf 0xe +FAULT_HANDLER_ERR fault_15 0xf FAULT_HANDLER_NOERR mf 0x10 FAULT_HANDLER_ERR ac 0x11 FAULT_HANDLER_NOERR mc 0x12 @@ -110,7 +111,9 @@ timer_handler: mov $SEGSEL_KERNEL_FS, %eax mov %ax, %fs cld + push %esp call timer_handler_real + add $0x4, %esp jmp return_to_user /* check pending exit before iret */ @@ -128,5 +131,7 @@ kbd_handler: mov $SEGSEL_KERNEL_FS, %eax mov %ax, %fs cld + push %esp call kbd_handler_real + add $0x4, %esp jmp return_to_user /* check pending exit before iret */ |
