An x86-64 kernel with ~100% Rust (originally) in a week. The continuation of Litchi.
Make sure the Rust toolchains and qemu-system-x86_64
are installed, then simply execute...
make qemu PROFILE=release
- Bare-metal UEFI application.
- In-memory ELF program loader.
- Locate kernel executable with UEFI's simple file system.
- Jump into the kernel.
- Prepare
BootInfo
and pass to the kernel. - ...
- Serial logger.
- Global Descriptor Table & Task State Segment.
- Physical frame allocator, based on the boot info.
- Kernel page table.
- Kernel heap allocation &
extern crate alloc
. - Resolve ACPI table for interrupts & multiprocessors.
- Trap handlers for critical faults.
- Local APIC for the timer interrupt.
- IO APIC for the UART serial.
- Bootstrap application processors.
- ...
- Load embedded ELF user programs.
- RAII-style user memory allocator and mapper.
- User library to provide init code.
- Switch to user mode.
- Frame-preserving timer interrupt handler for preemption.
- Round-robin task scheduler.
- System calls with shared memory.
- User heap allocator.
- Task recycling.
- Idle task with kernel privilege.
- Basic priority-based scheduler.
- File or device resource management.
- Blocking system calls.
- A basic userspace shell.
- Task spawning and forking.
- Synchronization primitives.
- Asynchronous IO.
- ...
- Event-driven UART serial input handler.
- Kernel task with async Rust!
- Multiprocessors.
- Simple file systems.
- IPC mechanisms.
- ...