17 lines
541 B
Rust
17 lines
541 B
Rust
//! <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);
|
|
}
|