Skip to content
Snippets Groups Projects
Commit cd1c1ac1 authored by Eemeli Lehtonen's avatar Eemeli Lehtonen
Browse files

debug prints

parent bad87734
No related branches found
No related tags found
No related merge requests found
use crate::println;
use super::idt::DOUBLE_FAULT_IST; use super::idt::DOUBLE_FAULT_IST;
use spin::Lazy; use spin::Lazy;
use x86_64::{ use x86_64::{
...@@ -13,6 +15,7 @@ use x86_64::{ ...@@ -13,6 +15,7 @@ use x86_64::{
// //
pub fn init() { pub fn init() {
println!("Initializing GDT");
GDT.0.load(); GDT.0.load();
unsafe { unsafe {
......
...@@ -9,6 +9,7 @@ pub static DOUBLE_FAULT_IST: u16 = 1; ...@@ -9,6 +9,7 @@ pub static DOUBLE_FAULT_IST: u16 = 1;
// //
pub fn init() { pub fn init() {
println!("Initializing IDT");
IDT.load(); IDT.load();
} }
......
use crate::println;
use super::{gdt, idt}; use super::{gdt, idt};
// //
...@@ -21,8 +23,10 @@ pub extern "C" fn _start() -> ! { ...@@ -21,8 +23,10 @@ pub extern "C" fn _start() -> ! {
gdt::init(); gdt::init();
idt::init(); idt::init();
println!("Re-enabling x86_64 interrupts");
x86_64::instructions::interrupts::enable(); x86_64::instructions::interrupts::enable();
println!("Calling general kernel_main");
crate::kernel_main() crate::kernel_main()
} }
......
...@@ -43,7 +43,7 @@ pub static BOOTLOADER: Mutex<&'static str> = Mutex::new(KERNEL); ...@@ -43,7 +43,7 @@ pub static BOOTLOADER: Mutex<&'static str> = Mutex::new(KERNEL);
// //
fn kernel_main() -> ! { fn kernel_main() -> ! {
println!("Hello from {}", KERNEL.cyan()); println!("\n\nHello from {}", KERNEL.cyan());
println!(" - {} was booted with {}", KERNEL.cyan(), BOOTLOADER.lock()); println!(" - {} was booted with {}", KERNEL.cyan(), BOOTLOADER.lock());
// error handling test // error handling test
...@@ -53,9 +53,9 @@ fn kernel_main() -> ! { ...@@ -53,9 +53,9 @@ fn kernel_main() -> ! {
// } // }
if let Some(mut fbo) = get_fbo() { if let Some(mut fbo) = get_fbo() {
fbo.fill(240, 240, 40, 40, Color::RED); fbo.fill(240, 340, 40, 40, Color::RED);
fbo.fill(250, 250, 60, 40, Color::GREEN); fbo.fill(250, 350, 60, 40, Color::GREEN);
fbo.fill(205, 215, 80, 20, Color::BLUE); fbo.fill(205, 315, 80, 20, Color::BLUE);
} }
#[cfg(test)] #[cfg(test)]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment