No description
Find a file
Jorge Martinez 8e90cf9695 kernel/arch: harden AArch64 IRQ/SVC dispatch scaffold for scheduler handoff
- Replace placeholder exception routing with explicit IRQ and SVC dispatch paths.
- Add syscall table scaffold with pointer-return handlers so future scheduler/syscall paths can return a different trap frame.
- Move SVC ELR advance before handler dispatch so handlers can intentionally override return PC.
- Add required SAFETY contracts on unsafe blocks in exception handling and probe paths.
- Keep timer IRQ routed through architecture hook with quiesce behavior for tickless one-shot re-arm flow.
- Keep optional dispatch probes wired but disabled by default due current bring-up runtime behavior.

Verification:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo test --workspace
- cargo build -p kernel --target aarch64-unknown-none
- timeout 20s qemu-kernel-runner.sh target/aarch64-unknown-none/debug/kernel
2026-03-28 09:51:28 -06:00
.cargo kernel/arch: parse DTB via fdt and harden QEMU boot handoff 2026-03-17 10:18:51 -06:00
docs kernel/arch: harden AArch64 IRQ/SVC dispatch scaffold for scheduler handoff 2026-03-28 09:51:28 -06:00
kernel kernel/arch: harden AArch64 IRQ/SVC dispatch scaffold for scheduler handoff 2026-03-28 09:51:28 -06:00
lib kernel/arch: implement AArch64 bootstrap and harden early image layout 2026-03-28 09:18:46 -06:00
scripts kernel/arch: parse DTB via fdt and harden QEMU boot handoff 2026-03-17 10:18:51 -06:00
.gitignore kernel/drivers: implement early PL011 UART bring-up and console macros 2026-03-16 09:35:21 -06:00
Cargo.lock lib/common: add align_down/align_up; kernel: consolidate all callers 2026-03-20 08:58:37 -06:00
Cargo.toml workspace: initialize Cargo workspace with kernel and shared crate skeletons 2026-03-15 14:30:06 -06:00
LICENSE Initial Commit 2026-03-12 14:21:37 -06:00
README.md docs: update docs for architectural changes and IPC enhancements 2026-03-28 08:16:10 -06:00
rust-toolchain.toml workspace: initialize Cargo workspace with kernel and shared crate skeletons 2026-03-15 14:30:06 -06:00

ZerOS

A from-scratch, Rust-native operating system for battery-powered laptops.


What is this?

ZerOS is a new operating system. Not a Linux distribution, not a fork, not a POSIX-compliant system with a fresh coat of paint. It is a ground-up rethinking of what a laptop OS could be if you started today with no obligation to the past — no fork(), no ioctl(), no /proc, no systemd, no X11, no ALSA, no ACPI.

ZerOS is designed around a single conviction: a purpose-built OS, free of 30 years of legacy debt, can deliver dramatically longer battery life, faster boot times, and a more reliable user experience than any general-purpose system on the same hardware.

The result is a terminal-first, security-conscious, energy-obsessed microkernel OS written almost entirely in Rust, targeting ARM laptops.

What makes it different?

Every milliamp matters. The kernel scheduler is tickless — zero wakeups at idle. The CPU frequency governor is integrated into the scheduler and reacts in microseconds, not milliseconds. Unused peripherals are clock-gated. The display pipeline shuts down entirely during static content via eDP Panel Self-Refresh. Secondary CPU cores are power-gated by default. The result: 50100% longer battery life than Linux on the same hardware.

Microkernel, not monolith. The kernel handles memory, scheduling, IPC, and interrupts. Everything else — every driver, the filesystem, the network stack, the SSH server — runs in isolated user-space processes. A crashing eMMC driver restarts in milliseconds without affecting the kernel or your SSH session.

Capability-based security. No root user. No ambient authority. Processes access resources through unforgeable tokens (capabilities) granted explicitly by their parent. Privileged actions go through the please capability-broker command, which grants only scoped capabilities for a single action. A text editor opened to edit one file cannot read any other file, touch the network, or inspect other processes.

Terminal-first. The primary interface is a modern terminal running directly on the framebuffer — true color, Unicode, Nerd Fonts, tabs, split panes, and a built-in shell with structured pipelining. No window manager, no compositor, no display server. Just a fast, beautiful terminal that boots in under two seconds.

No POSIX in the kernel. The native API is small, clean, and capability-based. POSIX compatibility exists as a user-space shim for porting essential tools (git, curl). Native ZerOS programs never touch it.

Current status

Early bring-up. The repository includes active kernel code for AArch64 boot, DTB parsing, early UART output, physical memory allocation, and MMU bring-up/finalization in QEMU. Scheduler, IPC, capability broker internals, and user-space servers are not implemented yet. The architecture documentation defines the required contracts (deadline-ready scheduling, VMO bulk transfer, unified input lifecycle, and headless cryptographic delegation) that upcoming commits will implement.

Documentation

All project documentation lives in docs/:

Document Purpose
OVERVIEW.md Comprehensive technical reference — architecture, subsystems, design decisions, implementation details. Start here to understand the system.
PHILOSOPHY.md Development philosophy, priorities, design rules, coding standards, naming conventions, commit practices. The north star for every decision.
TODO.md Current task queue. Each TODO = one commit. Removed when completed.
ARTIFICIAL_INTELLIGENCE_USE.md AI usage policy. How and where AI tools are used, and the hard line between AI-assisted and AI-generated work.

Target hardware

The primary target is the Rockchip RK3566 (quad Cortex-A55, 4GB LPDDR4) on the Radxa CM3 development board, with an eDP display (2560×1600 with Panel Self-Refresh) and ESP32-C6 WiFi 6 coprocessor. Architecture-level testing uses QEMU (virt machine, Cortex-A55).

The long-term goal is a custom laptop running ZerOS that outlasts any comparable Linux device by 50100% on a single charge.

Building

Current bring-up workflow:

# Boot in QEMU (one command)
cargo run -p kernel --target aarch64-unknown-none

# Verify DTB handoff and parse output (for future CI?)
./scripts/verify-dtb-pointer.sh

License

AGPLv3.


ZerOS is what happens when you ask: "What would a laptop OS look like if we designed it today, for the people who will use it, with no obligation to the past?"