rulimine/stage23/sys/idt.h

28 lines
388 B
C
Raw Normal View History

2021-03-13 05:21:01 +03:00
#ifndef __SYS__IDT_H__
#define __SYS__IDT_H__
#include <stdint.h>
#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