forked from Bananymous/banan-os
Add GDT and IDT
This commit is contained in:
27
kernel/include/kernel/IDT.h
Normal file
27
kernel/include/kernel/IDT.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
union GateDescriptor
|
||||
{
|
||||
struct
|
||||
{
|
||||
uint16_t offset_lo;
|
||||
uint16_t selector;
|
||||
uint8_t reserved;
|
||||
uint8_t type : 4;
|
||||
uint8_t zero : 1;
|
||||
uint8_t dpl : 2;
|
||||
uint8_t present : 1;
|
||||
uint16_t offset_hi;
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
uint32_t low;
|
||||
uint32_t high;
|
||||
};
|
||||
|
||||
} __attribute__((packed));
|
||||
|
||||
void idt_initialize();
|
||||
Reference in New Issue
Block a user