Minor readme tweaks

This commit is contained in:
River 2025-02-20 08:48:35 -05:00
parent a429d20e18
commit 0e585b955e
Signed by: shibedrill
GPG Key ID: 5FE0CB25945EFAA2
8 changed files with 30 additions and 7 deletions

View File

@ -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

View File

@ -1,5 +1,6 @@
use core::arch::asm;
#[allow(clippy::missing_safety_doc)]
pub unsafe fn halt() {
unsafe {
asm!("wfi");

View File

@ -1,5 +1,6 @@
use core::arch::asm;
#[allow(clippy::missing_safety_doc)]
pub unsafe fn halt() {
unsafe {
asm!("idle 0");

View File

@ -1,5 +1,6 @@
use core::arch::asm;
#[allow(clippy::missing_safety_doc)]
pub unsafe fn halt() {
unsafe {
asm!("wfi");

View File

@ -1,5 +1,6 @@
use core::arch::asm;
#[allow(clippy::missing_safety_doc)]
pub unsafe fn halt() {
unsafe {
asm!("hlt");

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {