diff --git a/src/interrupts/mod.rs b/src/interrupts/mod.rs index 8511435..94fdfb1 100644 --- a/src/interrupts/mod.rs +++ b/src/interrupts/mod.rs @@ -1,4 +1,4 @@ -use crate::gdt; +use crate::memory::gdt; use crate::hlt_loop; use crate::drivers::vga::{self, Color, ColorCode}; use crate::{println}; diff --git a/src/lib.rs b/src/lib.rs index e598070..9b7847d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,7 +3,6 @@ #![feature(abi_x86_interrupt)] #![feature(alloc_error_handler)] -mod gdt; mod interrupts; mod memory; mod drivers; @@ -41,7 +40,7 @@ pub fn init(boot_info: &BootInformation) vga::change_color(ColorCode::new(Color::LightCyan, Color::Black)); println!("Starting init"); memory::init(boot_info); - gdt::init_gdt(); + memory::gdt::init_gdt(); interrupts::init_idt(); vga::change_color(ColorCode::new(Color::LightGreen, Color::Black)); } diff --git a/src/gdt.rs b/src/memory/gdt.rs similarity index 100% rename from src/gdt.rs rename to src/memory/gdt.rs diff --git a/src/memory/mod.rs b/src/memory/mod.rs index 7254ac2..440c402 100644 --- a/src/memory/mod.rs +++ b/src/memory/mod.rs @@ -10,6 +10,7 @@ use x86_64::structures::paging::{mapper::MapToError, page::PageRangeInclusive}; pub mod frame_allocator; pub mod paging; pub mod heap_alloc; +pub mod gdt; pub const PAGE_SIZE: usize = 4096;