diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-10 19:39:30 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-03-10 19:39:30 +0200 |
commit | a302ef42887a1a349d9918d5d1471bbea8f59c2b (patch) | |
tree | ce655d3c31574c6cb77bc437abedf66d32ac9d90 /src/idt | |
parent | Move elf and iso to builddir (diff) | |
download | kernel.cpp-a302ef42887a1a349d9918d5d1471bbea8f59c2b.tar.xz |
vmm: display segment map info
Diffstat (limited to 'src/idt')
-rw-r--r-- | src/idt/exception.cc | 8 | ||||
-rw-r--r-- | src/idt/stubs.S | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/idt/exception.cc b/src/idt/exception.cc new file mode 100644 index 0000000..efffd95 --- /dev/null +++ b/src/idt/exception.cc @@ -0,0 +1,8 @@ +#include <stdlib.h> +#include "cpu/registers.h" + +extern "C" void handle_exception(const cpu_state_t* r) { + printk("exception ", uhex{r->irq}, " error ", uhex{r->error}, "eip: ", uhex{r->eip}, '\n'); + + abort(); +}; diff --git a/src/idt/stubs.S b/src/idt/stubs.S index d4fb56f..568b0dc 100644 --- a/src/idt/stubs.S +++ b/src/idt/stubs.S @@ -73,7 +73,7 @@ exception_common: push %esp call handle_exception - mov %eax, %esp + add $4, %esp popa /* remove error code and irq from stack */ |