added boot messages
This commit is contained in:
+22
-3
@@ -59,18 +59,37 @@ pub fn boot() -> Result<(), &'static str> {
|
||||
use arch::x86_64::{gdt, interrupts, memmap, memory};
|
||||
|
||||
let memory_map = memmap::get_memory_map();
|
||||
|
||||
print_log!(" Initialising Serial... ");
|
||||
lib_serial::init()?;
|
||||
println_log!("[Success]");
|
||||
|
||||
print_log!(" Setting Up Global Descriptor Table... ");
|
||||
gdt::init();
|
||||
println_log!("[Success]");
|
||||
|
||||
print_log!(" Setting Up Interrupt Descriptor Table... ");
|
||||
interrupts::init_idt();
|
||||
println_log!("[Success]");
|
||||
|
||||
print_log!(" Setting Up Page Table... ");
|
||||
let mut frame_allocator = unsafe { memory::FoundryOSFrameAllocator::init(memory_map) };
|
||||
println_log!("[Success]");
|
||||
|
||||
x86_64::instructions::interrupts::enable();
|
||||
|
||||
print_log!(" Initialising Memory Subsystem... ");
|
||||
let physical_memory_offset = VirtAddr::new(*memmap::PHYSICAL_MEMORY_OFFSET);
|
||||
let mut l4_table = unsafe { memory::init(physical_memory_offset) };
|
||||
println_log!("[Success]");
|
||||
|
||||
init_heap(&mut l4_table, &mut frame_allocator);
|
||||
print_log!(" Initialising Heap... ");
|
||||
if let Err(e) = init_heap(&mut l4_table, &mut frame_allocator) {
|
||||
return Err("Failed to initialise heap");
|
||||
}
|
||||
println_log!("[Success]");
|
||||
|
||||
print_log!(" Enabling Interrupts... ");
|
||||
x86_64::instructions::interrupts::enable();
|
||||
println_log!("[Success]");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user