Crates.io | realjump |
lib.rs | realjump |
version | 0.2.0 |
source | src |
created_at | 2021-09-14 05:52:25.062297 |
updated_at | 2022-03-28 22:46:26.207336 |
description | Tiny crate that loads and boots Real Mode code from an x86-64 kernel |
homepage | |
repository | https://github.com/mars-research/realjump |
max_upload_size | |
id | 451059 |
size | 16,522 |
realjump
is a tiny #![no_std]
crate that loads and boots Real Mode code (MBR, GRUB2, etc.) from your x86-64 kernel.
It puts the system from Long Mode back to Real Mode and jumps to the code.
It's mostly useful for quickly getting back to Linux from your OS because the boot process can be very slow on server hardware, and you are too lazy to implement some kexec-like functionality in your kernel.
realjump::boot(your_mbr_slice, 0x7c00).unwrap()
.realjump
will take care of the rest. It will load its own GDT and take the system all the way back to Real Mode.Certain BIOS services, like INT 13h, may no longer function when you return to Real Mode.
For GRUB2, you can work around this by loading the core.img
directly with realjump::boot_grub2
.