rumpk/hal
Markus Maiwald ec616cc151 Phase 34: Orbital Drop - Fix console echo and eliminate 'R' flood regression
- Fixed console echo by implementing wrapper_vfs_write to handle FD 1/2 in kernel.
- Initialized UART on RISC-V with FIFO drain to prevent stuck characters.
- Removed debug 'R' trace from libc.nim read(0) shim.
- Restored interactive CLI functionality.
2026-01-03 18:07:18 +01:00
..
arch feat(rumpk): Phase 8 - The Summoning (ELF Loader) - 95% Complete 2025-12-31 20:18:49 +01:00
crypto feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +01:00
README.md docs(rumpk): Add module READMEs per Panopticum doctrine 2025-12-31 20:18:47 +01:00
abi.zig feat(rumpk): Sovereign Core Stabilization & Membrane IPC Hardening 2025-12-31 20:18:49 +01:00
channel.zig 🎊 PHASE 8 COMPLETE: The Summoning - Dynamic ELF Loader OPERATIONAL 2025-12-31 21:08:25 +01:00
entry_riscv.zig Phase 34: Orbital Drop - Fix console echo and eliminate 'R' flood regression 2026-01-03 18:07:18 +01:00
fb_wrapper.zig Phase 27-29: Visual Cortex, Pledge, and The Hive 2026-01-02 14:12:00 +01:00
framebuffer.zig Phase 27-29: Visual Cortex, Pledge, and The Hive 2026-01-02 14:12:00 +01:00
gpu.zig Phase 27-29: Visual Cortex, Pledge, and The Hive 2026-01-02 14:12:00 +01:00
hud.zig feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +01:00
main.zig feat(rumpk): Sovereign Ledger - VirtIO Block Driver & Persistence 2025-12-31 22:35:30 +01:00
matrix.zig feat(rumpk): Sovereign Core Stabilization & Membrane IPC Hardening 2025-12-31 20:18:49 +01:00
mm.zig Phase 31.2: The Identity Switch (Sv39 Virtual Memory) 2026-01-02 15:24:32 +01:00
stubs.zig Phase 27-29: Visual Cortex, Pledge, and The Hive 2026-01-02 14:12:00 +01:00
uart.zig Phase 34: Orbital Drop - Fix console echo and eliminate 'R' flood regression 2026-01-03 18:07:18 +01:00
ui.zig feat(rumpk): Sovereign Core Stabilization & Membrane IPC Hardening 2025-12-31 20:18:49 +01:00
virtio_block.zig Phase 27-29: Visual Cortex, Pledge, and The Hive 2026-01-02 14:12:00 +01:00
virtio_net.zig feat(rumpk): Sovereign Ledger - VirtIO Block Driver & Persistence 2025-12-31 22:35:30 +01:00
virtio_pci.zig Phase 27-29: Visual Cortex, Pledge, and The Hive 2026-01-02 14:12:00 +01:00

README.md

Rumpk HAL (L0)

Language: Zig + Assembly
Purpose: Hardware Abstraction Layer

Module Index

File Purpose
main.zig Entry point (_start), stack setup, calls Nim kmain
stubs.zig Freestanding libc (memcpy, malloc, printf, etc.)
uart.zig PL011 UART driver (QEMU virt)
abi.zig C ABI structs shared with Nim

Architecture Directory (arch/)

Contains per-architecture implementations:

arch/
├── aarch64/        # ARM64 (VisionFive 2, RPi, AWS Graviton)
│   ├── switch.S    # Context switch (96 bytes)
│   └── constants.nim
├── x86_64/         # System V ABI (servers, trading)
│   ├── switch.S    # Context switch (56 bytes)
│   └── constants.nim
└── riscv64/        # RISC-V LP64 (satellites, drones)
    ├── switch.S    # Context switch (112 bytes)
    └── constants.nim

Freestanding Doctrine

This HAL provides ALL C ABI symbols. No glibc, no musl.

Exported Symbols:

  • Memory: memcpy, memset, memmove, memcmp
  • Strings: strlen, strcmp, strcpy
  • Heap: malloc, free, realloc, calloc
  • I/O: printf, puts, putchar
  • Exit: exit, abort
  • Signals: signal, raise (no-op stubs)

Build

Compiled via zig build-obj -target <arch>-freestanding-none