rumpk/hal
Markus Maiwald e3246e8509
chore: remove build artifacts — initrd.tar, compiled binaries, temp ELFs
2026-02-15 20:04:27 +01:00
..
arch feat(kernel): implement Sv39 fiber memory isolation and hardened ELF loader 2026-01-05 16:36:25 +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(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
channel.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
crypto.zig feat(kernel): implement System Truth Ledger and Causal Trace 2026-01-06 03:37:53 +01:00
cspace.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
entry_aarch64.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
entry_riscv.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
fb_wrapper.zig Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
framebuffer.zig Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
gic.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
gpu.zig Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
hud.zig Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
initrd.zig fix(rumpk): enable user stack access and repair boot process 2026-01-08 21:38:14 +01:00
littlefs_hal.zig feat(fs): LittleFS integration — VFS, HAL bridge, persistent /nexus 2026-02-15 19:59:13 +01:00
main.zig feat(tinybox): graft toybox integration and build system automation 2026-01-08 21:18:08 +01:00
matrix.zig Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
mm.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
ontology.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
ram_blk.zig feat(kernel): implement System Truth Ledger and Causal Trace 2026-01-06 03:37:53 +01:00
stubs.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
stubs_user.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
surface.zig Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
uart.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
uart_input.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
ui.zig Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
virtio_block.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
virtio_mmio.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
virtio_net.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +01:00
virtio_pci.zig feat(hal): ARM64 port, VirtIO MMIO, dual-arch HAL (M3.1-M3.3) 2026-02-15 19:58:51 +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