simponicOS/include/idt.h

57 lines
1.1 KiB
C
Raw Normal View History

2021-03-01 17:17:24 -05:00
#ifndef IDT_H
#define IDT_H
#include "types.h"
struct IDT {
uint32_t base;
uint16_t selector;
uint8_t flags;
} __attribute__((packed));
struct IDT_ptr {
uint16_t limit;
uint32_t base;
} __attribute__((packed));
uint8_t idt_entries[8 * 256]; // 8 bytes per entry * 256 entries
struct IDT createIDT(uint32_t base, uint16_t selector, uint8_t flags);
void encodeIDT(uint8_t* idtEntry, struct IDT source);
void initializeIDT();
extern void isr0 ();
extern void isr1 ();
extern void isr2 ();
extern void isr3 ();
extern void isr4 ();
extern void isr5 ();
extern void isr6 ();
extern void isr7 ();
extern void isr8 ();
extern void isr9 ();
extern void isr10();
extern void isr11();
extern void isr12();
extern void isr13();
extern void isr14();
extern void isr15();
extern void isr16();
extern void isr17();
extern void isr18();
extern void isr19();
extern void isr20();
extern void isr21();
extern void isr22();
extern void isr23();
extern void isr24();
extern void isr25();
extern void isr26();
extern void isr27();
extern void isr28();
extern void isr29();
extern void isr30();
extern void isr31();
#endif // IDT_H