rulimine/stage23/sys/idt.h
2021-03-13 03:21:01 +01:00

28 lines
393 B
C

#ifndef __SYS__IDT_H__
#define __SYS__IDT_H__
#include <stdint.h>
#if defined (bios)
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