2021-03-13 05:21:01 +03:00
|
|
|
#ifndef __SYS__IDT_H__
|
|
|
|
#define __SYS__IDT_H__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2021-07-15 11:03:47 +03:00
|
|
|
#if bios == 1
|
2021-03-13 05:21:01 +03:00
|
|
|
|
|
|
|
struct idtr {
|
|
|
|
uint16_t limit;
|
|
|
|
uint32_t ptr;
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
|
|
struct idt_entry {
|
|
|
|
uint16_t offset_lo;
|
|
|
|
uint16_t selector;
|
|
|
|
uint8_t unused;
|
|
|
|
uint8_t type_attr;
|
|
|
|
uint16_t offset_hi;
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
|
|
extern struct idtr idt;
|
|
|
|
|
|
|
|
void init_idt(void);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|