holy crap im an idiot, i was getting constatnt gpf because i forgot to pop the stack
This commit is contained in:
@ -24,9 +24,13 @@ void exception_handler(unsigned int i)
|
||||
if (i <= 31)
|
||||
__asm__ volatile ("cli; hlt"); // hangs the computer
|
||||
|
||||
if (i == PIC_PIT) {
|
||||
printf("Sending EOI instruction to PIT\n");
|
||||
PIC_sendEOI(0);
|
||||
if (i == PIC_KEYB) {
|
||||
#ifdef __TESTING__
|
||||
kinfo("Sending EOI instruction to KEYB");
|
||||
#endif
|
||||
printf("Scancode: %x\n", inb(0x60)); // read from kb
|
||||
|
||||
PIC_sendEOI(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,6 +6,7 @@ isr_stub_%+%1:
|
||||
cld
|
||||
push dword %1
|
||||
call exception_handler
|
||||
pop eax ; make sure to pop off the dword!!
|
||||
popad
|
||||
iret
|
||||
%endmacro
|
||||
@ -16,6 +17,7 @@ isr_stub_%+%1:
|
||||
cld
|
||||
push dword %1
|
||||
call exception_handler
|
||||
pop eax
|
||||
popad
|
||||
iret
|
||||
%endmacro
|
||||
|
Reference in New Issue
Block a user