move gdt module in memory

Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
This commit is contained in:
Julien CLEMENT 2022-12-10 18:45:25 +01:00
parent c85e7b5e5a
commit 745b8efb8f
4 changed files with 3 additions and 3 deletions

@ -1,4 +1,4 @@
use crate::gdt; use crate::memory::gdt;
use crate::hlt_loop; use crate::hlt_loop;
use crate::drivers::vga::{self, Color, ColorCode}; use crate::drivers::vga::{self, Color, ColorCode};
use crate::{println}; use crate::{println};

@ -3,7 +3,6 @@
#![feature(abi_x86_interrupt)] #![feature(abi_x86_interrupt)]
#![feature(alloc_error_handler)] #![feature(alloc_error_handler)]
mod gdt;
mod interrupts; mod interrupts;
mod memory; mod memory;
mod drivers; mod drivers;
@ -41,7 +40,7 @@ pub fn init(boot_info: &BootInformation)
vga::change_color(ColorCode::new(Color::LightCyan, Color::Black)); vga::change_color(ColorCode::new(Color::LightCyan, Color::Black));
println!("Starting init"); println!("Starting init");
memory::init(boot_info); memory::init(boot_info);
gdt::init_gdt(); memory::gdt::init_gdt();
interrupts::init_idt(); interrupts::init_idt();
vga::change_color(ColorCode::new(Color::LightGreen, Color::Black)); vga::change_color(ColorCode::new(Color::LightGreen, Color::Black));
} }

@ -10,6 +10,7 @@ use x86_64::structures::paging::{mapper::MapToError, page::PageRangeInclusive};
pub mod frame_allocator; pub mod frame_allocator;
pub mod paging; pub mod paging;
pub mod heap_alloc; pub mod heap_alloc;
pub mod gdt;
pub const PAGE_SIZE: usize = 4096; pub const PAGE_SIZE: usize = 4096;