diff --git a/kernel/src/lib.rs b/kernel/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..cdc3aea4af34b5026945d8f6cbaf9051403770a3 --- /dev/null +++ b/kernel/src/lib.rs @@ -0,0 +1,21 @@ +#![no_std] +#![feature(abi_x86_interrupt)] + +pub mod framebuffer; +pub mod idt; +pub mod instructions; + +#[panic_handler] +fn panic_handler(_: &core::panic::PanicInfo) -> ! { + instructions::hlt(); +} + +pub fn kernel_main(boot_info: &'static mut bootloader_api::BootInfo) -> ! { + framebuffer::init(boot_info); + framebuffer::clear(); + framebuffer::print_char(b'H'); + + idt::init(); + + instructions::hlt(); +}