2023-12-08 17:51:21 +02:00
|
|
|
yggdrasil-kernel
|
|
|
|
================
|
|
|
|
|
|
|
|
Rust Unix-like operating system kernel.
|
|
|
|
|
|
|
|
See also:
|
|
|
|
|
|
|
|
* [ABI for kernel-user communication](https://git.alnyan.me/yggdrasil-abi)
|
|
|
|
* [Rust fork to use with the kernel](https://git.alnyan.me/yggdrasil/yggdrasil-rust)
|
|
|
|
* [Userspace programs](https://git.alnyan.me/yggdrasil/yggdrasil-userspace)
|
|
|
|
* [yboot — x86-64 UEFI bootloader](https://git.alnyan.me/yggdrasil/yboot)
|
|
|
|
|
|
|
|
Main features
|
|
|
|
-------------
|
|
|
|
|
|
|
|
* Architecture support: [aarch64](/src/arch/aarch64) and [x86_64](/src/arch/x86_64)
|
|
|
|
* Kernel/userspace preemptive multithreading
|
|
|
|
* Kernel-space multitasking with `async`/`await` runtime
|
|
|
|
* Symmetric Multiprocessing
|
|
|
|
* Unix-like virtual filesystem:
|
|
|
|
files, directories, block/char devices, symlinks, mounts
|
|
|
|
* In-memory read-write filesystem for tar-based initrd
|
|
|
|
* sysfs/devfs
|
|
|
|
* Binary formats: ELF + `#!/...` shebangs
|
|
|
|
* Rust-style interfaces for most of the stuff like memory management, devices etc.
|
|
|
|
|
|
|
|
aarch64-specific:
|
|
|
|
|
|
|
|
* PSCI for SMP start-up and power control
|
|
|
|
* PL011 serial port
|
|
|
|
* ARM generic timer as system/monotonic timer
|
|
|
|
* GICv2 IRQ controller
|
|
|
|
|
|
|
|
x86_64-specific:
|
|
|
|
|
2023-12-11 21:21:15 +02:00
|
|
|
* UEFI boot through [yboot](https://git.alnyan.me/yggdrasil/yboot)
|
2023-12-08 17:51:21 +02:00
|
|
|
(no plans for legacy boot)
|
|
|
|
* PCIe, with plans to extend to aarch64 as well
|
2023-12-11 21:21:15 +02:00
|
|
|
* NVMe drive support (read/write)
|
2023-12-18 23:26:51 +02:00
|
|
|
* AHCI SATA drive support (read/write)
|
2023-12-08 17:51:21 +02:00
|
|
|
* I/O and Local APIC IRQ controllers
|
2023-12-11 21:21:15 +02:00
|
|
|
* PS/2 keyboard,
|
|
|
|
* i8253-based timer (got some problems with HPET on
|
2023-12-08 17:51:21 +02:00
|
|
|
real hw, had to revert, lol)
|
|
|
|
* COM ports
|
|
|
|
* ACPI, [work in progress](https://github.com/rust-osdev/acpi), mostly broken
|
|
|
|
on real hardware
|
|
|
|
* ACPI shutdown
|
|
|
|
* PCI IRQ pin routing
|
|
|
|
* Events like power button, etc.
|
|
|
|
* Fancy framebuffer console
|
|
|
|
|
|
|
|
Userspace features:
|
|
|
|
|
|
|
|
* Sanitized system calls better suited for Rust
|
|
|
|
* Userspace threads
|
|
|
|
* Synchronization primitives through futex-like interface
|
|
|
|
* Unix-like signals and exceptions
|
|
|
|
|
|
|
|
General plans (in no particular order)
|
|
|
|
--------------------------------------
|
|
|
|
|
|
|
|
* Better unification of architecture code
|
|
|
|
* `async` for VFS (?)
|
|
|
|
* PCIe NVMe block device
|
|
|
|
* PCIe SATA block device
|
|
|
|
* PCIe XHCI USB devices
|
|
|
|
* Better algorithms for memory management
|
|
|
|
|
|
|
|
Navigation
|
|
|
|
----------
|
|
|
|
|
|
|
|
* `src/arch` — architecture-specific code
|
|
|
|
* `src/device` — device driver implementations
|
|
|
|
* `bus` — bus devices like USB, PCIe etc.
|
|
|
|
* `display` — everything related to graphic displays
|
|
|
|
* `power` — power and reset controllers
|
|
|
|
* `serial` — serial transceiver drivers
|
|
|
|
* `devtree.rs` — stuff related to ARM DeviceTree
|
|
|
|
* `tty.rs` — Unix-style terminal driver implementation
|
|
|
|
* `src/fs` — in-kernel filesystems (sysfs/devfs)
|
|
|
|
* `src/mem` — memory management
|
|
|
|
* `src/proc` — process information management
|
|
|
|
* `src/syscall` — system call handling
|
|
|
|
* `src/task` — kernel and userspace tasks, processes and threads
|
|
|
|
* `src/util` — utilities used within the kernel
|
2023-12-11 21:21:15 +02:00
|
|
|
* `src/init.rs` — kernel init thread impl.
|