1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

dump also the CORE_ID by an exception

This commit is contained in:
Stefan Lankes 2015-08-13 22:23:50 +02:00
parent b1c6daea27
commit ea68816194
2 changed files with 5 additions and 4 deletions

View file

@ -201,8 +201,8 @@ static void fault_handler(struct state *s)
{
if (s->int_no < 32) {
kputs(exception_messages[s->int_no]);
kprintf(" Exception (%d) at 0x%llx:0x%llx, error code 0x%llx, rflags 0x%llx\n",
s->int_no, s->cs, s->rip, s->error, s->rflags);
kprintf(" Exception (%d) on core %d at 0x%llx:0x%llx, error code 0x%llx, rflags 0x%llx\n",
s->int_no, CORE_ID, s->cs, s->rip, s->error, s->rflags);
apic_eoi(s->int_no);
irq_enable();

View file

@ -309,8 +309,8 @@ void page_fault_handler(struct state *s)
}
default_handler:
kprintf("Page Fault Exception (%d) at cs:ip = %#x:%#lx, fs = %#lx, gs = %#lx, rflags 0x%lx, task = %u, addr = %#lx, error = %#x [ %s %s %s %s %s ]\n",
s->int_no, s->cs, s->rip, s->fs, s->gs, s->rflags, task->id, viraddr, s->error,
kprintf("Page Fault Exception (%d) on core %d at cs:ip = %#x:%#lx, fs = %#lx, gs = %#lx, rflags 0x%lx, task = %u, addr = %#lx, error = %#x [ %s %s %s %s %s ]\n",
s->int_no, CORE_ID, s->cs, s->rip, s->fs, s->gs, s->rflags, task->id, viraddr, s->error,
(s->error & 0x4) ? "user" : "supervisor",
(s->error & 0x10) ? "instruction" : "data",
(s->error & 0x2) ? "write" : ((s->error & 0x10) ? "fetch" : "read"),
@ -322,6 +322,7 @@ default_handler:
apic_eoi(s->int_no);
irq_enable();
while(1);
abort();
}