This commit is contained in:
+2
-2
@@ -1,10 +1,10 @@
|
||||
use cc;
|
||||
use std::process::Command;
|
||||
use std::{env, path::Path};
|
||||
use cc;
|
||||
|
||||
fn main() {
|
||||
// Tell cargo to rerun if these files change
|
||||
println!("cargo:rerun-if-changed=src");
|
||||
println!("cargo:rerun-if-changed=linker.ld");
|
||||
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
|
||||
});
|
||||
|
||||
|
||||
pub fn init_idt() {
|
||||
IDT.load();
|
||||
}
|
||||
|
||||
extern "x86-interrupt" fn breakpoint_handler(
|
||||
stack_frame: InterruptStackFrame
|
||||
) {
|
||||
extern "x86-interrupt" fn breakpoint_handler(stack_frame: InterruptStackFrame) {
|
||||
println_log!("Exception: Breakpoint\n{:#?}", stack_frame);
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
pub mod interrupts;
|
||||
pub mod interrupts;
|
||||
|
||||
+3
-7
@@ -1,19 +1,17 @@
|
||||
#![no_std]
|
||||
|
||||
#![feature(abi_x86_interrupt)]
|
||||
|
||||
use core::arch::asm;
|
||||
use limine::request::{RequestsEndMarker, RequestsStartMarker};
|
||||
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_serial::{serial_print, serial_println, serial_read};
|
||||
|
||||
mod arch;
|
||||
|
||||
use lib_framebuffer;
|
||||
|
||||
|
||||
/// Sets the base revision to the latest revision supported by the crate.
|
||||
/// See specification for further info.
|
||||
/// 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> {
|
||||
|
||||
if !BASE_REVISION.is_supported() {
|
||||
return Err("base revision not supported");
|
||||
}
|
||||
|
||||
lib_serial::init()?;
|
||||
arch::x86_64::interrupts::init_idt();
|
||||
|
||||
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
+5
-9
@@ -1,9 +1,7 @@
|
||||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use FoundryOS::{
|
||||
println, println_log
|
||||
};
|
||||
use FoundryOS::{println, println_log};
|
||||
|
||||
#[no_mangle]
|
||||
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{} (chars)", dimensions.0, dimensions.1);
|
||||
|
||||
println!("
|
||||
println!(
|
||||
"
|
||||
$$$$$$$$\\ $$\\
|
||||
$$ _____| $$ |
|
||||
$$ | $$$$$$\\ $$\\ $$\\ $$$$$$$\\ $$$$$$$ | $$$$$$\\ $$\\ $$\\
|
||||
@@ -38,11 +37,8 @@ unsafe extern "C" fn kmain() -> ! {
|
||||
$$ | $$ |$$\\ $$ | \\$$$ / $$ |
|
||||
$$$$$$ |\\$$$$$$ | \\$ / $$$$$$\\
|
||||
\\______/ \\______/ \\_/ \\______|
|
||||
");
|
||||
"
|
||||
);
|
||||
|
||||
|
||||
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