problems loading GDT and IDT
Posted: Sat Dec 17, 2022 11:09 am
Hello everyone!
I've read through a bunch of pages about the GDT and the IDT trying to find out why the code I (and chatgpt) wrote doesn't work as it should.
https://github.com/maalos/meaty-skeleton is the link to the repo. The problem is that it does seem to create some GDT entries and one (division by zero) IDT/ISR entry, however it just doesn't work and the CPU triple faults every time I try to divide by zero. https://github.com/maalos/meaty-skeleto ... i386/idt.c is where the code for the IDT is. Can someone point out a possible cause of this issue? Am I just creating those entries and not loading them into the registers? If the answer is yes, then how do I do it?
I've read through a bunch of pages about the GDT and the IDT trying to find out why the code I (and chatgpt) wrote doesn't work as it should.
https://github.com/maalos/meaty-skeleton is the link to the repo. The problem is that it does seem to create some GDT entries and one (division by zero) IDT/ISR entry, however it just doesn't work and the CPU triple faults every time I try to divide by zero. https://github.com/maalos/meaty-skeleto ... i386/idt.c is where the code for the IDT is. Can someone point out a possible cause of this issue? Am I just creating those entries and not loading them into the registers? If the answer is yes, then how do I do it?