diff --git a/kernel/src/lib.rs b/kernel/src/lib.rs index 4ad95f1..f4e174e 100644 --- a/kernel/src/lib.rs +++ b/kernel/src/lib.rs @@ -1,6 +1,5 @@ #![no_std] #![feature(abi_x86_interrupt)] -#![feature(impl_trait_in_bindings)] #![warn( clippy::correctness, clippy::nursery, @@ -20,6 +19,7 @@ use crate::{ drivers::{ ascii::screensize_chars, framebuffer::display::screensize_px, }, + gdt, interrupts, memory::{ FRAME_ALLOCATOR, allocation::{ @@ -35,7 +35,7 @@ use crate::{ use alloc::{boxed::Box, format}; use core::arch::asm; use limine::BaseRevision; -use std::unwind::UNWINDER; +use std::{debug, unwind::UNWINDER}; use x86_64::VirtAddr; pub mod arch; @@ -88,8 +88,6 @@ pub fn boot() -> Result<(), Box> { return Err("Base revision not supported.".into()); } - use arch::x86_64::{gdt, interrupts}; - let memory_map = mapping::get_memory_map(); print_log!(" Initialising Serial... "); @@ -101,12 +99,11 @@ pub fn boot() -> Result<(), Box> { debugln!("[Success]"); } - debugln!(" Display..."); - let dimensions = screensize_chars(); - let dimensions2 = screensize_px(); - debugln!(" => (px) : {}x{} ", dimensions2.0, dimensions2.1); - debugln!(" => (chars) : {}x{} ", dimensions.0, dimensions.1); - debugln!(" [Success]"); + debugln!( + "Display is {:?} chars, {:?} px.", + screensize_chars(), + screensize_px() + ); debug!(" Setting Up Global Descriptor Table... "); gdt::init(); @@ -152,9 +149,11 @@ pub fn boot() -> Result<(), Box> { x86_64::instructions::interrupts::enable(); debugln!("[Success]"); - // Initialises the Unwinder once and only once because this makes a heap - // allocation. + // Initialises the stack unwinder once and only once because this makes a + // heap allocation. + debug!(" Initializing Stack Unwinder... "); UNWINDER.lock(); + debugln!("[Success]"); Ok(()) }