Minor readme tweaks
This commit is contained in:
parent
a429d20e18
commit
0e585b955e
@ -1,9 +1,7 @@
|
|||||||
|
|
||||||
# Gila v0.2.2 - a Rust Microkernel
|
# Gila v0.2.2 - a Rust Microkernel
|
||||||
|
|
||||||
Gila is a Rust microkernel OS, inspired by the Xinu embedded OS. It will
|
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.
|
||||||
hopefully be capable of multitasking some day. I do not intend for Gila to
|
|
||||||
be POSIX-like or compatible.
|
|
||||||
|
|
||||||
## Work In Progress
|
## Work In Progress
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use core::arch::asm;
|
use core::arch::asm;
|
||||||
|
|
||||||
|
#[allow(clippy::missing_safety_doc)]
|
||||||
pub unsafe fn halt() {
|
pub unsafe fn halt() {
|
||||||
unsafe {
|
unsafe {
|
||||||
asm!("wfi");
|
asm!("wfi");
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use core::arch::asm;
|
use core::arch::asm;
|
||||||
|
|
||||||
|
#[allow(clippy::missing_safety_doc)]
|
||||||
pub unsafe fn halt() {
|
pub unsafe fn halt() {
|
||||||
unsafe {
|
unsafe {
|
||||||
asm!("idle 0");
|
asm!("idle 0");
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use core::arch::asm;
|
use core::arch::asm;
|
||||||
|
|
||||||
|
#[allow(clippy::missing_safety_doc)]
|
||||||
pub unsafe fn halt() {
|
pub unsafe fn halt() {
|
||||||
unsafe {
|
unsafe {
|
||||||
asm!("wfi");
|
asm!("wfi");
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
use core::arch::asm;
|
use core::arch::asm;
|
||||||
|
|
||||||
|
#[allow(clippy::missing_safety_doc)]
|
||||||
pub unsafe fn halt() {
|
pub unsafe fn halt() {
|
||||||
unsafe {
|
unsafe {
|
||||||
asm!("hlt");
|
asm!("hlt");
|
||||||
|
@ -10,6 +10,12 @@ pub struct TextDisplay {
|
|||||||
row: usize,
|
row: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for TextDisplay {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl TextDisplay {
|
impl TextDisplay {
|
||||||
pub const fn new() -> Self {
|
pub const fn new() -> Self {
|
||||||
TextDisplay {
|
TextDisplay {
|
||||||
|
@ -21,6 +21,12 @@ pub trait LogSubscriber {
|
|||||||
fn write(&self, msg: &str);
|
fn write(&self, msg: &str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Logger {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Logger {
|
impl Logger {
|
||||||
pub const fn new() -> Self {
|
pub const fn new() -> Self {
|
||||||
Logger {
|
Logger {
|
||||||
|
17
src/main.rs
17
src/main.rs
@ -72,11 +72,20 @@ unsafe extern "C" fn main() -> ! {
|
|||||||
let _smp_response = SMP_REQUEST.get_response();
|
let _smp_response = SMP_REQUEST.get_response();
|
||||||
|
|
||||||
match _smp_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) => {
|
Some(resp) => {
|
||||||
log(LogLevel::INFO, "SMP response received. Multiprocessing enabled.");
|
log(
|
||||||
log(LogLevel::INFO, &format!("{} CPUs found.", resp.cpus().len()));
|
LogLevel::INFO,
|
||||||
},
|
"SMP response received. Multiprocessing enabled.",
|
||||||
|
);
|
||||||
|
log(
|
||||||
|
LogLevel::INFO,
|
||||||
|
&format!("{} CPUs found.", resp.cpus().len()),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
|
Loading…
Reference in New Issue
Block a user