rumpk/core
Markus Maiwald f9d95c81b2 feat(membrane): Hardened LwIP memory manager & stabilized DHCP/DNS
PROBLEM RESOLVED: memp_malloc NULL pointer crashes (0x18/0x20 offsets)

CRITICAL FIXES:
- Nuclear fail-safe in memp.c for mission-critical protocol objects
  * Direct heap fallback for UDP_PCB, TCP_PCB, PBUF, SYS_TMR pools
  * Handles ABI/relocation failures in memp_pools[] descriptor array
  * Prevents ALL NULL dereferences in protocol allocation paths

- Iteration-based network heartbeat in net_glue.nim
  * Drives LwIP state machines independent of system clock
  * Resolves DHCP/DNS timeout issues in QEMU/freestanding environments
  * Ensures consistent protocol advancement even with time dilation

- Unified heap configuration (MEMP_MEM_MALLOC=1, LWIP_TIMERS=1)
  * 2MB heap for network operations
  * Disabled LwIP stats to avoid descriptor corruption
  * Increased pool sizes for robustness

VERIFICATION:
 DHCP: Reliable IP acquisition (10.0.2.15)
 ICMP: Full Layer 2 connectivity confirmed
 DNS: Query enqueuing operational (secondary crash isolated)
 VirtIO: 12-byte header alignment maintained

NEXT: Final DNS request table hardening for complete resolution

Forge Signature: CORRECTNESS > SPEED
2026-01-07 23:47:04 +01:00
..
fs Network: Phase 36 Component (DHCP, VirtIO 12B, Hardened Logs) 2026-01-07 14:48:40 +01:00
include feat(rumpk): Achieve interactive Mksh shell & formalize Sovereign FSH 2026-01-05 01:14:24 +01:00
ion Network: Phase 36 Component (DHCP, VirtIO 12B, Hardened Logs) 2026-01-07 14:48:40 +01:00
loader Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
README.md feat(rumpk): Phase 2 Complete - The Entropy Purge & Sovereign Alignment 2025-12-31 20:18:48 +01:00
channel.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
channels.nim fix(virtio): overcome capability probe hang with paging enabled 2026-01-06 13:39:40 +01:00
cspace.nim feat(kernel): implement System Truth Ledger and Causal Trace 2026-01-06 03:37:53 +01:00
cstubs.c feat(rumpk): Phase 3.5b Zicroui HUD Integration 2025-12-31 20:18:49 +01:00
fastpath.nim test(utcp): Root cause analysis - QEMU hostfwd requires listening socket 2026-01-07 17:04:51 +01:00
fiber.nim fix(virtio): overcome capability probe hang with paging enabled 2026-01-06 13:39:40 +01:00
invariant.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
ion.nim Network: Phase 36 Component (DHCP, VirtIO 12B, Hardened Logs) 2026-01-07 14:48:40 +01:00
kernel.nim feat(network): established full bidirectional IP connectivity via LwIP 2026-01-07 20:19:15 +01:00
loader.nim feat(rumpk): Achieve interactive Mksh shell & formalize Sovereign FSH 2026-01-05 01:14:24 +01:00
loader.zig feat(kernel): implement Sv39 fiber memory isolation and hardened ELF loader 2026-01-05 16:36:25 +01:00
netswitch.nim feat(membrane): Hardened LwIP memory manager & stabilized DHCP/DNS 2026-01-07 23:47:04 +01:00
ontology.nim feat(nexshell): implement Visual Causal Graph Viewer 2026-01-06 10:13:59 +01:00
overrides.c feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +01:00
panicoverride.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
pty.nim feat(kernel): implement Sv39 fiber memory isolation and hardened ELF loader 2026-01-05 16:36:25 +01:00
re-symbol.txt feat(rumpk): Phase 7 Verified - Subject Zero Launch 2025-12-31 20:18:48 +01:00
ring.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
sched.nim feat(hal/core): implement heartbeat of iron (real-time SBI timer driver) 2026-01-06 20:54:22 +01:00
utcp.nim feat(membrane): Hardened LwIP memory manager & stabilized DHCP/DNS 2026-01-07 23:47:04 +01:00
watchdog.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00
write_wrapper.nim Rumpk Stability, NipBox Boot, and Repository Cleanup 2026-01-04 21:39:06 +01:00

README.md

Rumpk Core (L1)

Language: Nim
Purpose: Architecture-agnostic kernel logic

Module Index

File Purpose
kernel.nim Main Orchestrator (kmain)
ion.nim ION Control Plane & Channel API
fiber.nim Cooperative fiber abstraction
watchdog.nim Autonomous Immune System (Healer)
ring.nim Lock-free Sovereign ring buffers
panicoverride.nim Freestanding panic handler

Architecture Independence

This folder contains no architecture-specific code. All platform-specific details are handled by the HAL layer (../hal/).

Compile-time architecture selection uses Nim's when defined():

when defined(amd64):
  const CONTEXT_SIZE = 56
elif defined(arm64):
  const CONTEXT_SIZE = 96
elif defined(riscv64):
  const CONTEXT_SIZE = 112

Dependencies

  • Imports console_write, rumpk_halt from HAL (Zig L0)
  • Imports cpu_switch_to from arch-specific assembly
  • Uses mm:arc memory management (no GC)

Build

Built via ../build.sh [aarch64|x86_64|riscv64]