summaryrefslogtreecommitdiff
path: root/kernel/cpu
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-02-16 18:28:14 +0100
committerAnton Kling <anton@kling.gg>2024-02-16 18:28:14 +0100
commit413d09388bf33c658f3e71b18e4b069f18461393 (patch)
tree5df4e31367142bbf1c8285c51366f2d9398135ca /kernel/cpu
parent3922adcdec5bd003b4106ffce79c28553bc40c15 (diff)
General cleanup
Diffstat (limited to 'kernel/cpu')
-rw-r--r--kernel/cpu/idt.c13
-rw-r--r--kernel/cpu/syscall.c1
2 files changed, 2 insertions, 12 deletions
diff --git a/kernel/cpu/idt.c b/kernel/cpu/idt.c
index 30b6253..32186c5 100644
--- a/kernel/cpu/idt.c
+++ b/kernel/cpu/idt.c
@@ -65,23 +65,17 @@ void double_fault(registers_t *regs) {
;
}
-void tmp_jump_process(u32, u32, u32, u32);
-void jump_process(const process_t *p) {
- // tmp_jump_process(p->eip, p->cr3->physical_address, p->ebp, p->esp);
-}
-
-void none_save_switch(void);
-extern PageDirectory *active_directory;
void page_fault(reg_t *regs) {
volatile uint32_t cr2;
asm volatile("mov %%cr2, %0" : "=r"(cr2));
- kprintf("CR2: %x\n", cr2);
if (0xDEADC0DE == cr2) {
+ asm("cli");
EOI(0xB);
process_pop_restore_context(NULL, regs);
return;
}
klog("Page Fault", LOG_ERROR);
+ kprintf("CR2: %x\n", cr2);
if (get_current_task()) {
kprintf("PID: %x\n", get_current_task()->pid);
kprintf("Name: %s\n", get_current_task()->program_name);
@@ -238,9 +232,6 @@ void int_handler(reg_t *r) {
if (sig) {
process_push_restore_context(NULL, *r);
r->eip = sig->handler_ip;
- kprintf("jumping to: %x\n", r->eip);
- // kprintf("esp: %x\n", r->esp);
- // kprintf("ebp: %x\n", r->ebp);
// Add magic value to the stack such that the signal handler
// returns to 0xDEADC0DE
diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c
index 9b93a4d..77e9ac5 100644
--- a/kernel/cpu/syscall.c
+++ b/kernel/cpu/syscall.c
@@ -38,7 +38,6 @@ int syscall_exec(SYS_EXEC_PARAMS *args) {
}
void syscall_tmp_handle_packet(void *packet, u32 len) {
- kprintf("syscall tmp handle packet\n");
handle_ethernet((u8 *)packet, len);
}