how do i code interrupts with grub (32-bit)?
how do i code interrupts with grub (32-bit)?
i am attempting to write my own os with GRUB, and i just got a keyboard driver working. i don't want to check if you have typed anything in a while(true) loop, so i tried interrupts. interrupts need an idt, so i went to configure one. the wiki says i need to have a valid gdt section for each section in my idt: "Selector: A Segment Selector with multiple fields which must point to a valid code segment in your GDT." GRUB doesn't give me that info, what do i do now?
-
- Member
- Posts: 799
- Joined: Fri Aug 26, 2016 1:41 pm
- Libera.chat IRC: mpetch
Re: how do i code interrupts with grub (32-bit)?
You have to create your own GDT and then reload all the segment registers (CS/DS/ES/FS/GS/SS) with selectors in your GDT. You can use a kernel code selector in your new GDT as the selector in your IDT entries.