Files
StarForth/src/starkernel/vm
Robert Allan JamesandClaude Sonnet 5 72487e7fff starkernel: item 3.6 -- Hera as patron zero, pinned (Phase 3 core complete)
Punch list §25 item 3.6 complete. Phase 3 (§25.4) core is now done:
items 3.1-3.6 all closed.

stadium_evict() now panics via sk_hal_panic() if a resident cell 0
(Hera, patron zero by construction of §6's boot order) is ever
selected for eviction. Placement is deliberate: the check runs before
the pin/contains refusal checks, not after -- if it ran after, a
wrongly-cleared pin would let the ordinary refusal path quietly return
-1 instead of ever reaching the panic, defeating the point of a check
that's supposed to be independent of pin holding.

Per §20.5 #3's explicit wording, not implemented as a filter:
stadium_admit()'s least-dense search is unchanged, still relying on
the general pin skip from item 3.5. Adding a second filter there would
have done exactly what that section warns against ("filtering hides
the bug, asserting reports it").

The panic path is, and will remain, unexercised by the acceptance
mechanism: sk_hal_panic() halts the machine, and triggering it
deliberately is incompatible with the three-arch boot being this
project's sole acceptance test. Correctness rests on the placement
argument, not a test -- same honesty precedent as items 3.4 and 3.5's
other unexercised paths.

Verified: three-architecture boot (amd64, aarch64, riscv64), all
reaching ok> with identical dict_hash=0x3d4e1daf289da94f matching the
item-3.5 baseline.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-04 17:36:23 -04:00
..
2026-08-01 07:49:56 -04:00

src/starkernel/vm/

Kernel-side StarForth VM subsystem.

  • vm_core.c — kernel port of the core interpreter loop.
  • vm_runtime.c — kernel VM runtime support.
  • vm_bootstrap.c — kernel VM bootstrap (distinct from bootstrap/sk_vm_bootstrap.c, which owns the higher-level subsystem wiring called from kernel_main.c).
  • arena.c — capsule arena allocator (fixed-region allocation for capsule payload data).
  • parity.c — birth/execution parity logging (VM ID + capsule hash + dictionary hash), enabling offline determinism verification.
  • alloc_kernel.c — the kernel-side implementation of the VM's allocator interface actually referenced by Makefile.starkernel's build (see src/platform/README.md for a note on a second, unwired copy).
  • q48_stubs.c — deliberate no-op stubs for q48_from_double()/ q48_to_double() in the freestanding kernel build, where floating point is unavailable; always returns zero, safe because shared VM code only uses these results for logging/diagnostic paths that are inactive in the kernel build.
  • vm_internal.h — internal-only declarations shared across this directory's files.

Subdirectories:

  • bootstrap/sk_vm_bootstrap.c — owns VM init + capsule loading wiring, called from kernel_main.c; kernel_main.c itself only owns hardware milestones.
  • host/shim.c — host-service shim bridging the kernel VM to src/starkernel/hal/host_services.c.