Having trouble with interrupts

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
MyBad2
Posts: 1
Joined: Wed Nov 01, 2023 10:50 pm

Having trouble with interrupts

Post by MyBad2 »

Both IDT and GDT tables have been loaded, and confirmed with

Code: Select all

info registers
. But Whenever I trigger interrupts using

Code: Select all

div %ah
or

Code: Select all

int $0x?
, it throws a triple fault. Now, I'm stuck here.

GDT.cpp: https://pastebin.com/SkJruqzA
GDT.hpp: https://pastebin.com/Nj0CyY06
Interrupts.asm: https://pastebin.com/3T46eLRU
Interrupts.cpp: https://pastebin.com/zSUMCdW4
Interrupts.hpp: https://pastebin.com/6jdVhnZw

Thanks,
Octocontrabass
Member
Member
Posts: 5560
Joined: Mon Mar 25, 2013 7:01 pm

Re: Having trouble with interrupts

Post by Octocontrabass »

If you're still having trouble with this, can you run QEMU with "-d int" and provide the log? The important information should be in the last 100 lines or so. (I also suggest using "-no-reboot" so the log stops when the CPU triple faults! You might also need "-accel tcg" to turn off hardware acceleration.)
Post Reply