rumpk/hal
Markus Maiwald bcba945557 wip(rumpk): Phase 3.5 Live Wire - 95% Complete (TX Wire Issue)
- Implemented ping_ion.zig: Sovereign ARP/ICMP Responder
- Fixed VirtIO header offset (10-byte skip)
- Fixed packed struct size issues (hardcoded 14/28/20 byte headers)
- Full data path working: RX -> NPL Parse -> TX Push -> Kernel Drain -> VirtIO Queue
- Remaining: VirtIO TX packets not reaching wire (needs tcpdump debugging)
- ARP Reply crafted correctly, ICMP Echo Reply crafted correctly
- VirtIO notify called, but packets not observed by host
2025-12-31 20:18:49 +01:00
..
arch feat(rumpk): Phase 2 Complete - The Entropy Purge & Sovereign Alignment 2025-12-31 20:18:48 +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): Phase 2 Complete - The Entropy Purge & Sovereign Alignment 2025-12-31 20:18:48 +01:00
channel.zig feat(rumpk): implement Invariant Shield and Blink Recovery 2025-12-31 20:18:48 +01:00
entry_riscv.zig feat(rumpk): implement Invariant Shield and Blink Recovery 2025-12-31 20:18:48 +01:00
hud.zig feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +01:00
main.zig feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +01:00
stubs.zig feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +01:00
uart.zig feat(rumpk): Phase 2 Complete - The Entropy Purge & Sovereign Alignment 2025-12-31 20:18:48 +01:00
virtio_net.zig wip(rumpk): Phase 3.5 Live Wire - 95% Complete (TX Wire Issue) 2025-12-31 20:18:49 +01:00
virtio_pci.zig feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +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