pub const MULTIBOOT2_BOOTLOADER_MAGIC: u32 = 0x36d76289;
Expand description

Magic number that a multiboot2-compliant boot loader will store in eax register right before handoff to the payload (the kernel). This value can be used to check, that the kernel was indeed booted via multiboot2.

Caution: You might need some assembly code (e.g. GAS or NASM) first, which moves eax to another register, like edi. Otherwise it probably happens, that the Rust compiler output changes eax before you can access it.