feat: misc

Nicer kernel, now can fetch multiboot2 boot info
This commit is contained in:
2026-02-21 22:12:23 +01:00
parent a2dfc5c775
commit e6b231488d
11 changed files with 282 additions and 27 deletions

View File

@@ -0,0 +1,16 @@
//! <https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html>
use core::arch::naked_asm;
#[cfg(target_arch = "x86")]
#[unsafe(no_mangle)]
#[unsafe(naked)]
unsafe extern "C" fn start_stub() -> ! {
// In cdecl, protected i386, the first argument is passed in the stack
// Sadly need to call bcs stack expectations, I wanna make a extern natural compiled thing for
// this.
const _: extern "C" fn(&crate::multiboot2::bif::FixedPart) -> ! = crate::start;
naked_asm!("push ebx", "call {}", sym crate::start);
}