forked from CHatingPython/towos
feat: add IDT
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#ifndef ARCH_X86_64_IDT_HPP
|
||||
#define ARCH_X86_64_IDT_HPP
|
||||
|
||||
#include "types.hpp"
|
||||
|
||||
namespace x86_64 {
|
||||
|
||||
struct idt_entry {
|
||||
u16 offsetLow;
|
||||
u16 selector;
|
||||
u8 ist;
|
||||
u8 attributes;
|
||||
u16 offsetMid;
|
||||
u32 offsetHigh;
|
||||
u32 rsvd;
|
||||
} PACKED;
|
||||
|
||||
struct idt {
|
||||
idt_entry entries[256];
|
||||
|
||||
idt();
|
||||
|
||||
void load();
|
||||
};
|
||||
|
||||
using vector_t = u8;
|
||||
|
||||
} // namespace x86_64
|
||||
|
||||
#endif // ARCH_X86_64_IDT_HPP
|
||||
Reference in New Issue
Block a user