forked from LowLevelDevs/FoundryOS
Formatting changes, called 'cargo fmt'
This commit is contained in:
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
|
use cc;
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use std::{env, path::Path};
|
use std::{env, path::Path};
|
||||||
use cc;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// Tell cargo to rerun if these files change
|
// Tell cargo to rerun if these files change
|
||||||
println!("cargo:rerun-if-changed=src");
|
println!("cargo:rerun-if-changed=src");
|
||||||
println!("cargo:rerun-if-changed=linker.ld");
|
println!("cargo:rerun-if-changed=linker.ld");
|
||||||
println!("cargo:rerun-if-changed=../config/limine.conf");
|
println!("cargo:rerun-if-changed=../config/limine.conf");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
pub mod x86_64;
|
pub mod x86_64;
|
||||||
|
|||||||
@@ -9,14 +9,10 @@ static IDT: Lazy<InterruptDescriptorTable> = Lazy::new(|| {
|
|||||||
idt
|
idt
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
pub fn init_idt() {
|
pub fn init_idt() {
|
||||||
IDT.load();
|
IDT.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "x86-interrupt" fn breakpoint_handler(
|
extern "x86-interrupt" fn breakpoint_handler(stack_frame: InterruptStackFrame) {
|
||||||
stack_frame: InterruptStackFrame
|
|
||||||
) {
|
|
||||||
println_log!("Exception: Breakpoint\n{:#?}", stack_frame);
|
println_log!("Exception: Breakpoint\n{:#?}", stack_frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
pub mod interrupts;
|
pub mod interrupts;
|
||||||
|
|||||||
+3
-7
@@ -1,19 +1,17 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
|
|
||||||
#![feature(abi_x86_interrupt)]
|
#![feature(abi_x86_interrupt)]
|
||||||
|
|
||||||
use core::arch::asm;
|
use core::arch::asm;
|
||||||
use limine::request::{RequestsEndMarker, RequestsStartMarker};
|
use limine::request::{RequestsEndMarker, RequestsStartMarker};
|
||||||
use limine::BaseRevision;
|
use limine::BaseRevision;
|
||||||
|
|
||||||
pub use lib_serial::{serial_print, serial_println, serial_read};
|
|
||||||
pub use lib_ascii::{print, print_log, println, println_log, WRITER};
|
pub use lib_ascii::{print, print_log, println, println_log, WRITER};
|
||||||
|
pub use lib_serial::{serial_print, serial_println, serial_read};
|
||||||
|
|
||||||
mod arch;
|
mod arch;
|
||||||
|
|
||||||
use lib_framebuffer;
|
use lib_framebuffer;
|
||||||
|
|
||||||
|
|
||||||
/// Sets the base revision to the latest revision supported by the crate.
|
/// Sets the base revision to the latest revision supported by the crate.
|
||||||
/// See specification for further info.
|
/// See specification for further info.
|
||||||
/// Be sure to mark all limine requests with #[used], otherwise they may be removed by the compiler.
|
/// Be sure to mark all limine requests with #[used], otherwise they may be removed by the compiler.
|
||||||
@@ -49,14 +47,12 @@ pub fn hcf() -> ! {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn boot() -> Result<(), &'static str> {
|
pub fn boot() -> Result<(), &'static str> {
|
||||||
|
|
||||||
if !BASE_REVISION.is_supported() {
|
if !BASE_REVISION.is_supported() {
|
||||||
return Err("base revision not supported");
|
return Err("base revision not supported");
|
||||||
}
|
}
|
||||||
|
|
||||||
lib_serial::init()?;
|
lib_serial::init()?;
|
||||||
arch::x86_64::interrupts::init_idt();
|
arch::x86_64::interrupts::init_idt();
|
||||||
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-9
@@ -1,9 +1,7 @@
|
|||||||
#![no_std]
|
#![no_std]
|
||||||
#![no_main]
|
#![no_main]
|
||||||
|
|
||||||
use FoundryOS::{
|
use FoundryOS::{println, println_log};
|
||||||
println, println_log
|
|
||||||
};
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
unsafe extern "C" fn kmain() -> ! {
|
unsafe extern "C" fn kmain() -> ! {
|
||||||
@@ -21,7 +19,8 @@ unsafe extern "C" fn kmain() -> ! {
|
|||||||
println!("Dimensions: {}x{} (px)", dimensions2.0, dimensions2.1);
|
println!("Dimensions: {}x{} (px)", dimensions2.0, dimensions2.1);
|
||||||
println!("Dimensions: {}x{} (chars)", dimensions.0, dimensions.1);
|
println!("Dimensions: {}x{} (chars)", dimensions.0, dimensions.1);
|
||||||
|
|
||||||
println!("
|
println!(
|
||||||
|
"
|
||||||
$$$$$$$$\\ $$\\
|
$$$$$$$$\\ $$\\
|
||||||
$$ _____| $$ |
|
$$ _____| $$ |
|
||||||
$$ | $$$$$$\\ $$\\ $$\\ $$$$$$$\\ $$$$$$$ | $$$$$$\\ $$\\ $$\\
|
$$ | $$$$$$\\ $$\\ $$\\ $$$$$$$\\ $$$$$$$ | $$$$$$\\ $$\\ $$\\
|
||||||
@@ -38,11 +37,8 @@ unsafe extern "C" fn kmain() -> ! {
|
|||||||
$$ | $$ |$$\\ $$ | \\$$$ / $$ |
|
$$ | $$ |$$\\ $$ | \\$$$ / $$ |
|
||||||
$$$$$$ |\\$$$$$$ | \\$ / $$$$$$\\
|
$$$$$$ |\\$$$$$$ | \\$ / $$$$$$\\
|
||||||
\\______/ \\______/ \\_/ \\______|
|
\\______/ \\______/ \\_/ \\______|
|
||||||
");
|
"
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
FoundryOS::hcf();
|
FoundryOS::hcf();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
Submodule lib/lib_application updated: df1cbd1170...4b1c60676a
+1
-1
Submodule lib/lib_ascii updated: fefe217980...d48792ecd0
+1
-1
Submodule lib/lib_framebuffer updated: c515b89136...53553278d1
+1
-1
Submodule lib/lib_serial updated: 92032eb5b4...6731ed5ef6
Reference in New Issue
Block a user