more userspace stuff

This commit is contained in:
2026-07-01 20:00:22 -05:00
parent af6c1c94cf
commit b6ee4fc3de
21 changed files with 161 additions and 121 deletions

View File

@@ -110,7 +110,7 @@ void common_interrupt_handler(registers *args) {
case 13:
case 15:
case 16:
kprintf("CPU Error: %s", err_messages[args->int_no]);
kprintf("CPU Error: %s, %d\n", err_messages[args->int_no], args->error_code);
break;
case 14:{
uint32_t faulting_address;
@@ -119,6 +119,9 @@ void common_interrupt_handler(registers *args) {
kprintf("Faulted Virtual Address: 0x%x\n", faulting_address);
kprintf("Error Code: 0x%x\n", args->error_code);
kprintf("Instruction Pointer: 0x%x\n", args->eip);
kprintf("Stack Pointer: 0x%x\n", args->useresp);
kprintf("EAX: 0x%x\n", args->eax);
kprintf("EFLAGS: 0x%x\n", args->eflags);
kprintf("Caused by: %s, %s, running in %s mode\n",
(args->error_code & 0x01) ? "Protection Violation" : "Page Not Present",
(args->error_code & 0x02) ? "Write" : "Read",
@@ -127,15 +130,18 @@ void common_interrupt_handler(registers *args) {
break;
}
case 33: {
kprintf("ps2 keyboard interrupt\n");
uint8_t data = ps2_read_data();
send_eoi_master();
break;
}
case 46: { // IDE PRIMARY
kprintf("IDE PRIMARY interrupt\n");
send_eoi_slave();
break;
}
case 47: { // IDE SLAVE
kprintf("IDE SLAVE interrupt\n");
send_eoi_slave();
break;
}