Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // idt.h
- #include <common.h>
- /*
- Represents an entry in the Interrupt Descriptor Table (IDT). The
- struct is packed because we don't want any padding added to it.
- */
- struct idt_entry
- {
- unsigned short offset_hibits; /* offset high bits */
- unsigned short offset_lobits; /* offset low bits */
- unsigned short selector; /* selector */
- unsigned char zero;
- unsigned char flags; /* flags */
- } __attribute__((packed));
- struct idt_entry IDT[286];
- void idt_init();
- void idt_add_entry(int isr_num, unsigned long isr_handler, short selector, char flags);
- void idt_setup_pic();
- void idt_setup_irq();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement