diff --git a/README.md b/README.md index b074a45..e149a42 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,7 @@ # Gila v0.2.2 - a Rust Microkernel -Gila is a Rust microkernel OS, inspired by the Xinu embedded OS. It will -hopefully be capable of multitasking some day. I do not intend for Gila to -be POSIX-like or compatible. +Gila is a Rust microkernel OS, inspired by the Xinu embedded OS, as well as Linux. I aim to implement multitasking and different users for processes, and eventually a filesystem. I do not aim to make it POSIX-compatible, but it will likely end up sharing many features with POSIX operating systems. ## Work In Progress diff --git a/src/arch/aarch64/asm.rs b/src/arch/aarch64/asm.rs index bdab157..9336dd4 100644 --- a/src/arch/aarch64/asm.rs +++ b/src/arch/aarch64/asm.rs @@ -1,5 +1,6 @@ use core::arch::asm; +#[allow(clippy::missing_safety_doc)] pub unsafe fn halt() { unsafe { asm!("wfi"); diff --git a/src/arch/loongarch64/asm.rs b/src/arch/loongarch64/asm.rs index fad4d74..697d651 100644 --- a/src/arch/loongarch64/asm.rs +++ b/src/arch/loongarch64/asm.rs @@ -1,5 +1,6 @@ use core::arch::asm; +#[allow(clippy::missing_safety_doc)] pub unsafe fn halt() { unsafe { asm!("idle 0"); diff --git a/src/arch/riscv64/asm.rs b/src/arch/riscv64/asm.rs index bdab157..9336dd4 100644 --- a/src/arch/riscv64/asm.rs +++ b/src/arch/riscv64/asm.rs @@ -1,5 +1,6 @@ use core::arch::asm; +#[allow(clippy::missing_safety_doc)] pub unsafe fn halt() { unsafe { asm!("wfi"); diff --git a/src/arch/x86_64/asm.rs b/src/arch/x86_64/asm.rs index d4d1e6c..d45b344 100644 --- a/src/arch/x86_64/asm.rs +++ b/src/arch/x86_64/asm.rs @@ -1,5 +1,6 @@ use core::arch::asm; +#[allow(clippy::missing_safety_doc)] pub unsafe fn halt() { unsafe { asm!("hlt"); diff --git a/src/arch/x86_64/display.rs b/src/arch/x86_64/display.rs index 7732baf..2a953b1 100644 --- a/src/arch/x86_64/display.rs +++ b/src/arch/x86_64/display.rs @@ -10,6 +10,12 @@ pub struct TextDisplay { row: usize, } +impl Default for TextDisplay { + fn default() -> Self { + Self::new() + } +} + impl TextDisplay { pub const fn new() -> Self { TextDisplay { diff --git a/src/log.rs b/src/log.rs index e8a9696..48dfaef 100644 --- a/src/log.rs +++ b/src/log.rs @@ -21,6 +21,12 @@ pub trait LogSubscriber { fn write(&self, msg: &str); } +impl Default for Logger { + fn default() -> Self { + Self::new() + } +} + impl Logger { pub const fn new() -> Self { Logger { diff --git a/src/main.rs b/src/main.rs index a3372bb..2df8684 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,11 +72,20 @@ unsafe extern "C" fn main() -> ! { let _smp_response = SMP_REQUEST.get_response(); match _smp_response { - None => log(LogLevel::ERROR, "SMP response not received. Multiprocessing is disabled."), + None => log( + LogLevel::ERROR, + "SMP response not received. Multiprocessing is disabled.", + ), Some(resp) => { - log(LogLevel::INFO, "SMP response received. Multiprocessing enabled."); - log(LogLevel::INFO, &format!("{} CPUs found.", resp.cpus().len())); - }, + log( + LogLevel::INFO, + "SMP response received. Multiprocessing enabled.", + ); + log( + LogLevel::INFO, + &format!("{} CPUs found.", resp.cpus().len()), + ); + } } loop {