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.
Problem with GDT, ISR and IRQ
-
MichaelPetch
- Member

- Posts: 857
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
Re: Problem with GDT, ISR and IRQ
uint8_t base_high should be 'uint16_t base_high'. As a result your IDT entries are 7 bytes in size rather than 8.
Re: Problem with GDT, ISR and IRQ
Thank you so much.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.
I don't know why i didn't notice it but you really saved me there.