feat: misc
Nicer kernel, now can fetch multiboot2 boot info
This commit is contained in:
16
members/oxide/src/start_stub.rs
Normal file
16
members/oxide/src/start_stub.rs
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user