I am working on Atom-32bit board (AT&T assembly), there is no software on this board yet.
Do I need to build GDT to build/use an IDT ?
The idea is just to use an ISR with APIC timer.
/*Change the address of idt_entries table */
fill_interrupt(ISR_Nbr,(unsigned int) isr33, 0x08, 0x8E);
static void fill_interrupt(unsigned char num, unsigned int base, unsigned short sel, unsigned char flags)
{
unsigned short *Interrupt_Address;
/*address = idt_ptr.base + num * 8 byte*/
Interrupt_Address = (unsigned short *)(idt_ptr.base + num*8);
*(Interrupt_Address) = base&0xFFFF;
*(Interrupt_Address+1) = sel;
*(Interrupt_Address+1) = (flags>>8)&0xFF00;
*(Interrupt_Address+1) = (base>>16)&0xFFFF;
}
Resolved :), as there is a BIOS, it already built the GDT/IDT, so I found there address using sidt and sgdt instructions, and i added my ISR to sidt