Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. // idt.h
  2.  
  3. #include <common.h>
  4.  
  5. /*
  6. Represents an entry in the Interrupt Descriptor Table (IDT). The
  7. struct is packed because we don't want any padding added to it.
  8. */
  9. struct idt_entry
  10. {
  11. unsigned short offset_hibits; /* offset high bits */
  12. unsigned short offset_lobits; /* offset low bits */
  13.  
  14. unsigned short selector; /* selector */
  15. unsigned char zero;
  16. unsigned char flags; /* flags */
  17. } __attribute__((packed));
  18.  
  19. struct idt_entry IDT[286];
  20.  
  21. void idt_init();
  22. void idt_add_entry(int isr_num, unsigned long isr_handler, short selector, char flags);
  23.  
  24. void idt_setup_pic();
  25. void idt_setup_irq();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement