removed pdclib, strange things were happening..., user shell kinda works now
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
|
||||
#include <lib/print.h>
|
||||
|
||||
#include "process.h"
|
||||
#include "scheduler.h"
|
||||
#include "kbd.h"
|
||||
#include "syscall.h"
|
||||
#include "common.h"
|
||||
#include "gdt.h"
|
||||
@@ -144,6 +143,11 @@ void common_interrupt_handler(intr_regs_t *args) {
|
||||
kprintf("Current cr3: 0x%x\n", fetch_cr3());
|
||||
if (args->cs == 0x1b) {
|
||||
kprintf("User ESP: 0x%x\n", args->u_esp);
|
||||
kprintf("ESP: 0x%x\t0x%x\t0x%x\t0x%x\n",
|
||||
*(uint32_t*)args->u_esp,
|
||||
*(uint32_t*)(args->u_esp + 4),
|
||||
*(uint32_t*)(args->u_esp + 8),
|
||||
*(uint32_t*)(args->u_esp + 12));
|
||||
kprintf("User SS: 0x%x\n", args->u_ss);
|
||||
}
|
||||
kprintf("Caused by: %s, %s, running in %s mode\n",
|
||||
@@ -158,8 +162,11 @@ void common_interrupt_handler(intr_regs_t *args) {
|
||||
break;
|
||||
}
|
||||
case 33: {
|
||||
kprintf("ps2 keyboard interrupt\n");
|
||||
uint8_t data = ps2_read_data();
|
||||
char ascii = ps2_get_ascii(data);
|
||||
if (ascii != 0) {
|
||||
kbd_push(ascii);
|
||||
}
|
||||
send_eoi_master();
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user