diff --git a/src/interrupts/gdt.rs b/src/interrupts/gdt.rs new file mode 100644 index 0000000..bf23aaf --- /dev/null +++ b/src/interrupts/gdt.rs @@ -0,0 +1,13 @@ +pub struct Gdt { + table: [u64; 8], + next_free: usize, +} + +impl Gdt { + pub fn new() -> Gdt { + Gdt { + table: [0; 8], + next_free: 1, + } + } +} diff --git a/src/interrupts/mod.rs b/src/interrupts/mod.rs index 643cf7a..78f4be8 100644 --- a/src/interrupts/mod.rs +++ b/src/interrupts/mod.rs @@ -3,6 +3,8 @@ use x86_64::structures::idt::{Idt, ExceptionStackFrame}; use x86_64::structures::tss::TaskStateSegment; use memory::MemoryController; +mod gdt; + lazy_static! { static ref IDT: Idt = { let mut idt = Idt::new();