Problem with GDT, ISR and IRQ

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
artinel
Posts: 2
Joined: Mon Sep 08, 2025 1:35 am

Problem with GDT, ISR and IRQ

Post by artinel »

Hello
I hope you all doing well
I'm writing a 32 bit kernel for x86 and i have setup gdt, idt, isr, irq, pic and such.
The problem is that the isr handler does not get called when a exception occurs(Divide by zero for example). The same thing for irq as well. I searched a lot about this but i couldn't figure out what the problem is. I don't know if the problem is gdt, idt, isr or something else like my linker script.
I really appreciate it if you could look at my project (https://github.com/artinel/artik)(idt branch) and tell me what the problem is.
Thank you for your time.
MichaelPetch
Member
Member
Posts: 857
Joined: Fri Aug 26, 2016 1:41 pm
Libera.chat IRC: mpetch

Re: Problem with GDT, ISR and IRQ

Post by MichaelPetch »

uint8_t base_high should be 'uint16_t base_high'. As a result your IDT entries are 7 bytes in size rather than 8.
artinel
Posts: 2
Joined: Mon Sep 08, 2025 1:35 am

Re: Problem with GDT, ISR and IRQ

Post by artinel »

MichaelPetch wrote: Mon Sep 08, 2025 6:06 am uint8_t base_high should be 'uint16_t base_high'. As a result your IDT entries are 7 bytes in size rather than 8.
Thank you so much.
I don't know why i didn't notice it but you really saved me there.
Post Reply