Go to file
Markus Maiwald 1b4facd86b Phase 37: The Glass Cage - Memory Isolation Complete
VICTORY: All page faults (Code 12, 13, 15) eliminated. NipBox runs in isolated userspace.

Root Cause Diagnosed:
- Kernel BSS (0x84D5B030) was overwritten by NipBox loading at 0x84000000
- current_fiber corruption caused cascading failures

Strategic Fixes:
1. Relocated NipBox to 0x86000000 (eliminating BSS collision)
2. Expanded DRAM to 256MB, User region to 64MB (accommodating NipBox BSS)
3. Restored Kernel GP register in trap handler (fixing global access)
4. Conditionally excluded ion/memory from userspace builds (removing 2MB pool)
5. Enabled release build optimizations (reducing BSS bloat)

Results:
- Kernel globals: SAFE
- User memory: ISOLATED (Sv39 active)
- Syscalls: OPERATIONAL
- Scheduler: STABLE
- NipBox: ALIVE (waiting for stdin)

Files Modified:
- core/rumpk/apps/linker_user.ld: User region 0x86000000-0x89FFFFFF (64MB)
- core/rumpk/hal/mm.zig: DRAM 256MB, User map 32-256MB
- core/rumpk/hal/entry_riscv.zig: GP reload in trap handler
- core/rumpk/core/ion.nim: Conditional memory export
- core/rumpk/libs/membrane/ion_client.nim: Local type declarations
- core/rumpk/libs/membrane/net_glue.nim: Removed ion import
- core/rumpk/libs/membrane/compositor.nim: Stubbed unused functions
- src/nexus/builder/nipbox.nim: Release build flags

Next: Fix stdin delivery to enable interactive shell.
2026-01-04 02:03:01 +01:00
.zig-cache/h feat(rumpk): dignified exit & sovereign vfs 2025-12-31 21:54:44 +01:00
apps Phase 37: The Glass Cage - Memory Isolation Complete 2026-01-04 02:03:01 +01:00
boot Phase 37: The Glass Cage - Memory Isolation Complete 2026-01-04 02:03:01 +01:00
core Phase 37: The Glass Cage - Memory Isolation Complete 2026-01-04 02:03:01 +01:00
docs feat(rumpk): Sovereign Ledger - VirtIO Block Driver & Persistence 2025-12-31 22:35:30 +01:00
hal Phase 37: The Glass Cage - Memory Isolation Complete 2026-01-04 02:03:01 +01:00
io feat: Initialize Rumpk Modular Unikernel 2025-12-31 20:18:47 +01:00
libs Phase 37: The Glass Cage - Memory Isolation Complete 2026-01-04 02:03:01 +01:00
npl Phase 37: The Glass Cage - Memory Isolation Complete 2026-01-04 02:03:01 +01:00
rootfs Phase 34: Orbital Drop - Fix console echo and eliminate 'R' flood regression 2026-01-03 18:07:18 +01:00
src/npl/system Phase 37: The Glass Cage - Memory Isolation Complete 2026-01-04 02:03:01 +01:00
vendor/lwip feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +01:00
README.md feat: Initialize Rumpk Modular Unikernel 2025-12-31 20:18:47 +01:00
build.zig feat(rumpk): Phase 3.5b Zicroui HUD Integration 2025-12-31 20:18:49 +01:00
run.sh feat(rumpk): First successful Zig+Nim boot on QEMU ARM64 2025-12-31 20:18:47 +01:00

README.md

Rumpk: The Modular Unikernel

"The Kernel is a Library. The App is the OS."

Status: EXPERIMENTAL
Languages: Zig (L0) + Nim (L1)
Design: POSIX-hostile, Military-grade

Directory Structure

rumpk/
├── boot/           [L0] Entry & Architecture (Zig/Asm)
│   ├── start.S     Multiboot2/EFI entry point
│   └── arch/       Architecture-specific code
├── hal/            [L0] Hardware Abstraction (Zig)
│   ├── mm.zig      Physical/Virtual Memory
│   ├── irq.zig     Interrupt handling
│   ├── serial.zig  UART/Early logging
│   └── abi.zig     C-ABI export to Nim
├── core/           [L1] Logic (Nim)
│   ├── kernel.nim  kmain() entry
│   ├── sched.nim   LWKT Scheduler
│   ├── fiber.nim   Fiber/Context management
│   └── ring.nim    Disruptor buffer
├── sys/            [L2] ABI Glue
│   └── syscall.zig System call handlers
├── payload/        [L3] NPL/NPK Loaders
│   └── loader.nim  Signature verification
└── io/             I/O Subsystem
    └── governor.nim Adaptive War/Peace mode

Key Features

  • Adaptive I/O: War Mode (polling) ↔ Peace Mode (interrupts)
  • Disruptor Ring: Lock-free inter-fiber communication
  • SipHash IDs: Collision-resistant process identification
  • Ed25519: Only signed code executes

Specifications

Build (Coming Soon)

cd core/rumpk
zig build          # Build L0 HAL
nimble build       # Build L1 Logic