Expand description
Tiny no_std crate that loads and boots Real Mode code from an x86-64 kernel.
§Example Usage
Before calling realjump
, you need to do the following in your kernel:
- Disable interrupts
- Identity map the lowest 1MiB memory as executable
- Halt all other processors
let mbr = {
// Load your MBR from somewhere
let mut bin = [0xf4; 512];
bin[510] = 0x55;
bin[511] = 0xaa;
bin
};
unsafe {
realjump::boot_mbr(&mbr).unwrap();
}
Enums§
- Error
- An error.
Constants§
- BOOTSTRAP_
CODE_ SIZE - Size of the bootstrap code.
- MAX_
PAYLOAD_ SIZE - The maximum payload size.
Functions§
- boot⚠
- Copy a payload to a destination, then jump to it.
- boot_
grub2 ⚠ - Boot a GRUB2 core image.
- boot_
mbr ⚠ - Boot an MBR.
- boot_
offset ⚠ - Copy a payload to a destination, then jump to an offset.