Add opcode handling.. started debugging memory management.

This commit is contained in:
Curle 2020-10-30 22:24:59 +00:00
parent 903b5439ba
commit 91063e12d2
Signed by: TheCurle
GPG Key ID: 5942F13718443F79

View File

@ -299,7 +299,18 @@ __attribute__((interrupt)) void ISR5Handler(INTERRUPT_FRAME* Frame) {
ISR_Common(Frame, 5);
}
__attribute__((interrupt)) void ISR6Handler(INTERRUPT_FRAME* Frame) {
ISR_Common(Frame, 6);
__asm__ __volatile__("sti");
SerialPrintf("Invalid Opcode!\n");
size_t retAddr = 0;
size_t opcodeAddr = Frame->rip;
__asm__ __volatile__("popq %%rax\n\t" "pushq %%rax": "=a" (retAddr) : :);
SerialPrintf("Opcode is at 0x%x, called from 0x%p\r\n", opcodeAddr, retAddr);
for(;;) {}
}
__attribute__((interrupt)) void ISR7Handler(INTERRUPT_FRAME* Frame) {
ISR_Common(Frame, 7);