Bootloader
A9NLoader-rs
An x86_64 UEFI bootloader for A9N.
Features
- Kernel and Init ELF loading
- Memory maps and boot information
- Standalone QEMU boot tests
From UEFI to A9N and Init
A9NLoader-rs is a Rust UEFI bootloader implementing the A9N Boot Protocol for x86_64. It loads the kernel ELF separately from Init, the first user-space program, and prepares their entry points and memory placement.
BootInfo carries the image-loading results, physical memory information, and architecture-specific data into the kernel. The loader establishes the handoff to A9N and its initial process while leaving OS service composition to user space.
Preserving the firmware memory map
The loader translates UEFI memory types into A9N’s Free, Device, and Reserved classifications. ACPI reclaim and NVS regions become Device resources, preserving firmware data for user-space discovery rather than treating it as allocator RAM.
The map is sorted by address before construction, and conflicting overlaps are rejected. Regression coverage includes real-firmware ordering, free RAM beginning at physical address zero, gaps, malformed ranges, and the C ABI layout.
An independent Rust boot component
The original C/EDK2 loader was rewritten in Rust, covering the UEFI connection and ELF-loading path. It remains a separate executable from both the kernel and user-space OS, allowing boot behavior to evolve as an independent component.
SPENCER combines it with A9N and Init in x86_64 UEFI images. Its boot protocol targets x86_64; AArch64 boot is handled by U-Boot instead.
Technical details
- Language
- Rust
- Boot environment
- x86_64 UEFI
- Protocol
- A9N Boot Protocol x86_64
- Inputs
- kernel.elf and init.elf
- License
- MIT
- Source version
- 0.2.0
- Source reference
- main ·
272b24a↗
Screenshots
