summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/interrupts/isr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/arch/amd64/interrupts/isr.c')
-rw-r--r--src/kernel/arch/amd64/interrupts/isr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/kernel/arch/amd64/interrupts/isr.c b/src/kernel/arch/amd64/interrupts/isr.c
index 519d783..994519d 100644
--- a/src/kernel/arch/amd64/interrupts/isr.c
+++ b/src/kernel/arch/amd64/interrupts/isr.c
@@ -17,6 +17,10 @@ bool isr_test_interrupt_called = false;
static void log_interrupt(int interrupt, uint64_t *stackframe) {
kprintf("interrupt %x, rip = k/%08x, cs 0x%x, code 0x%x\n",
interrupt, stackframe[0], stackframe[1], stackframe[-1]);
+ if ((stackframe[1] & 0x3) == 0) {
+ uint64_t *stack = (void*)stackframe[3];
+ kprintf("kernel rip = %p, *rip = %p\n", stack, *stack);
+ }
if (interrupt == 0xe) {
uint64_t addr = 0x69;
asm("mov %%cr2, %0" : "=r"(addr));
@@ -54,7 +58,7 @@ void isr_stage3(int interrupt, uint64_t *stackframe) {
default:
if ((stackframe[1] & 0x3) == 0) {
- mem_debugprint();
+ // mem_debugprint();
log_interrupt(interrupt, stackframe);
cpu_halt();
} else {