Compare commits
193
Commits
master
..
c7bf68fe13
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7bf68fe13 | ||
|
|
3b49cb15a2 | ||
|
|
1ce8576b76 | ||
|
|
79db0e8d88 | ||
|
|
7bc658bb83 | ||
|
|
fcb89b0695 | ||
|
|
f8fbc37698 | ||
|
|
776c89457e | ||
|
|
7aed588f78 | ||
|
|
1a4b163861 | ||
|
|
e729c64ba3 | ||
|
|
739cb9c163 | ||
|
|
080b7012ba | ||
|
|
0e2c60dac3 | ||
|
|
4da370f492 | ||
|
|
5e26fad30d | ||
|
|
029a8ed9cf | ||
|
|
b7e8e4b058 | ||
|
|
c15589b39e | ||
|
|
9772ee8b68 | ||
|
|
c95191736e | ||
|
|
f4e359859a | ||
|
|
010cfc54e6 | ||
|
|
66b26f823c | ||
|
|
06da5700bc | ||
|
|
ab96a9f2be | ||
|
|
2e6262c91f | ||
|
|
f1419e739c | ||
|
|
6a7d0aa27f | ||
|
|
b1d09af043 | ||
|
|
83694b18be | ||
|
|
d5cd64605d | ||
|
|
50be766e7b | ||
|
|
88554666d4 | ||
|
|
7eb545f387 | ||
|
|
8967c93241 | ||
|
|
0d91608f39 | ||
|
|
6015c87157 | ||
|
|
10f5ffd00b | ||
|
|
2cf37aab4f | ||
|
|
380f1cc6ec | ||
|
|
2b587206ee | ||
|
|
ec817a8264 | ||
|
|
353783726d | ||
|
|
1c720ab2c7 | ||
|
|
482cc75faf | ||
|
|
075385ab63 | ||
|
|
dfabfa46f6 | ||
|
|
5150155281 | ||
|
|
59727f762a | ||
|
|
d343001dea | ||
|
|
ee2bbf4ecf | ||
|
|
cbe1cd5e44 | ||
|
|
9efe8aad3a | ||
|
|
6e1ac157c6 | ||
|
|
a425f738a4 | ||
|
|
193523d873 | ||
|
|
bc6deab3f5 | ||
|
|
18adf59091 | ||
|
|
eda6577a53 | ||
|
|
4bdb210a99 | ||
|
|
2bf958ce3a | ||
|
|
c2f4b9808a | ||
|
|
b04ae55ec5 | ||
|
|
9bfd5071d2 | ||
|
|
7f4d946d2e | ||
|
|
bcfd6556a8 | ||
|
|
6d90375da7 | ||
|
|
7c06bdfdb6 | ||
|
|
d5b7235464 | ||
|
|
26a0748455 | ||
|
|
4a505a154d | ||
|
|
0e761cb117 | ||
|
|
a7991f2757 | ||
|
|
8cacfb663c | ||
|
|
348eed7fa1 | ||
|
|
f9c034cadd | ||
|
|
630d03fa4e | ||
|
|
a041b401ea | ||
|
|
42610e844f | ||
|
|
9af442f793 | ||
|
|
2c5427d9c1 | ||
|
|
beb7ded96c | ||
|
|
ae17a1ccf0 | ||
|
|
a68ea4841f | ||
|
|
11e135a8c3 | ||
|
|
c7b61b5680 | ||
|
|
bd65b5b165 | ||
|
|
a02a7905cd | ||
|
|
7a8b528d3b | ||
|
|
25fc5fd5e3 | ||
|
|
e8e8ea13ea | ||
|
|
ad3efdda65 | ||
|
|
085d0881de | ||
|
|
d4b1b4ff91 | ||
|
|
8df6c16766 | ||
|
|
5f1f60fc84 | ||
|
|
01c447f9ab | ||
|
|
ab7a9bf06f | ||
|
|
ff53ec4bb4 | ||
|
|
e692759a96 | ||
|
|
bd996a1106 | ||
|
|
0273308b78 | ||
|
|
c80b4c8ed7 | ||
|
|
6dc71758da | ||
|
|
b9b6f0c6fa | ||
|
|
f6b3ec54f4 | ||
|
|
b128a4d6db | ||
|
|
79db64c4e2 | ||
|
|
e88032b7e8 | ||
|
|
2abaf51aee | ||
|
|
2930349bbf | ||
|
|
5d6043e37e | ||
|
|
ed6b11ad88 | ||
|
|
506b645726 | ||
|
|
294e69463a | ||
|
|
903321e548 | ||
|
|
d4bd6e9601 | ||
|
|
c1bbcaaba4 | ||
|
|
384a6c1cd2 | ||
|
|
8c540b0305 | ||
|
|
a1afb44598 | ||
|
|
c8dc14897c | ||
|
|
0fbe1432b7 | ||
|
|
ab272cc2ad | ||
|
|
e7d686c7a2 | ||
|
|
c02505db69 | ||
|
|
dc7e37ba5c | ||
|
|
644bfc0a25 | ||
|
|
ebffa6082d | ||
|
|
0da7e32a0b | ||
|
|
361dcd1148 | ||
|
|
b3d2d56d11 | ||
|
|
b5d644d498 | ||
|
|
806f876ee0 | ||
|
|
dac7ffac92 | ||
|
|
bbd1b4047f | ||
|
|
44ffd261bb | ||
|
|
26a6a16537 | ||
|
|
880560fc00 | ||
|
|
c10d3a9cca | ||
|
|
01b5bbb23f | ||
|
|
b137678691 | ||
|
|
e178a76c36 | ||
|
|
7b42a9b6c1 | ||
|
|
443439c3d2 | ||
|
|
31fcdcd0a3 | ||
|
|
7b710aa322 | ||
|
|
861f800b7f | ||
|
|
2c16183788 | ||
|
|
03d8d991ef | ||
|
|
481d484e93 | ||
|
|
84c7711763 | ||
|
|
cb66db1107 | ||
|
|
7c5be22799 | ||
|
|
e50cc1f73a | ||
|
|
030ca63639 | ||
|
|
13335dcc9c | ||
|
|
40178098e9 | ||
|
|
7e3932a4ad | ||
|
|
7a21f07ad5 | ||
|
|
638aeb6636 | ||
|
|
6a019b8968 | ||
|
|
2e4d1330ea | ||
|
|
f030edcd08 | ||
|
|
13ec4b1b6c | ||
|
|
8235078b3b | ||
|
|
1ce705783c | ||
|
|
e117333a87 | ||
|
|
a2a4a85d38 | ||
|
|
f4bfe7de02 | ||
|
|
a2d21d5cda | ||
|
|
29cf2688d2 | ||
|
|
9e03bdab19 | ||
|
|
8f37e15f8a | ||
|
|
54e1cdafb1 | ||
|
|
ab3b708540 | ||
|
|
d0accdbb88 | ||
|
|
167fdc3973 | ||
|
|
981f4180ce | ||
|
|
d948e0c1a3 | ||
|
|
4f493fa317 | ||
|
|
5ac52f19d6 | ||
|
|
6a371b850e | ||
|
|
092036c97a | ||
|
|
93d09840da | ||
|
|
3b9d1e4337 | ||
|
|
41f59afeb3 | ||
|
|
9a391eb0ad | ||
|
|
067f317c47 | ||
|
|
1f98034311 | ||
|
|
a8b70e88d3 | ||
|
|
f238f02afa |
+1
-1
@@ -14,7 +14,7 @@ Checks: >
|
|||||||
|
|
||||||
WarningsAsErrors: [ ]
|
WarningsAsErrors: [ ]
|
||||||
|
|
||||||
HeaderFilterRegex: '^src/.*|^include/.*'
|
HeaderFilterRegex: '^v3/(src|include)/.*|^kernel/(src|include)/.*'
|
||||||
|
|
||||||
AnalyzeTemporaryDtors: false
|
AnalyzeTemporaryDtors: false
|
||||||
FormatStyle: none
|
FormatStyle: none
|
||||||
|
|||||||
+28
-28
@@ -6,8 +6,8 @@
|
|||||||
# clang-tidy will ALWAYS false-positive them. Always.
|
# clang-tidy will ALWAYS false-positive them. Always.
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
src/platform/**
|
v3/src/platform/**
|
||||||
src/platform/*
|
v3/src/platform/*
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Skip test infrastructure
|
# Skip test infrastructure
|
||||||
@@ -15,8 +15,8 @@ src/platform/*
|
|||||||
# and stress edge conditions clang-tidy will never grok.
|
# and stress edge conditions clang-tidy will never grok.
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
src/test_runner/**
|
v3/src/test_runner/**
|
||||||
src/test_runner/*
|
v3/src/test_runner/*
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Skip word definitions generated or "mechanically patterned"
|
# Skip word definitions generated or "mechanically patterned"
|
||||||
@@ -24,30 +24,30 @@ src/test_runner/*
|
|||||||
# clang-tidy gives ZERO useful feedback on them.
|
# clang-tidy gives ZERO useful feedback on them.
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
src/word_source/string_words.c
|
v3/src/word_source/string_words.c
|
||||||
src/word_source/block_words.c
|
v3/src/word_source/block_words.c
|
||||||
src/word_source/arithmetic_words.c
|
v3/src/word_source/arithmetic_words.c
|
||||||
src/word_source/mixed_arithmetic_words.c
|
v3/src/word_source/mixed_arithmetic_words.c
|
||||||
src/word_source/return_stack_words.c
|
v3/src/word_source/return_stack_words.c
|
||||||
src/word_source/defining_words.c
|
v3/src/word_source/defining_words.c
|
||||||
src/word_source/stack_words.c
|
v3/src/word_source/stack_words.c
|
||||||
src/word_source/logical_words.c
|
v3/src/word_source/logical_words.c
|
||||||
src/word_source/memory_words.c
|
v3/src/word_source/memory_words.c
|
||||||
src/word_source/io_words.c
|
v3/src/word_source/io_words.c
|
||||||
src/word_source/dictionary_words.c
|
v3/src/word_source/dictionary_words.c
|
||||||
src/word_source/dictionary_manipulation_words.c
|
v3/src/word_source/dictionary_manipulation_words.c
|
||||||
src/word_source/vocabulary_words.c
|
v3/src/word_source/vocabulary_words.c
|
||||||
src/word_source/system_words.c
|
v3/src/word_source/system_words.c
|
||||||
src/word_source/starforth_words.c
|
v3/src/word_source/starforth_words.c
|
||||||
src/word_source/editor_words.c
|
v3/src/word_source/editor_words.c
|
||||||
src/word_source/format_words.c
|
v3/src/word_source/format_words.c
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Skip headers belonging to the word system
|
# Skip headers belonging to the word system
|
||||||
# Same reason: no signal, infinite false positives.
|
# Same reason: no signal, infinite false positives.
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
src/word_source/include/*
|
v3/src/word_source/include/*
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Skip anything that implements performance knobs,
|
# Skip anything that implements performance knobs,
|
||||||
@@ -55,15 +55,15 @@ src/word_source/include/*
|
|||||||
# These are meant to be weird, and tidy can't reason about them.
|
# These are meant to be weird, and tidy can't reason about them.
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
src/stack_management.c
|
v3/src/stack_management.c
|
||||||
src/profiler.c
|
v3/src/profiler.c
|
||||||
src/vm_debug.c
|
v3/src/vm_debug.c
|
||||||
src/physics_runtime.c
|
v3/src/physics_runtime.c
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# Skip integration + stress torture-tests.
|
# Skip integration + stress torture-tests.
|
||||||
# These *intentionally* do UB-like bullshit.
|
# These *intentionally* do UB-like bullshit.
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
src/test_runner/modules/*stress*
|
v3/src/test_runner/modules/*stress*
|
||||||
src/test_runner/modules/*integration*
|
v3/src/test_runner/modules/*integration*
|
||||||
|
|||||||
+146
-110
@@ -26,7 +26,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
> track a codebase it no longer describes would defeat its purpose as a record.
|
> track a codebase it no longer describes would defeat its purpose as a record.
|
||||||
|
|
||||||
> **Tripod/kernel reshuffle — Phases 0–4 COMPLETE (2026-09-22); Phase 5 close-out in
|
> **Tripod/kernel reshuffle — Phases 0–4 COMPLETE (2026-09-22); Phase 5 close-out in
|
||||||
> progress.** Hermes moved into the kernel as kernel-Hermes (`src/starkernel/vm/kernel_
|
> progress.** Hermes moved into the kernel as kernel-Hermes (`kernel/src/vm/kernel_
|
||||||
> hermes.c`); the Tripod is now **Hera / Artemis / Hestia** — **the Hermes VM, `capsules/
|
> hermes.c`); the Tripod is now **Hera / Artemis / Hestia** — **the Hermes VM, `capsules/
|
||||||
> hermes/init.4th`, and `capsules/common/messaging.4th` no longer exist in this codebase.**
|
> hermes/init.4th`, and `capsules/common/messaging.4th` no longer exist in this codebase.**
|
||||||
> Design is complete and ruled in **`FABRIC-3.5.md`** (authoritative); execution is tracked in
|
> Design is complete and ruled in **`FABRIC-3.5.md`** (authoritative); execution is tracked in
|
||||||
@@ -39,10 +39,10 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|||||||
|
|
||||||
> **Scope:** This repo is LithosAnanke — the bare-metal UEFI kernel that boots StarForth
|
> **Scope:** This repo is LithosAnanke — the bare-metal UEFI kernel that boots StarForth
|
||||||
> directly on hardware. StarForth (the hosted FORTH-79 VM) has its own separate repository
|
> directly on hardware. StarForth (the hosted FORTH-79 VM) has its own separate repository
|
||||||
> now. This repo vendors a full copy of the shared VM source (`src/vm.c`, `src/word_source/`,
|
> now. This repo vendors a full copy of the shared VM source (`v3/src/vm.c`,
|
||||||
> `capsules/`, `proof/`) because LithosAnanke embeds it as its execution engine — that vendored
|
> `v3/src/word_source/`, `capsules/`, `proof/`) because LithosAnanke embeds it as its
|
||||||
> code is not a leftover or a second production target, it's load-bearing here. Kernel-specific
|
> execution engine — that vendored code is not a leftover or a second production target, it's
|
||||||
> code lives in `src/starkernel/`.
|
> load-bearing here. Kernel-specific code lives in `kernel/src/`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -81,21 +81,24 @@ about "which line am I on."
|
|||||||
- **`' BIRTH` in shared capsules breaks the hosted build** — BIRTH is kernel-only. `capsules/ACL.4th` itself documents this exclusion in a comment (line ~64) — it deliberately omits `BIRTH`/`CAPSULE-BIRTH` even though this IS the kernel repo, because `ACL.4th` is meant to stay portable/shared.
|
- **`' BIRTH` in shared capsules breaks the hosted build** — BIRTH is kernel-only. `capsules/ACL.4th` itself documents this exclusion in a comment (line ~64) — it deliberately omits `BIRTH`/`CAPSULE-BIRTH` even though this IS the kernel repo, because `ACL.4th` is meant to stay portable/shared.
|
||||||
|
|
||||||
### On the Embedded VM vs. the Kernel
|
### On the Embedded VM vs. the Kernel
|
||||||
- **`src/vm.c`, `include/vm.h`, `capsules/`, `src/word_source/` are the shared/vendored VM
|
- **`v3/src/vm.c`, `v3/include/vm.h`, `capsules/`, `v3/src/word_source/` are the
|
||||||
source.** They must compile and behave correctly both standalone (bare `make` here still
|
shared/vendored VM source.** They must compile and behave correctly both standalone (bare
|
||||||
produces a plain hosted `starforth` binary for quick local sanity checks) and embedded in
|
`make` here still produces a plain hosted `starforth` binary for quick local sanity checks)
|
||||||
the kernel build. Gate kernel-only code with `#ifdef __STARKERNEL__` or
|
and embedded in the kernel build. Gate kernel-only code with `#ifdef __STARKERNEL__` or
|
||||||
`#ifdef STARFORTH_ENABLE_VM`.
|
`#ifdef STARFORTH_ENABLE_VM`.
|
||||||
- **The vendored VM source has diverged from the standalone StarForth repo's copy** — it is
|
- **The vendored VM source has diverged from the standalone StarForth repo's copy** — it is
|
||||||
not a byte-identical mirror. This repo's `src/word_source/` has 31 files (StarForth's has
|
not a byte-identical mirror. This repo's `v3/src/word_source/` has 35 files (StarForth's
|
||||||
26); the extras (`defer_words.c`, `inference_words.c`, `lifecycle_words_hosted.c`,
|
has 26; the count was 31 in an earlier revision of this file — corrected 2026-10-09); the
|
||||||
`log_words.c`, `q48_words.c`) are kernel-side-only additions. Don't assume a fix made in
|
extras (`defer_words.c`, `inference_words.c`, `lifecycle_words_hosted.c`, `log_words.c`,
|
||||||
the StarForth repo needs to be, or even can be cleanly, ported here — check first.
|
`q48_words.c`) are kernel-side-only additions, as are the console/input words
|
||||||
Similarly `src/starkernel/` here is real and load-bearing (~74 files across arch/boot/
|
(`framebuffer_words.c`, `keyboard_words.c`, `scroll_words.c`, `ttf_words.c`). Don't assume
|
||||||
|
a fix made in the StarForth repo needs to be, or even can be cleanly, ported here — check
|
||||||
|
first. Similarly `kernel/src/` here is real and load-bearing (~74 files across arch/boot/
|
||||||
capsule/hal/memory/math/hash/pci/virtio/vm subtrees) — much larger than older docs claimed.
|
capsule/hal/memory/math/hash/pci/virtio/vm subtrees) — much larger than older docs claimed.
|
||||||
- **`src/*.c.bak` files (`vm.c.bak`, `doe_metrics.c.bak`, `inference_engine.c.bak`) are
|
- **The `*.c.bak` files are gone.** `vm.c.bak`, `doe_metrics.c.bak`, and
|
||||||
tracked in git at the `src/` top level.** This looks like repo hygiene debt, not
|
`inference_engine.c.bak` — previously tracked at the `v3/src/` top level per an older revision
|
||||||
intentional. Report it if it comes up; don't delete unprompted.
|
of this file — no longer exist anywhere in the tree (verified 2026-10-09 via `git ls-files`
|
||||||
|
and a filesystem scan). The hygiene debt was cleaned up; nothing to report.
|
||||||
- **There is no `make test` target in this repo's hosted `Makefile`** (unlike the standalone
|
- **There is no `make test` target in this repo's hosted `Makefile`** (unlike the standalone
|
||||||
StarForth repo, which has one). Don't invent one. The only acceptance authority for kernel
|
StarForth repo, which has one). Don't invent one. The only acceptance authority for kernel
|
||||||
changes is the three-arch QEMU boot (see below); bare `make` here is for quick compile
|
changes is the three-arch QEMU boot (see below); bare `make` here is for quick compile
|
||||||
@@ -116,9 +119,8 @@ about "which line am I on."
|
|||||||
|
|
||||||
## Word-Level ACL System — Complete through Phase 7 (independently verified)
|
## Word-Level ACL System — Complete through Phase 7 (independently verified)
|
||||||
|
|
||||||
**Design doc:** `docs/03-architecture/word-acl/DESIGN.md` (this repo kept the old-style
|
**Design doc:** `docs/reference/word-acl/DESIGN.md` (moved there from the old
|
||||||
`docs/03-architecture/` tree alongside the newer `docs/formal/`/`docs/working/` restructure —
|
`docs/03-architecture/` tree in the 2026-10-14 docs reorganisation).
|
||||||
both exist here; this path is still current for ACL specifically).
|
|
||||||
|
|
||||||
The word-level ACL system is fully implemented, including kernel parity. Key constraints:
|
The word-level ACL system is fully implemented, including kernel parity. Key constraints:
|
||||||
|
|
||||||
@@ -140,14 +142,17 @@ The word-level ACL system is fully implemented, including kernel parity. Key con
|
|||||||
6. ✅ `EMERGENCY_CONSOLE_ENABLED` build flag + `vm_fault_handler` extension point
|
6. ✅ `EMERGENCY_CONSOLE_ENABLED` build flag + `vm_fault_handler` extension point
|
||||||
7. ✅ LithosAnanke kernel parity — **independently verified present in current `master`**:
|
7. ✅ LithosAnanke kernel parity — **independently verified present in current `master`**:
|
||||||
`acl_recheck()`/`zuse_session`/`emergency_console` wiring confirmed in
|
`acl_recheck()`/`zuse_session`/`emergency_console` wiring confirmed in
|
||||||
`src/starkernel/vm/vm_core.c` (~lines 549, 608–633, 747–749, 906–908); the
|
`kernel/src/vm/vm_core.c` (~lines 549, 608–633, 747–749, 906–908); the
|
||||||
per-iteration `emergency_console = zuse_session ? 0 : 1` assignment confirmed in
|
per-iteration `emergency_console = zuse_session ? 0 : 1` assignment confirmed in
|
||||||
`src/starkernel/repl.c` (~lines 174, 219); the old `!vm->zuse_session` ACL-check bypass
|
`kernel/src/repl.c` (~lines 174, 219); the old `!vm->zuse_session` ACL-check bypass
|
||||||
confirmed **absent** from `src/vm.c`. (The `feature/acl-rwt` branch this work was
|
confirmed **absent** from `v3/src/vm.c`. (The `feature/acl-rwt` branch this work was
|
||||||
apparently done on is not traceable in `git log --all` — likely squash-merged without
|
apparently done on is not traceable in `git log --all` — likely squash-merged without
|
||||||
preserving the ref. The code is real and verified; the branch name is not.)
|
preserving the ref. The code is real and verified; the branch name is not.)
|
||||||
8. ⬜ PKI / thumbdrive — Ed25519 challenge-response; user minting by zuse. **This is the open
|
8. ✅ PKI / thumbdrive — closed 2026-10-14. User minting by Zuse is built (`MINT`, `MINT-SCRATCH`,
|
||||||
item — pick up here next.**
|
WIREBIND cert verification). Challenge-response against a cloned drive was ruled out by design
|
||||||
|
("there's only the drive", `FABRIC-3.7.md`). Runtime word-ACL elevation (`ELEVATE-GRANT`, the
|
||||||
|
Zuse eligibility list) was ruled not needed and removed, with the hole it carried
|
||||||
|
(`FABRIC-3.md` §XXXVII).
|
||||||
|
|
||||||
**ACL-RWT DoE campaign (June 15–16 2026) — superseded, kept for historical record:**
|
**ACL-RWT DoE campaign (June 15–16 2026) — superseded, kept for historical record:**
|
||||||
- 3×3 Latin square: 3 seeds × amd64/aarch64/riscv64, 30 reps each
|
- 3×3 Latin square: 3 seeds × amd64/aarch64/riscv64, 30 reps each
|
||||||
@@ -176,7 +181,9 @@ capsule files — accurate):
|
|||||||
previously described a 1024-byte-per-block budget — right by arithmetic, wrong as a rule):
|
previously described a 1024-byte-per-block budget — right by arithmetic, wrong as a rule):
|
||||||
`validate_forth_blocks` enforces a **64-char × 16-line** format —
|
`validate_forth_blocks` enforces a **64-char × 16-line** format —
|
||||||
**line length ≤ 64 chars, ≤ 16 content lines per block** (`mkcapsule.c:344-345`, `:430`) — and
|
**line length ≤ 64 chars, ≤ 16 content lines per block** (`mkcapsule.c:344-345`, `:430`) — and
|
||||||
a block number in **`[2048, 5120)`** (`:408-409`). 64 × 16 = 1024, which is where the old
|
a block number of **2048 or more, with no upper bound** (`:408-411`; ruled 2026-10-05,
|
||||||
|
`docs/v4.0.0/NUCLEUS.md` §5.2 — blocks 0–2047, the VM's fast RAM, are the only ones a capsule
|
||||||
|
may not claim; the check was `[2048, 5120)` before). 64 × 16 = 1024, which is where the old
|
||||||
figure came from, but the enforcement is per-line and per-line-count: **8 lines of 128 chars
|
figure came from, but the enforcement is per-line and per-line-count: **8 lines of 128 chars
|
||||||
is 1024 bytes and still fails.** Verify with `mkcapsule --lint capsules/`, not `wc -c`.
|
is 1024 bytes and still fails.** Verify with `mkcapsule --lint capsules/`, not `wc -c`.
|
||||||
|
|
||||||
@@ -194,8 +201,8 @@ removed as an active target.)
|
|||||||
**Current status: M7.1** — capsule birth protocol, Mama FORTH vocabulary, Tripod multi-VM
|
**Current status: M7.1** — capsule birth protocol, Mama FORTH vocabulary, Tripod multi-VM
|
||||||
fleet (Hera/Artemis/Hestia — Hermes moved into the kernel as kernel-Hermes, FABRIC-3.6.md
|
fleet (Hera/Artemis/Hestia — Hermes moved into the kernel as kernel-Hermes, FABRIC-3.6.md
|
||||||
Phase 4, 2026-09-22), and word-level ACL (Phases 1–7) are live; POST at boot verifies parity
|
Phase 4, 2026-09-22), and word-level ACL (Phases 1–7) are live; POST at boot verifies parity
|
||||||
hash across amd64/aarch64/riscv64 with a 530-word Mama capsule dictionary (word count as of
|
hash across amd64/aarch64/riscv64 with a 526-word Mama capsule dictionary (word count as of
|
||||||
the Phase 4 strip; verify against a live `PARITY:M7.1a word_count=` line before citing, it
|
2026-10-14, `FABRIC-3.md` §XXXVIII, hash `0x82f4ae7cb2e2d424`; verify against a live `PARITY:M7.1a word_count=` line before citing, it
|
||||||
changes with any new C word registration).
|
changes with any new C word registration).
|
||||||
|
|
||||||
**Key distinguishing features:**
|
**Key distinguishing features:**
|
||||||
@@ -207,7 +214,7 @@ changes with any new C word registration).
|
|||||||
produces a new capsule
|
produces a new capsule
|
||||||
- **Tripod** — a named multi-VM fleet (Hera the Mama VM, Artemis, Hestia) that births, runs,
|
- **Tripod** — a named multi-VM fleet (Hera the Mama VM, Artemis, Hestia) that births, runs,
|
||||||
and re-births independently; verified booting live pre-REPL on all three architectures.
|
and re-births independently; verified booting live pre-REPL on all three architectures.
|
||||||
Hermes moved into the kernel as kernel-Hermes (`src/starkernel/vm/kernel_hermes.c`) and is
|
Hermes moved into the kernel as kernel-Hermes (`kernel/src/vm/kernel_hermes.c`) and is
|
||||||
no longer a Tripod VM — see `FABRIC-3.5.md`/`FABRIC-3.6.md`, not the archived
|
no longer a Tripod VM — see `FABRIC-3.5.md`/`FABRIC-3.6.md`, not the archived
|
||||||
`.claude/TRIPOD.md`/`.claude/HERMES.md`/`.claude/ARTEMIS.md`.
|
`.claude/TRIPOD.md`/`.claude/HERMES.md`/`.claude/ARTEMIS.md`.
|
||||||
- Word-level ACL security system with kernel parity (see above) — measured overhead three
|
- Word-level ACL security system with kernel parity (see above) — measured overhead three
|
||||||
@@ -224,43 +231,44 @@ changes with any new C word registration).
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build kernel for a given architecture (amd64 default)
|
# Build kernel for a given architecture (amd64 default)
|
||||||
make -f Makefile.starkernel ARCH=amd64
|
make -f kernel/Makefile ARCH=amd64
|
||||||
make -f Makefile.starkernel ARCH=aarch64
|
make -f kernel/Makefile ARCH=aarch64
|
||||||
make -f Makefile.starkernel ARCH=riscv64
|
make -f kernel/Makefile ARCH=riscv64
|
||||||
|
|
||||||
# Run in QEMU with OVMF
|
# Run in QEMU with OVMF
|
||||||
make -f Makefile.starkernel qemu
|
make -f kernel/Makefile qemu
|
||||||
make -f Makefile.starkernel ARCH=aarch64 qemu
|
make -f kernel/Makefile ARCH=aarch64 qemu
|
||||||
make -f Makefile.starkernel ARCH=riscv64 qemu
|
make -f kernel/Makefile ARCH=riscv64 qemu
|
||||||
|
|
||||||
# Clean
|
# Clean
|
||||||
make -f Makefile.starkernel clean
|
make -f kernel/Makefile clean
|
||||||
```
|
```
|
||||||
|
|
||||||
Output: `build/<arch>/kernel/starkernel_loader.efi` + `build/<arch>/kernel/starkernel_kernel.elf`.
|
Output: `build/<arch>/kernel/starkernel_loader.efi` + `build/<arch>/kernel/starkernel_kernel.elf`.
|
||||||
|
|
||||||
Two independently tracked version strings flow into the generated `include/version.h`:
|
Two independently tracked version strings flow into the generated `include/version.h`:
|
||||||
`VERSION` (`Makefile.starkernel` — the embedded StarForth engine version, currently `3.1.0`;
|
`VERSION` (`kernel/Makefile` — the embedded StarForth engine version, currently `3.2.0`;
|
||||||
note this does **not** auto-sync with the standalone StarForth repo's own version) and
|
note this does **not** auto-sync with the standalone StarForth repo's own version) and
|
||||||
`LITHOS_VERSION` (`Makefile.starkernel` — the kernel version, currently **`2.0.0`**;
|
`LITHOS_VERSION` (`kernel/Makefile` — the kernel version, currently **`2.1.0`**, bumped at
|
||||||
corrected 2026-09-19 — this file said `2.0.1`, but `FABRIC-3.md` §I.2 rolled it back to
|
the `v2.1.0` tag that closed FABRIC-3.6; corrected 2026-10-14 -- this file said `3.1.0` /
|
||||||
`2.0.0` on 2026-09-04 because `2.0.1` names the SER5 hardware-track line and claims hardware
|
`2.0.0`. History: it said `2.0.1` until 2026-09-19, but `FABRIC-3.md` §I.2 had rolled that
|
||||||
progress not yet verified. The versioning policy is **semantic, not sequential** — see the
|
back to `2.0.0` on 2026-09-04 because `2.0.1` names the SER5 hardware-track line and claims
|
||||||
roadmap table in `Makefile.starkernel` before choosing any version).
|
hardware progress not yet verified. The versioning policy is **semantic, not sequential** — see the
|
||||||
|
roadmap table in `kernel/Makefile` before choosing any version).
|
||||||
|
|
||||||
### Build configuration (Kconfig — real, wired, not vestigial)
|
### Build configuration (Kconfig — real, wired, not vestigial)
|
||||||
|
|
||||||
Every kernel-only knob (`STARFORTH_ENABLE_VM`, `PARITY_MODE`, the shared physics/heartbeat
|
Every kernel-only knob (`STARFORTH_ENABLE_VM`, `PARITY_MODE`, the shared physics/heartbeat
|
||||||
family, etc.) is an optional Kconfig symbol defined across `Kconfig`, `Kconfig.arch`,
|
family, etc.) is an optional Kconfig symbol defined across `Kconfig`, `Kconfig.arch`,
|
||||||
`Kconfig.heartbeat`, `Kconfig.kernel`, `Kconfig.physics`, `Kconfig.variant` (~40 symbols
|
`Kconfig.heartbeat`, `Kconfig.kernel`, `Kconfig.physics`, `Kconfig.variant` (~40 symbols
|
||||||
total). `Makefile.starkernel` pulls its defaults from this system via a `kconfig_bool(...)`
|
total). `kernel/Makefile` pulls its defaults from this system via a `kconfig_bool(...)`
|
||||||
mechanism — e.g. `STARFORTH_ENABLE_VM` defaults to **1** (confirmed at
|
mechanism — e.g. `STARFORTH_ENABLE_VM` defaults to **1** (confirmed at
|
||||||
`Makefile.starkernel:61`), meaning a plain `make -f Makefile.starkernel` already builds with
|
`kernel/Makefile:61`), meaning a plain `make -f kernel/Makefile` already builds with
|
||||||
VM + capsule-birth + ACL active. A bare invocation uses the defaults it always has:
|
VM + capsule-birth + ACL active. A bare invocation uses the defaults it always has:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make -f Makefile.starkernel ARCH=amd64 menuconfig
|
make -f kernel/Makefile ARCH=amd64 menuconfig
|
||||||
make -f Makefile.starkernel ARCH=amd64 kernel_amd64_defconfig
|
make -f kernel/Makefile ARCH=amd64 kernel_amd64_defconfig
|
||||||
```
|
```
|
||||||
|
|
||||||
### Hosted VM (vendored, for local sanity only)
|
### Hosted VM (vendored, for local sanity only)
|
||||||
@@ -277,7 +285,7 @@ StarForth repo) were removed 2026-08-15 — they referenced
|
|||||||
in the actual generated `include/version.h` (which only has `STARFORTH_VERSION`,
|
in the actual generated `include/version.h` (which only has `STARFORTH_VERSION`,
|
||||||
`STARFORTH_ARCH`, `STARFORTH_TARGET`, `STARFORTH_TIMESTAMP`, `STARFORTH_VERSION_FULL`,
|
`STARFORTH_ARCH`, `STARFORTH_TARGET`, `STARFORTH_TIMESTAMP`, `STARFORTH_VERSION_FULL`,
|
||||||
`LITHOS_VERSION`, `LITHOS_VERSION_STR`), so they could never have worked. Bump versions by hand-editing the `VERSION`/
|
`LITHOS_VERSION`, `LITHOS_VERSION_STR`), so they could never have worked. Bump versions by hand-editing the `VERSION`/
|
||||||
`LITHOS_VERSION` variables in `Makefile.starkernel` instead. Report the broken targets if
|
`LITHOS_VERSION` variables in `kernel/Makefile` instead. Report the broken targets if
|
||||||
asked, don't silently fix them.
|
asked, don't silently fix them.
|
||||||
|
|
||||||
### Important: Linker Configuration
|
### Important: Linker Configuration
|
||||||
@@ -297,12 +305,23 @@ architectures in QEMU and capturing the serial log. There is no other test.
|
|||||||
The vendored hosted `make` build (above) is NEVER used to validate kernel changes.
|
The vendored hosted `make` build (above) is NEVER used to validate kernel changes.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Run in this exact order for every kernel change:
|
# Run in this exact order for every kernel change. v4 is the default (2026-10-14):
|
||||||
make -f Makefile.starkernel ARCH=amd64 clean qemu
|
make -f kernel/Makefile ARCH=amd64 clean qemu
|
||||||
make -f Makefile.starkernel ARCH=aarch64 clean qemu
|
make -f kernel/Makefile ARCH=aarch64 clean qemu
|
||||||
make -f Makefile.starkernel ARCH=riscv64 clean qemu
|
make -f kernel/Makefile ARCH=riscv64 clean qemu
|
||||||
|
# ...and the 32-bit build -- v4 with 32-bit cells, the F18/Zynq (FPGA) case: its nucleus
|
||||||
|
# image and every v4 test at that width (no QEMU; not a substitute for the boots above):
|
||||||
|
make -C v4 test-32
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**v4 is the default build (Captain Bob, 2026-10-14: "v4 is the default build ... no, qemu to v4
|
||||||
|
too ... we are effectively trying to retire v3").** Every kernel build carries v4 and v3 and
|
||||||
|
boots v4; `system=v3` in the boot arguments (`KERNEL_ARGS` for QEMU, `starforth.cfg` /
|
||||||
|
`cmdline.txt` on a board's medium) boots v3. `STARFORTH_V4=0` builds v3 alone. The boot prints
|
||||||
|
which system runs and why ("System: ..."). See `boards/BRINGUP.md` A6, `FABRIC-3.md` §XLIII.
|
||||||
|
**v3 is not part of acceptance** (Captain Bob, 2026-10-14: "i don't care about v3"). It is still
|
||||||
|
in the tree and `system=v3` still boots it, but nothing is accepted or refused on its account.
|
||||||
|
|
||||||
**QEMU rule — non-negotiable:** Only ONE QEMU instance may run at a time, always in the
|
**QEMU rule — non-negotiable:** Only ONE QEMU instance may run at a time, always in the
|
||||||
foreground (never backgrounded). All three instances use `accel=tcg` (software emulation);
|
foreground (never backgrounded). All three instances use `accel=tcg` (software emulation);
|
||||||
concurrent runs compete for host CPU and corrupt the timing signal the DoE measures.
|
concurrent runs compete for host CPU and corrupt the timing signal the DoE measures.
|
||||||
@@ -322,8 +341,13 @@ audit artifacts — they are committed to the repo. Do not delete them. There is
|
|||||||
timestamped convention (self-documented via its own README); not a contradiction, just a
|
timestamped convention (self-documented via its own README); not a contradiction, just a
|
||||||
second, less-structured log location.
|
second, less-structured log location.
|
||||||
|
|
||||||
Do not claim a change is accepted until all three architectures have booted
|
Do not claim a change is accepted until all three architectures have booted, and their logs are
|
||||||
to `zuse)ok>` and their logs are present in `logs/`.
|
present in `logs/`:
|
||||||
|
- **as built (v4)** to `ok> `, with `PARITY:V4_POST tests=538 pass=538 fail=0` (the count
|
||||||
|
grows with v4's POST) and `POST: PASSED`, and `PARITY:V4_SYSTEM ... dict_hash=` equal across
|
||||||
|
the three;
|
||||||
|
- **the 32-bit build** (Captain Bob, 2026-10-14: "the 32 bit build needs to go into the
|
||||||
|
acceptance test too"): `make -C v4 test-32` passes -- every test, `0 failures`.
|
||||||
|
|
||||||
### CI
|
### CI
|
||||||
|
|
||||||
@@ -340,41 +364,45 @@ it ships a raw disk image instead). No QEMU boot step in CI — artifact packagi
|
|||||||
### Source Tree
|
### Source Tree
|
||||||
|
|
||||||
```
|
```
|
||||||
src/
|
v3/ # hosted StarForth product AND the shared engine source
|
||||||
├── main.c, vm.c, vm_api.c, vm_bootstrap.c, vm_debug.c, vm_time.c # Vendored VM core (see below)
|
├── Makefile # hosted build (bare `make` at the repo root forwards here)
|
||||||
├── repl.c, cli.c, io.c, log.c # Vendored VM core
|
├── include/ # vm.h, version.h — the only VM headers (no top-level `include/`)
|
||||||
├── memory_management.c, dictionary_management.c, block_subsystem.c, blkio_*.c
|
└── src/
|
||||||
├── stack_management.c, math_portable.c, profiler.c, compudynamics.c
|
├── main.c, vm.c, vm_api.c, vm_bootstrap.c, vm_debug.c, vm_time.c # Shared VM core (see below)
|
||||||
├── heartbeat_export.c, ssm_jacquard.c, doe_metrics.c
|
├── repl.c, cli.c, io.c, log.c # Shared VM core
|
||||||
├── physics_runtime.c, physics_hotwords_cache.c, physics_metadata.c,
|
├── memory_management.c, dictionary_management.c, block_subsystem.c, blkio_*.c
|
||||||
│ physics_pipelining_metrics.c, physics_execution_hooks.c,
|
├── stack_management.c, math_portable.c, profiler.c, compudynamics.c
|
||||||
│ rolling_window_of_truth.c, inference_engine.c # 7 feedback loops
|
├── heartbeat_export.c, ssm_jacquard.c, doe_metrics.c
|
||||||
├── vm.c.bak, doe_metrics.c.bak, inference_engine.c.bak # tracked but stale — flag, don't delete unprompted
|
├── physics_runtime.c, physics_hotwords_cache.c, physics_metadata.c,
|
||||||
│
|
│ physics_pipelining_metrics.c, physics_execution_hooks.c,
|
||||||
├── word_source/ # 31 files (vendored StarForth word_source PLUS
|
│ rolling_window_of_truth.c, inference_engine.c # 7 feedback loops
|
||||||
│ │ # kernel-side-only additions)
|
├── word_source/ # 35 files (StarForth word_source PLUS
|
||||||
│ ├── (all of StarForth's 26: arithmetic, stack, control, defining, memory,
|
│ │ # kernel-side-only additions)
|
||||||
│ │ return_stack, double, logical, io, string, block, editor, format, system,
|
│ ├── (StarForth's ~26: arithmetic, stack, control, defining, memory,
|
||||||
│ │ dictionary, dictionary_manipulation, dictionary_heat_diagnostic, vocabulary,
|
│ │ return_stack, double, logical, io, string, block, editor, format, system,
|
||||||
│ │ q48_16, starforth, acl, physics_benchmark, physics_diagnostic,
|
│ │ dictionary, dictionary_manipulation, dictionary_heat_diagnostic, vocabulary,
|
||||||
│ │ physics_freeze, physics_pipelining_diagnostic, mixed_arithmetic)
|
│ │ q48_16, starforth, acl, physics_benchmark, physics_diagnostic,
|
||||||
│ └── kernel-only additions: defer_words.c, inference_words.c,
|
│ │ physics_freeze, physics_pipelining_diagnostic, mixed_arithmetic)
|
||||||
│ lifecycle_words_hosted.c, log_words.c, q48_words.c
|
│ ├── kernel-side-only additions: defer_words.c, inference_words.c,
|
||||||
│
|
│ │ lifecycle_words_hosted.c, log_words.c, q48_words.c
|
||||||
├── test_runner/ # 23 test module files (matches StarForth's count)
|
│ └── console/input words: framebuffer_words.c, keyboard_words.c,
|
||||||
│
|
│ scroll_words.c, ttf_words.c
|
||||||
├── platform/ # Platform abstraction (hosted build)
|
├── test_runner/ # 26 test module files
|
||||||
│
|
└── platform/ # Platform abstraction (hosted build)
|
||||||
└── starkernel/ # ~74 files — the real, load-bearing kernel tree
|
|
||||||
├── kernel_main.c # Kernel entry point (M0–M9 milestones)
|
kernel/ # LithosAnanke — the real, load-bearing kernel tree
|
||||||
│ # NOTE: this file's own header comment claims
|
├── Makefile # UEFI loader + kernel ELF + QEMU; embeds a subset of v3/src
|
||||||
│ # "M7: Not started" — that comment is STALE;
|
├── include/starkernel/ # kernel-only headers
|
||||||
│ # M7/M7.1/M7.pre logic is present and functional
|
└── src/
|
||||||
│ # (kernel_main.c ~lines 481–517). Don't propagate
|
├── kernel_main.c # Kernel entry point (M0–M9 milestones)
|
||||||
│ # the stale comment.
|
│ # NOTE: this file's own header comment claims
|
||||||
|
│ # "M7: Not started" — that comment is STALE;
|
||||||
|
│ # M7/M7.1/M7.pre logic is present and functional
|
||||||
|
│ # (kernel_main.c ~lines 481–517). Don't propagate
|
||||||
|
│ # the stale comment.
|
||||||
├── repl.c # Kernel REPL
|
├── repl.c # Kernel REPL
|
||||||
├── arch/{amd64,aarch64,riscv64}/ # Per-arch: arch.c apic.c timer.c interrupts.c boot.S isr.S
|
├── arch/{amd64,aarch64,riscv64}/ # Per-arch: arch.c apic.c timer.c interrupts.c boot.S isr.S
|
||||||
├── boot/ # uefi_loader.c elf_loader.c reloc_stub.c reloc.S
|
├── boot/ # uefi_loader.c elf_loader.c cmdline.c reloc_stub.c reloc.S
|
||||||
├── capsule/ # capsule_birth.c capsule_run.c capsule_loader.c
|
├── capsule/ # capsule_birth.c capsule_run.c capsule_loader.c
|
||||||
│ # capsule_find.c capsule_validate.c capsule_vm_hooks.c
|
│ # capsule_find.c capsule_validate.c capsule_vm_hooks.c
|
||||||
│ # capsule_vm_physics.c mama_forth_words.c
|
│ # capsule_vm_physics.c mama_forth_words.c
|
||||||
@@ -389,10 +417,15 @@ src/
|
|||||||
├── math/q48_16.c # Q48.16 fixed-point (kernel build)
|
├── math/q48_16.c # Q48.16 fixed-point (kernel build)
|
||||||
├── hash/xxhash64.c # XXHash64 (content addressing)
|
├── hash/xxhash64.c # XXHash64 (content addressing)
|
||||||
├── doe_log.c
|
├── doe_log.c
|
||||||
|
├── artemis_sig.c homeblocks_sig.c heartbeat.c log_region.c # kernel services
|
||||||
|
├── crypto/ rng/ usb/ # PKI (Ed25519), entropy, USB
|
||||||
|
├── v4/sk_v4.c # bare-metal embed of the v4 engine (STARFORTH_V4=1)
|
||||||
└── vm/ # Kernel VM subsystem
|
└── vm/ # Kernel VM subsystem
|
||||||
├── bootstrap/sk_vm_bootstrap.c
|
├── bootstrap/sk_vm_bootstrap.c
|
||||||
├── host/shim.c
|
├── host/shim.c
|
||||||
├── vm_core.c vm_runtime.c vm_bootstrap.c q48_stubs.c
|
├── vm_core.c vm_runtime.c vm_bootstrap.c q48_stubs.c
|
||||||
|
├── kernel_hermes.c # kernel-Hermes (post-reshuffle)
|
||||||
|
├── session.c stadium.c stadium_blocks.c stadium_words.c switch.c
|
||||||
├── parity.c # Birth/execution parity logging
|
├── parity.c # Birth/execution parity logging
|
||||||
├── arena.c # Capsule arena allocator
|
├── arena.c # Capsule arena allocator
|
||||||
└── alloc_kernel.c
|
└── alloc_kernel.c
|
||||||
@@ -419,7 +452,7 @@ UEFI Firmware → uefi_loader.c (BOOTX64.EFI / BOOTAA64.EFI / BOOTRISCV64.EFI)
|
|||||||
- ✅ M0–M6: complete, v1.5.1-FINAL
|
- ✅ M0–M6: complete, v1.5.1-FINAL
|
||||||
- ✅ M7: StarForth VM integration + parity validation, complete
|
- ✅ M7: StarForth VM integration + parity validation, complete
|
||||||
- 🔄 M7.1: capsule birth protocol · Mama FORTH vocabulary · Tripod fleet · word-level ACL —
|
- 🔄 M7.1: capsule birth protocol · Mama FORTH vocabulary · Tripod fleet · word-level ACL —
|
||||||
in progress (Phase 8 PKI is the open item, see ACL section above)
|
in progress (Phase 8 PKI closed 2026-10-14, see ACL section above)
|
||||||
- Planned: M8 (REPL keyboard input), M9 (block storage — see the virtio note above; source
|
- Planned: M8 (REPL keyboard input), M9 (block storage — see the virtio note above; source
|
||||||
exists but milestone-complete status not independently verified here)
|
exists but milestone-complete status not independently verified here)
|
||||||
|
|
||||||
@@ -475,7 +508,7 @@ listed in `proof/ROOT` (corrected 2026-09-19; this file said 23, and `proof/COVE
|
|||||||
said 52 all along). **Read `proof/COVERAGE.md` first**: its stated goal is not a green build but
|
said 52 all along). **Read `proof/COVERAGE.md` first**: its stated goal is not a green build but
|
||||||
"identify precisely what cannot be proven and why — the boundary between 'formally verified'
|
"identify precisely what cannot be proven and why — the boundary between 'formally verified'
|
||||||
and 'not, for this specific reason'." Run `isabelle build -D proof/`
|
and 'not, for this specific reason'." Run `isabelle build -D proof/`
|
||||||
directly; neither `Makefile` nor `Makefile.starkernel` in this repo defines an
|
directly; neither `Makefile` nor `kernel/Makefile` in this repo defines an
|
||||||
`isabelle-build`/`isabelle-check` target (unlike the standalone StarForth repo, which has a
|
`isabelle-build`/`isabelle-check` target (unlike the standalone StarForth repo, which has a
|
||||||
broken one — this repo simply doesn't have the target at all, so there's nothing to
|
broken one — this repo simply doesn't have the target at all, so there's nothing to
|
||||||
mistakenly invoke).
|
mistakenly invoke).
|
||||||
@@ -484,7 +517,7 @@ mistakenly invoke).
|
|||||||
|
|
||||||
## Roadmap
|
## Roadmap
|
||||||
|
|
||||||
`ROADMAP.md` and `docs/lithosananke/ROADMAP.md` contain real, LithosAnanke-specific phase
|
`ROADMAP.md` and `docs/reference/ROADMAP.md` contain real, LithosAnanke-specific phase
|
||||||
content (e.g. "PHASE 2: STARKERNEL (Months 3-5)", "StarKernel boots to 'ok' on QEMU ✅") —
|
content (e.g. "PHASE 2: STARKERNEL (Months 3-5)", "StarKernel boots to 'ok' on QEMU ✅") —
|
||||||
not a copy of the standalone StarForth repo's roadmap. Prefer these when citing roadmap
|
not a copy of the standalone StarForth repo's roadmap. Prefer these when citing roadmap
|
||||||
status for kernel work.
|
status for kernel work.
|
||||||
@@ -495,13 +528,13 @@ status for kernel work.
|
|||||||
|
|
||||||
- **Strict ANSI C99** — No GNU extensions, no C++ features
|
- **Strict ANSI C99** — No GNU extensions, no C++ features
|
||||||
- **Zero warnings target, with four explicit exceptions — corrected 2026-08-18, previous
|
- **Zero warnings target, with four explicit exceptions — corrected 2026-08-18, previous
|
||||||
claim was wrong.** Build with `-Wall -Wextra -Werror`, but `Makefile.starkernel` carries
|
claim was wrong.** Build with `-Wall -Wextra -Werror`, but `kernel/Makefile` carries
|
||||||
`-Wno-error=unused-parameter -Wno-error=shift-negative-value -Wno-error=sign-compare
|
`-Wno-error=unused-parameter -Wno-error=shift-negative-value -Wno-error=sign-compare
|
||||||
-Wno-error=missing-field-initializers` — those four classes are enabled (still visible as
|
-Wno-error=missing-field-initializers` — those four classes are enabled (still visible as
|
||||||
warnings) but deliberately downgraded from fatal, everything else is. The previous version
|
warnings) but deliberately downgraded from fatal, everything else is. The previous version
|
||||||
of this line claimed `-Wmissing-field-initializers` was isolated to one file
|
of this line claimed `-Wmissing-field-initializers` was isolated to one file
|
||||||
(`vocabulary_words_test.c`) — that was never accurate; a full audit found it systemic
|
(`vocabulary_words_test.c`) — that was never accurate; a full audit found it systemic
|
||||||
across 20 files in `src/test_runner/modules/` (all missing the same later-added
|
across 20 files in `v3/src/test_runner/modules/` (all missing the same later-added
|
||||||
`TestCase.contract`/`WordTestSuite.suite_contract` trailing field, ~3,010 instances). Fixed
|
`TestCase.contract`/`WordTestSuite.suite_contract` trailing field, ~3,010 instances). Fixed
|
||||||
in place across all 20 files (mechanical: added the missing `{0}` initializer, semantically
|
in place across all 20 files (mechanical: added the missing `{0}` initializer, semantically
|
||||||
a no-op since C99 already zero-fills unlisted trailing fields — the fix only silences the
|
a no-op since C99 already zero-fills unlisted trailing fields — the fix only silences the
|
||||||
@@ -533,14 +566,14 @@ status for kernel work.
|
|||||||
|
|
||||||
### DoE CSV Output Suppression
|
### DoE CSV Output Suppression
|
||||||
|
|
||||||
Intentionally suppressed as of 2025-12-08. See `src/main.c:390-396`:
|
Intentionally suppressed as of 2025-12-08. See `v3/src/main.c:390-396`:
|
||||||
- Metrics still collected via `metrics_from_vm()`
|
- Metrics still collected via `metrics_from_vm()`
|
||||||
- CSV row was redundant with internal VM metrics
|
- CSV row was redundant with internal VM metrics
|
||||||
- To re-enable: add a `--csv-export` flag or write to a file
|
- To re-enable: add a `--csv-export` flag or write to a file
|
||||||
|
|
||||||
### Heartbeat Instrumentation (Planned)
|
### Heartbeat Instrumentation (Planned)
|
||||||
|
|
||||||
`HeartbeatTickSnapshot` and `tick_buffer` are declared in `include/vm.h`,
|
`HeartbeatTickSnapshot` and `tick_buffer` are declared in `v3/include/vm.h`,
|
||||||
but `heartbeat_export_csv()` is **not yet implemented**.
|
but `heartbeat_export_csv()` is **not yet implemented**.
|
||||||
|
|
||||||
### Word Statistics Output
|
### Word Statistics Output
|
||||||
@@ -558,25 +591,28 @@ capsule and compare dict hashes. Zero-deviation means 0% algorithmic variance.
|
|||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Key files (this repo has both the older `docs/03-architecture/` tree — still current for
|
**Start at `docs/README.md`** -- the map: where each kind of document lives and which one is
|
||||||
ACL/Tripod specifically — and the newer restructured `docs/formal/`/`docs/working/`/
|
authoritative for what. `docs/INDEX.md` lists every document with its status;
|
||||||
`docs/patent/` trees, plus a repo-specific `docs/lithosananke/` tree):
|
`docs/DEAD-AND-REVISED.md` is the register of abandoned ideas and revised claims. (Reorganised
|
||||||
|
2026-10-14: the old `docs/03-architecture/` and `docs/lithosananke/` trees are gone -- their
|
||||||
|
current parts are in `docs/reference/`, the rest in `docs/working/archive/`.)
|
||||||
|
|
||||||
- `README.md` — project overview and quick start
|
- `README.md` -- project overview and quick start
|
||||||
- `docs/lithosananke/SYSTEM_ARCHITECTURE.md` — full kernel + VM design
|
- `docs/fabric/` -- the design and work record (`FABRIC-3.md` living; the others closed)
|
||||||
- `docs/lithosananke/hal/` — HAL reference
|
- `docs/v4.0.0/` -- StarForth v4 design
|
||||||
- `docs/lithosananke/M7.1.md` — capsule birth protocol design
|
- `docs/reference/` -- current reference: `ROADMAP.md` (roadmap and versioning policy),
|
||||||
- `docs/lithosananke/ROADMAP.md` — milestone plan through self-hosting
|
`M7.1.md` (capsule birth protocol), `word-acl/DESIGN.md` (word-level ACL), `kernel-args/`,
|
||||||
- `docs/lithosananke/hosted-acceptance-test/README.md` — the hosted-VM acceptance test
|
`hosted-acceptance-test/`, `DICTIONARY.md`, `STARFORTH_PRIMITIVES.md`, `ONTOLOGY.md`
|
||||||
writeup referenced from the standalone StarForth repo's own docs
|
- `boards/BRINGUP.md` -- bare-metal bring-up checklist and blockers
|
||||||
- `docs/03-architecture/tripod/`, `docs/03-architecture/word-acl/DESIGN.md`
|
- `kernel/src/hal/README.md` -- the HAL as built (the proposed `hal_*` contract was never
|
||||||
- `docs/working/architecture/VM-FLEET-ATTRACTOR-DESIGN-20260705.md` — Tripod/Hermes/Artemis
|
adopted; it is archived as dead)
|
||||||
physics + build-system history
|
- `docs/working/architecture/VM-FLEET-ATTRACTOR-DESIGN-20260705.md` -- fleet physics and
|
||||||
- `docs/working/architecture/getting-started/DEVELOPER.md` — dev setup, Kconfig reference
|
build-system history (pre-reshuffle: it still names the Hermes VM)
|
||||||
- `ROADMAP.md`, `CHANGELOG.md`
|
- `docs/working/architecture/getting-started/DEVELOPER.md` -- dev setup, Kconfig reference
|
||||||
- `experiments/bare_metal/README.md` — **mandatory read before touching capsules** (block
|
- `CHANGELOG.md`
|
||||||
|
- `experiments/bare_metal/README.md` -- **mandatory read before touching capsules** (block
|
||||||
namespace rules, see ACL section above)
|
namespace rules, see ACL section above)
|
||||||
- `experiments/bare_metal/analysis/report/bare_metal_doe_report.pdf` — DoE campaign report
|
- `experiments/bare_metal/analysis/report/bare_metal_doe_report.pdf` -- DoE campaign report
|
||||||
- `sbom.spdx` / `sbom.spdx.json`
|
- `sbom.spdx` / `sbom.spdx.json`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -74,3 +74,6 @@ tools/kconfig/.qconf.*
|
|||||||
# tools/capsule-reserved.txt (human-authored) and tools/patches/ (decision
|
# tools/capsule-reserved.txt (human-authored) and tools/patches/ (decision
|
||||||
# record) are NOT ignored — those are tracked deliberately.
|
# record) are NOT ignored — those are tracked deliberately.
|
||||||
/tools/capsule-claims.txt
|
/tools/capsule-claims.txt
|
||||||
|
/.directory
|
||||||
|
# Agent worktrees are never to be used in this repo (Captain Bob's Law); ignored so a stray one is never tracked.
|
||||||
|
/.claude/worktrees/
|
||||||
|
|||||||
+5
-1
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2026-10-09 — StarForth v4.0.0 Step 6e review and wire refinement
|
||||||
|
|
||||||
|
Implemented whole-message handling on the engine wire (`d5cd6460`), ensured nodes only process one message at a time (`b1d09af0`), and refined message processing logic (`6a7d0aa2`, `f1419e73`). Fixed wake-up order, room checks, and overflow issues during message transit (`83694b18`).
|
||||||
|
|
||||||
Milestone-level achievements only — not a commit log. For full history see
|
Milestone-level achievements only — not a commit log. For full history see
|
||||||
`git log` on the relevant branch. Two products share this file:
|
`git log` on the relevant branch. Two products share this file:
|
||||||
**StarForth** (hosted FORTH-79 VM, `master`) and **LithosAnanke** (bare-metal
|
**StarForth** (hosted FORTH-79 VM, `master`) and **LithosAnanke** (bare-metal
|
||||||
@@ -100,7 +104,7 @@ on both branches, plus the now-orphaned `scripts/pgo-workload.sh`. Verified
|
|||||||
Also proved out and documented, for the first time, that the hosted VM
|
Also proved out and documented, for the first time, that the hosted VM
|
||||||
starts cleanly not just on amd64 but on aarch64 and riscv64 too (cross-built,
|
starts cleanly not just on amd64 but on aarch64 and riscv64 too (cross-built,
|
||||||
run under `qemu-{aarch64,riscv64}-static` user-mode emulation) —
|
run under `qemu-{aarch64,riscv64}-static` user-mode emulation) —
|
||||||
`docs/lithosananke/hosted-acceptance-test/README.md`. This is what surfaced
|
`docs/reference/hosted-acceptance-test/README.md`. This is what surfaced
|
||||||
the `blk_ram` sizing bug above.
|
the `blk_ram` sizing bug above.
|
||||||
|
|
||||||
## 2026-07-07 – 2026-07-08 — Kconfig build-configuration system (both, committed on `lithosananke`)
|
## 2026-07-07 – 2026-07-08 — Kconfig build-configuration system (both, committed on `lithosananke`)
|
||||||
|
|||||||
+2
-2
@@ -9,7 +9,7 @@ Thank you for your interest in contributing to StarForth! This document provides
|
|||||||
3. **Run tests**: `make test` (all 780+ tests must pass)
|
3. **Run tests**: `make test` (all 780+ tests must pass)
|
||||||
4. **Read** [ONTOLOGY.md](ONTOLOGY.md) for formal definitions and terminology
|
4. **Read** [ONTOLOGY.md](ONTOLOGY.md) for formal definitions and terminology
|
||||||
5. **Read** `docs/CLAUDE.md` for project overview
|
5. **Read** `docs/CLAUDE.md` for project overview
|
||||||
6. **Explore** `docs/03-architecture/` for architecture details
|
6. **Explore** `docs/README.md` (the documentation map) for architecture details
|
||||||
|
|
||||||
**Important:** All contributors must use terminology from [ONTOLOGY.md](ONTOLOGY.md) in code comments and documentation. This ensures precise, academically rigorous language throughout the project.
|
**Important:** All contributors must use terminology from [ONTOLOGY.md](ONTOLOGY.md) in code comments and documentation. This ensures precise, academically rigorous language throughout the project.
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ void function_name(VM *vm) {
|
|||||||
### Platform Abstraction
|
### Platform Abstraction
|
||||||
- **Never** call platform-specific APIs directly from VM code
|
- **Never** call platform-specific APIs directly from VM code
|
||||||
- **Always** use HAL interfaces (`hal_time.h`, `hal_memory.h`, etc.)
|
- **Always** use HAL interfaces (`hal_time.h`, `hal_memory.h`, etc.)
|
||||||
- See `docs/03-architecture/hal/` for HAL documentation
|
- See `kernel/src/hal/README.md` for the HAL as built
|
||||||
|
|
||||||
### Memory Safety
|
### Memory Safety
|
||||||
- Use `vaddr_t` for VM addresses (not C pointers)
|
- Use `vaddr_t` for VM addresses (not C pointers)
|
||||||
|
|||||||
@@ -933,10 +933,12 @@ WARN_LOGFILE = docs/api/doxygen_warnings.log
|
|||||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||||
# Note: If this tag is empty the current directory is searched.
|
# Note: If this tag is empty the current directory is searched.
|
||||||
|
|
||||||
INPUT = include \
|
INPUT = v3/include \
|
||||||
src \
|
v3/src \
|
||||||
src/word_source \
|
v3/src/word_source \
|
||||||
src/test_runner \
|
v3/src/test_runner \
|
||||||
|
kernel/include \
|
||||||
|
kernel/src \
|
||||||
README.md
|
README.md
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
@@ -2366,9 +2368,10 @@ SEARCH_INCLUDES = YES
|
|||||||
# RECURSIVE has no effect here.
|
# RECURSIVE has no effect here.
|
||||||
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
||||||
|
|
||||||
INCLUDE_PATH = include \
|
INCLUDE_PATH = v3/include \
|
||||||
src/word_source/include \
|
kernel/include \
|
||||||
src/test_runner/include
|
v3/src/word_source/include \
|
||||||
|
v3/src/test_runner/include
|
||||||
|
|
||||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ choice
|
|||||||
default ARCH_AMD64
|
default ARCH_AMD64
|
||||||
help
|
help
|
||||||
Selects the value passed as ARCH= to whichever Makefile
|
Selects the value passed as ARCH= to whichever Makefile
|
||||||
(Makefile or Makefile.starkernel) is driven from this config.
|
(Makefile or kernel/Makefile) is driven from this config.
|
||||||
Both Makefiles already accept "amd64"/"aarch64"/"riscv64" as
|
Both Makefiles already accept "amd64"/"aarch64"/"riscv64" as
|
||||||
canonical spellings (each has its own alias-normalizing logic
|
canonical spellings (each has its own alias-normalizing logic
|
||||||
for other spellings like x86_64/arm64/riscv), so this choice
|
for other spellings like x86_64/arm64/riscv), so this choice
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ config HEARTBEAT_THREAD_ENABLED
|
|||||||
builds without needing a special case. This is UI/model
|
builds without needing a special case. This is UI/model
|
||||||
correctness (menuconfig can't offer a choice LithosAnanke has no
|
correctness (menuconfig can't offer a choice LithosAnanke has no
|
||||||
way to honor -- there are no pthreads in a freestanding kernel),
|
way to honor -- there are no pthreads in a freestanding kernel),
|
||||||
not the sole enforcement mechanism: Makefile.starkernel additionally
|
not the sole enforcement mechanism: kernel/Makefile additionally
|
||||||
keeps its own unconditional `VM_FEATURE_OVERRIDES +=
|
keeps its own unconditional `VM_FEATURE_OVERRIDES +=
|
||||||
-DHEARTBEAT_THREAD_ENABLED=0` post-override exactly as it was
|
-DHEARTBEAT_THREAD_ENABLED=0` post-override exactly as it was
|
||||||
before this migration. Deliberately redundant with the `depends
|
before this migration. Deliberately redundant with the `depends
|
||||||
|
|||||||
+14
-1
@@ -11,7 +11,20 @@ config STARFORTH_ENABLE_VM
|
|||||||
kernel that only reaches the M0-M6 hardware milestones (console,
|
kernel that only reaches the M0-M6 hardware milestones (console,
|
||||||
PMM, VMM, interrupts, timers, kmalloc) with no FORTH interpreter,
|
PMM, VMM, interrupts, timers, kmalloc) with no FORTH interpreter,
|
||||||
no capsules, no "ok" REPL. Gates a large source-file selection
|
no capsules, no "ok" REPL. Gates a large source-file selection
|
||||||
block in Makefile.starkernel, not just a handful of -D flags.
|
block in kernel/Makefile, not just a handful of -D flags.
|
||||||
|
|
||||||
|
config STARFORTH_V4
|
||||||
|
bool "Build StarForth v4, the F18-derived engine, in -- and boot it (STARFORTH_V4)"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
The kernel carries StarForth v4 as well as v3 and boots v4: one
|
||||||
|
host node, after the M0-M6 hardware milestones, of the golden model
|
||||||
|
of the 32-opcode engine (v4/src) running the capsule image built
|
||||||
|
from v4/capsule, with its console on the kernel's serial console;
|
||||||
|
it reaches v4's "ok> " prompt. `system=v3` in the boot arguments
|
||||||
|
boots the v3 VM and its fleet instead. On by default since
|
||||||
|
2026-10-14: v3 is being retired. Off builds v3 alone. See
|
||||||
|
docs/v4.0.0/DECOMPOSITION.md and boards/BRINGUP.md A6.
|
||||||
|
|
||||||
config PARITY_MODE
|
config PARITY_MODE
|
||||||
bool "Deterministic parity harness mode (PARITY_MODE)"
|
bool "Deterministic parity harness mode (PARITY_MODE)"
|
||||||
|
|||||||
@@ -1,95 +1,138 @@
|
|||||||
# LithosAnanke v2.0.1
|
# LithosAnanke v2.1.0
|
||||||
|
|
||||||
**UEFI-bootable FORTH microkernel.** Boots from firmware, initialises memory and interrupts, then runs the StarForth VM as its sole userspace runtime. No libc. No OS. Just stone and necessity.
|
**UEFI-bootable FORTH microkernel.** Boots from firmware, initialises memory and interrupts, then
|
||||||
|
runs StarForth as its sole userspace runtime. No libc. No OS. Just stone and necessity.
|
||||||
|
|
||||||
*Lithos* (foundation) + *Ananke* (necessity) — the kernel under StarshipOS.
|
*Lithos* (foundation) + *Ananke* (necessity) — the kernel under StarshipOS.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Status — M7.1 (Capsule System · Multi-VM Fleet)
|
## Products
|
||||||
|
|
||||||
|
StarForth v4 moves the engine onto a 32-instruction core derived from Chuck Moore's F18
|
||||||
|
(`docs/v4.0.0/`). With it, this repository carries three products, not one:
|
||||||
|
|
||||||
|
| Product | What it is |
|
||||||
|
|---|---|
|
||||||
|
| **Hosted StarForth F18** | The v4 engine as a native Linux build, for amd64, arm64 and riscv64. |
|
||||||
|
| **FPGA StarForth F18** | A 32-bit build of the same engine loaded into the FPGA: the gateway to the rest, the foundation everything else is built up from. |
|
||||||
|
| **StarshipOS** | The bare-metal product: LithosAnanke running StarForth. |
|
||||||
|
|
||||||
|
FORTH-79 is recomposed on the F18 engine and stored as a capsule; the StarshipOS-specific
|
||||||
|
vocabulary gets the same treatment. v3 remains the reference system until v4 meets its
|
||||||
|
acceptance criteria (`docs/v4.0.0/JUSTIFICATION.md` §16). **Both run on bare metal now:** every
|
||||||
|
board image carries v4 and v3, boots v4 as built, and one word in its boot configuration
|
||||||
|
chooses (see below).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Status
|
||||||
|
|
||||||
| Milestone | | Status |
|
| Milestone | | Status |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| M0–M6 | UEFI boot · PMM · VMM · IDT · APIC · heap · framebuffer VT100 console (v1.5.1-FINAL) | ✅ Complete |
|
| M0–M6 | UEFI boot · PMM · VMM · IDT · APIC · heap · framebuffer VT100 console | ✅ Complete |
|
||||||
| M7 | StarForth VM integration + parity validation | ✅ Complete |
|
| M7 | StarForth VM integration + parity validation | ✅ Complete |
|
||||||
| **M7.1** | **Capsule birth protocol · Mama FORTH vocabulary · Tripod multi-VM fleet (Hermes/Artemis) · Word-level ACL (Phases 1–7)** | 🔄 **In Progress** |
|
| M7.1 | Capsule birth · Mama FORTH vocabulary · the Tripod fleet · kernel-Hermes · word-level ACL | ✅ Live |
|
||||||
| M8 | REPL — keyboard input, interactive Forth | Planned |
|
| M8 | Keyboard input to the REPL — PS/2, virtio and **USB** keyboards (a full keyboard: Caps/Num Lock, keypad) | ✅ In QEMU, all three ISAs |
|
||||||
| M9 | Block storage — AHCI driver | Planned |
|
| M9 | Block storage — Artemis's disk on virtio-blk; identity thumbdrives on USB mass storage | ✅ In QEMU · real disks: no driver yet (`boards/BRINGUP.md` A4) |
|
||||||
|
| Bare metal | a generic PC (amd64; first on the bench: a Beelink SER5), Raspberry Pi 5 (aarch64), Milk-V Mars (riscv64); Zynq-7020 (ARMv7) not yet ported | Images build; first boots on the bench — `boards/BRINGUP.md` |
|
||||||
|
|
||||||
POST at boot: **parity hash verified across amd64/aarch64/riscv64 · Mama capsule dictionary: 453 words**
|
**v4 is the default build, and v3 is being retired**: every kernel boots v4 unless its boot
|
||||||
|
arguments say `system=v3`. POST at boot, on all three ISAs: v4 — **538 tests**,
|
||||||
|
`PARITY:V4_SYSTEM word_count=317 dict_hash=0xe5a57f3eb72ff94a`; v3 — **1052 tests**,
|
||||||
|
`PARITY:M7.1a word_count=526 hash=0x82f4ae7cb2e2d424`.
|
||||||
|
|
||||||
### What's live in M7.1
|
### What's live
|
||||||
|
|
||||||
- **Tripod** — a named multi-VM fleet (Hera the Mama VM, Artemis, two Hermes
|
- **The Tripod** — a named multi-VM fleet: **Hera** (the Mama VM, the governor), **Artemis**
|
||||||
instances) births, runs, and re-births independently, verified booting
|
(block storage: a Block Allocation Map with Q48.16 block heat, cooldown and reclamation) and
|
||||||
live pre-REPL on all three architectures.
|
**Hestia**, birthed, run and re-birthed independently on all three architectures.
|
||||||
- **Hermes** — a 17-block inter-VM messaging/channel layer between fleet
|
- **kernel-Hermes** — messaging moved into the kernel (the Hermes VM is gone,
|
||||||
members, with async delivery and channel negotiation.
|
`docs/fabric/FABRIC-3.5.md`): every VM takes its own messages on its own turn, under a
|
||||||
- **Artemis** — a Block Allocation Map (BAM) storage subsystem with Q48.16
|
cooperative switcher that every VM takes part in.
|
||||||
block-heat tracking and cooldown/reclamation (`ART-COOL`/`ART-REAP`).
|
- **Identities on thumbdrives** — Zuse, the superuser, and every user is a minted USB
|
||||||
- **Word-level ACL** — every dictionary entry carries a TTL/allow/mode/pin
|
thumbdrive (Ed25519, Zuse-signed); plugging one in births that user's VMs, pulling it out
|
||||||
access-control record. Strict, TTL, and pinned modes; two console layers
|
ends them. There is only the drive: no password, no PIN.
|
||||||
(emergency `ok>` and superuser `zuse)ok>`). Phases 1–7 complete (C
|
- **Word-level ACL** — every dictionary entry carries a TTL/allow/mode/pin access-control
|
||||||
infrastructure, FORTH policy layer, `zuse` bootstrap superuser, Isabelle
|
record; strict, TTL and pinned modes; two console layers (emergency `ok>` and superuser
|
||||||
proof stubs, kernel parity); Phase 8 (Ed25519 PKI / thumbdrive
|
`zuse)ok>`). Measured overhead of the live ACL-TTL mechanism: **+0.0603%**, CV 0.000%,
|
||||||
challenge-response) is the only item remaining. Measured overhead once
|
architecture-independent (`docs/fabric/FABRIC-1.md` §T).
|
||||||
active on every check: **+0.0054%–+0.0088%**, CV = **0.000%**, across a
|
- **Logs that persist** — every VM's log records go to a ring on Artemis's disk (`LOG-FLUSH`,
|
||||||
3×3 Latin-square DoE campaign (architecture × seed × 30 replicates) —
|
`LOG-SHOW`).
|
||||||
three orders of magnitude below the measurement floor.
|
- **The physics-driven runtime** — seven feedback loops and the L8 Jacquard mode selector, with
|
||||||
- **VM Fleet Attractor physics** — the L8 Jacquard mode selector now has a
|
a per-VM heat channel into fleet-wide tuning (VM Fleet Attractor).
|
||||||
real per-VM heat channel into fleet-wide tuning, replacing hardcoded
|
- **Kconfig build configuration** — about 40 physics, heartbeat, pipelining and kernel-only
|
||||||
compudynamics constants with a dynamically-inferred rate.
|
knobs, shared with the hosted build.
|
||||||
- **Kconfig build configuration** — every physics/heartbeat/pipelining/
|
|
||||||
kernel-only tuning knob (~40 total) is now a discoverable, optional
|
|
||||||
Kconfig symbol shared with the hosted VM build. See **Quick Start** below.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build kernel (requires cross-compilation toolchain, or native gcc)
|
# One boot image per physical target (output: build/boards/<board>/)
|
||||||
make -f Makefile.starkernel ARCH=amd64
|
make boot_image TARGET=PC # any x86-64 UEFI PC -- GPT/ESP, BOOTX64.EFI
|
||||||
|
make boot_image TARGET=RASPI # Raspberry Pi 5 -- FAT, config.txt + kernel_2712.img + DTB
|
||||||
|
make boot_image TARGET=MILKV # Milk-V Mars -- GPT/ESP, BOOTRISCV64.EFI (U-Boot bootefi)
|
||||||
|
make boards # list boards (the Zynq-7020 has no ARMv7 port yet)
|
||||||
|
|
||||||
# Run in QEMU with OVMF
|
# Each image carries v4 and v3. As built it boots v4; to boot v3, change the one word
|
||||||
make -f Makefile.starkernel qemu
|
# system=v4 -> system=v3
|
||||||
|
# in starforth.cfg on the PC's stick or the Mars's card, or cmdline.txt on the Pi 5's card.
|
||||||
|
|
||||||
# Other architectures
|
# The same TARGET drives all, docs and clean (make help)
|
||||||
make -f Makefile.starkernel ARCH=aarch64 qemu
|
make # every board with a kernel port + hosted v3 + the book
|
||||||
make -f Makefile.starkernel ARCH=riscv64 qemu
|
make docs # build/docs/LithosAnanke.pdf (LaTeX master: docs/book/main.tex)
|
||||||
|
make clean TARGET=RASPI # that board's outputs and build/aarch64/kernel
|
||||||
|
|
||||||
|
# The kernel in QEMU (OVMF / AAVMF / EDK2), one architecture at a time -- boots v4
|
||||||
|
make -f kernel/Makefile ARCH=amd64 clean qemu
|
||||||
|
make -f kernel/Makefile ARCH=aarch64 clean qemu
|
||||||
|
make -f kernel/Makefile ARCH=riscv64 clean qemu
|
||||||
|
make -f kernel/Makefile ARCH=amd64 KERNEL_ARGS=system=v3 clean qemu # v3, while it remains
|
||||||
|
|
||||||
|
# The Pi 5's native boot path, rehearsed on QEMU's virt machine at EL2
|
||||||
|
make -f kernel/Makefile ARCH=aarch64 RPI5_NATIVE_BASE=0x40080000 rpi5-rehearsal
|
||||||
```
|
```
|
||||||
|
|
||||||
Artifacts: `build/amd64/kernel/starkernel_loader.efi` · `build/amd64/kernel/starkernel_kernel.elf`
|
Artifacts: `build/<arch>/kernel/starkernel_loader.efi` · `build/<arch>/kernel/starkernel_kernel.elf`
|
||||||
|
|
||||||
For the hosted VM by itself (Linux, no cross-compiler needed, no bare-metal tooling): see
|
Tree: `kernel/` (LithosAnanke: `Makefile`, `src/`, `include/starkernel/`, `linker/`),
|
||||||
the separate **StarForth** repository — LithosAnanke used to be a branch inside that repo,
|
`v3/` (StarForth v3 engine and hosted build), `v4/` (StarForth v4, see `docs/v4.0.0/`),
|
||||||
now it's its own project with its own `master`.
|
`boards/<board>/` (`board.mk` + boot files), `capsules/` (the FORTH capsules). Every makefile
|
||||||
|
runs from the repo root; the root `Makefile` forwards any other goal to `v3/Makefile`.
|
||||||
|
|
||||||
|
For the hosted v3 VM by itself, see the separate **StarForth** repository — LithosAnanke used to
|
||||||
|
be a branch inside it, and is now its own project.
|
||||||
|
|
||||||
### Build configuration (optional)
|
### Build configuration (optional)
|
||||||
|
|
||||||
Every kernel-only knob (`STARFORTH_ENABLE_VM`, `PARITY_MODE`, the shared
|
Every kernel-only knob is an optional Kconfig symbol; a plain `make -f kernel/Makefile` uses
|
||||||
physics/heartbeat family, etc.) is an optional Kconfig symbol — a plain
|
the defaults unless you opt in:
|
||||||
`make -f Makefile.starkernel` uses the same defaults it always has unless
|
|
||||||
you opt in:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
make -f Makefile.starkernel ARCH=amd64 menuconfig
|
make -f kernel/Makefile ARCH=amd64 menuconfig
|
||||||
make -f Makefile.starkernel ARCH=amd64 kernel_amd64_defconfig
|
make -f kernel/Makefile ARCH=amd64 kernel_amd64_defconfig
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
**Start at [docs/README.md](docs/README.md)** — the map: where each kind of document lives and
|
||||||
|
which to believe. Among them:
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
|---|---|
|
|---|---|
|
||||||
| [System Architecture](docs/lithosananke/SYSTEM_ARCHITECTURE.md) | Full kernel + VM design |
|
| [The FABRIC record](docs/fabric/) | Every design decision and the work as it happened (`FABRIC-3.md` is the living one) |
|
||||||
| [HAL Reference](docs/lithosananke/hal/) | Hardware abstraction layer interfaces |
|
| [StarForth v4](docs/v4.0.0/) | The F18-derived engine |
|
||||||
| [Capsule System — M7.1](docs/lithosananke/M7.1.md) | Capsule birth protocol design |
|
| [Board bring-up](boards/BRINGUP.md) | Getting onto a PC, the Pi 5 and the Mars |
|
||||||
| [VM Fleet Attractor design log](docs/working/architecture/VM-FLEET-ATTRACTOR-DESIGN-20260705.md) | Tripod/Hermes/Artemis physics + build-system history |
|
| [Roadmap and versioning](docs/reference/ROADMAP.md) | Milestone plan and release-versioning policy |
|
||||||
| [Getting Started / Kconfig reference](docs/working/architecture/getting-started/DEVELOPER.md#build-configuration-kconfig) | Full symbol reference for both build targets |
|
| [Capsule System — M7.1](docs/reference/M7.1.md) | Capsule birth protocol |
|
||||||
|
| [Word-level ACL](docs/reference/word-acl/DESIGN.md) | The access-control design |
|
||||||
|
| [HAL, as built](kernel/src/hal/README.md) | Hardware abstraction layer |
|
||||||
|
| [Developer guide / Kconfig reference](docs/working/architecture/getting-started/DEVELOPER.md#build-configuration-kconfig) | Full symbol reference for both builds |
|
||||||
|
| [Dead ideas and revised claims](docs/DEAD-AND-REVISED.md) | What is no longer true, and since when |
|
||||||
| [Changelog](CHANGELOG.md) | Milestone-level history |
|
| [Changelog](CHANGELOG.md) | Milestone-level history |
|
||||||
| [Roadmap](docs/lithosananke/ROADMAP.md) | Milestone plan through self-hosting |
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,292 @@
|
|||||||
|
# Board bring-up checklist
|
||||||
|
|
||||||
|
Written 2026-10-13, before any of the four boards has been booted. It is what to do on the day
|
||||||
|
a board is on the bench, and what has to be true before that day is worth having.
|
||||||
|
|
||||||
|
Nothing here has been done on hardware. Every statement about the code was checked in the code
|
||||||
|
on the date above; where it comes from a document instead, the document is named. When a board
|
||||||
|
has been booted, its results go in `docs/fabric/FABRIC-3.md` (sections III, IV, V) and its
|
||||||
|
`README.md` here, and this file is corrected.
|
||||||
|
|
||||||
|
The four boards: `PC` (amd64, any x86-64 UEFI PC; the one on the bench is a Beelink SER5 -- the target was named `SER5` until 2026-10-14), `RASPI` (Pi 5, aarch64), `MILKV` (Mars, riscv64), `ZYNQ7020`
|
||||||
|
(ARMv7, no port yet). See `boards/README.md` for what each image is.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. What stands between today and a first boot
|
||||||
|
|
||||||
|
Found while writing this checklist. Items marked **blocks first boot** will stop a board
|
||||||
|
showing anything, or stop it being typed to; they are worth closing before the bench day.
|
||||||
|
None has been fixed: each needs your word.
|
||||||
|
|
||||||
|
### 1.1 All boards
|
||||||
|
|
||||||
|
| # | What | Where | Effect on hardware |
|
||||||
|
|---|---|---|---|
|
||||||
|
| A1 | **Fixed 2026-10-14.** The USB controller was matched by QEMU's own IDs (`1B36:000D`) on PCI bus 0 alone. Now: found by its PCI class (`0C/03/30`) on any bus, slot and function; its register window mapped at the size its BAR reports; taken from the firmware through the USB Legacy Support capability (SMIs off); and 64-byte contexts (`CSZ=1`, common on real controllers) laid out instead of refused. Every controller is driven, up to 8 (since 2026-10-14, `FABRIC-3.md` XLII): a stick or keyboard may be in any port. | `kernel/src/usb/xhci.c`, `kernel/src/pci/pci.c`; `FABRIC-3.md` XL | Rehearsed in QEMU with another vendor's controller behind a bridge, all three ISAs. Not rehearsable: the firmware handoff and 64-byte contexts (QEMU's controller has neither). |
|
||||||
|
| A2 | **No prompt without a login.** The production default, `EMERGENCY_CONSOLE_ENABLED=n`, keeps the system headless until an identity logs in by thumbdrive. | `Kconfig.heartbeat:68`; `FABRIC-3.md` VIII.1 | With A1, the v3 system never shows a prompt on hardware. A bring-up build must set `EMERGENCY_CONSOLE_ENABLED=1`. |
|
||||||
|
| A3 | **Fixed 2026-10-14.** A USB boot-protocol keyboard is driven (xHCI interrupt endpoint, `SET_PROTOCOL(boot)`), its reports become the same key events as the PS/2 and virtio keyboards, and the console treats a full keyboard as one: Caps Lock and Num Lock as toggles shown on the keyboard's lights, the keypad as digits or navigation, the arrows and navigation block mapped (the line editor itself still has no cursor movement). While a USB keyboard runs, the console services its reports every timer tick. | `kernel/src/usb/usb_kbd.c`, `kernel/src/usb/xhci.c`, `kernel/src/repl.c`; `FABRIC-3.md` XLI | Rehearsed in QEMU on all three ISAs; on amd64 with the USB keyboard the only keyboard. Limits: a keyboard whose first interface is not the keyboard is not used; no key repeat. Several keyboards, on any controllers, each its own. |
|
||||||
|
| A4 | **The only disk driver is virtio.** | `kernel/src/virtio/virtio_blk.c`; `kernel_main.c:493` | On hardware Artemis finds no disk ("Artemis: no virtio-blk disk"). What the fleet then does has not been tried even in QEMU: see step 3.3. |
|
||||||
|
| A5 | **Entropy:** RDRAND on amd64 only. aarch64 and riscv64 have virtio-rng alone. | `kernel/src/rng/rng.c` | Pi 5 and Mars print the "no entropy backend available" warning; anything that needs random bytes is refused. Minting needs them. |
|
||||||
|
| A6 | **Fixed 2026-10-14.** Every board image carries both systems, v3 and v4, and the boot arguments choose: `system=v4` (as built: v4 is the default) or `system=v3` -- one word in `starforth.cfg` on the SER5's and the Mars's stick or card, in `cmdline.txt` on the Pi 5's card. No rebuild to switch. | root `Makefile`, `kernel/Makefile`, `kernel/src/kernel_main.c`, `kernel/src/boot/cmdline.c`; `FABRIC-3.md` XLIII | The SER5 image itself, booted under OVMF: v3 as built, v4 after the one-word edit. The boot says which system runs and why ("System: ..."). |
|
||||||
|
|
||||||
|
### 1.2 PC (the SER5 on the bench)
|
||||||
|
|
||||||
|
| # | What | Where | Effect |
|
||||||
|
|---|---|---|---|
|
||||||
|
| S1 | HPET address fixed at `0xFED00000`, not read from ACPI. | `FABRIC-3.md` III item 6, finding 1 | Wrong only on a machine that puts it elsewhere. Most do not. |
|
||||||
|
| S2 | Local APIC address fixed at `0xFEE00000`; the MADT's override entry is not parsed. | finding 2 | The same. |
|
||||||
|
| S3 | **Half fixed 2026-10-14.** The i8042: a PC without one (port 0x64 reads 0xFF) hung the kernel at boot, in a drain loop that never ended -- found rehearsing A3 with QEMU's `i8042=off`. Now detected and skipped, every drain bounded. Still open: the legacy PIC is written to with no check that it exists. | `kernel/src/arch/amd64/i8042.c`; finding 3; `FABRIC-3.md` XLI | A legacy-free SER5 no longer stops at the I/O APIC. The PIC: unknown on a machine without one. |
|
||||||
|
| S4 | `BYE` resets through the i8042, not the ACPI reset register. | finding 4 | `BYE` may do nothing. It does not hang. |
|
||||||
|
| S5 | Whether the SER5 has a serial header is not known. | `FABRIC-3.md` III | Without one, and with A3, the SER5 can be watched over HDMI and not typed to. |
|
||||||
|
|
||||||
|
The loader probes COM1 before using it, and since 2026-10-13 so does the kernel's console.
|
||||||
|
Before that, on a board with no COM1 the status port read all ones: writes went nowhere, and
|
||||||
|
the prompt was told a key was waiting on every poll and read `0xFF` for ever.
|
||||||
|
|
||||||
|
### 1.3 Raspberry Pi 5
|
||||||
|
|
||||||
|
| # | What | Where | Effect |
|
||||||
|
|---|---|---|---|
|
||||||
|
| R1 | **Fixed 2026-10-13.** Every character the console printed was also written to a PL011 at `0x09000000`, QEMU's address, which on a Pi 5 is ordinary RAM. The console now finds its serial line from the devicetree's `/chosen/stdout-path`: on the Pi 5 that is `serial10`, the debug connector, a PL011 at `0x107d001000`. | `kernel/src/hal/console.c`, `kernel/src/hal/fdt_uart.c`; `tools/fdt_uart_test.c` reads the board's real devicetree | Checked off the board only. The first run is the board's. |
|
||||||
|
| R2 | **Fixed 2026-10-14.** Entry is at EL2 with the MMU off, where every access is Device memory: unaligned accesses and atomics fault, nothing is cached. The entry stub now cleans the cache over the image, turns the MMU and caches on before any C (identity map: the image's GiB Normal in 2 MiB blocks, the rest Device), and routes interrupts to EL2; C then makes the rest of the devicetree's RAM Normal. Rehearsing it found and fixed three more: the PL011 register shift, the GIC address (not carried through `/soc`'s `ranges`), and the EL2 timer interrupt never being taken. | `native_rpi5_entry.S`, `rpi5_mmu.c`, `fdt.c` (`fdt_reg_address`), `apic.c`; `FABRIC-3.md` XXXIX | Rehearsed on QEMU virt at EL2 (section 3.2): POST passes, same parity hash. Not yet on the board. |
|
||||||
|
| R3 | **Partly fixed 2026-10-14.** The address returned is now carried through the devicetree's `dma-ranges` (on the Pi 5 it is already physical; the old `& 0x3FFFFFFF` was the Pi 4's rule), every mailbox wait gives up after one second, the request buffer is cleaned to RAM and back around the exchange, and the framebuffer is mapped uncached. Still unverified: the size field of the allocate tag. The mode is fixed at 1920x1080x32. | `rpi5_mailbox.c`, `rpi5_mmu.c`; `FABRIC-3.md` IV.3 item 3, XXXIX | QEMU virt has no mailbox: none of this runs before the board. No picture shows as no framebuffer, not a hang. |
|
||||||
|
| R4 | USB, Ethernet and GPIO are behind the RP1 chip on PCIe, which needs a Broadcom-specific driver that is not written. | `FABRIC-3.md` IV.3 item 5 | No USB on the Pi 5 whatever is done about A1. |
|
||||||
|
| R5 | No hardware entropy source is known for the BCM2712. | `FABRIC-3.md` IV.2 | A5 stands. |
|
||||||
|
|
||||||
|
### 1.4 Milk-V Mars
|
||||||
|
|
||||||
|
| # | What | Where | Effect |
|
||||||
|
|---|---|---|---|
|
||||||
|
| M1 | **Fixed 2026-10-13.** The console, and the UEFI loader before it, wrote to a 16550 at `0x10000000` with registers one byte apart. The JH7110's UART is at that address with `reg-shift = <2>` and `reg-io-width = <4>` (mainline `jh7110.dtsi`): the loader would have waited for ever on its first character. Both now take the layout from the devicetree. | `kernel/src/hal/console.c`, `kernel/src/boot/uefi_loader.c` | Rehearsed in QEMU through U-Boot, which hands over a devicetree: "serial line is a 16550 at 0x10000000 (named by the devicetree)". QEMU's UART is byte-spaced, so the four-byte layout itself is checked by the host test only. |
|
||||||
|
| M2 | The display depends on U-Boot offering a framebuffer to the EFI loader. | `boards/milkv/README.md` | Unknown. With M1 unfixed there is then no channel at all. |
|
||||||
|
| M3 | USB is behind the JH7110's PCIe controller; whether that is plain ECAM has not been looked up. | `FABRIC-3.md` V.3 item 5 | No USB until it is. |
|
||||||
|
| M4 | `FABRIC-3.md` V describes a native entry at `0x40000000`; the image built today is the UEFI loader run by U-Boot's `bootefi`. The README here is the newer and is what the build does. | `boards/milkv/README.md` | None; noted so the two are not confused on the day. |
|
||||||
|
| M5 | Whether the U74 has the entropy instruction is not known. | `FABRIC-3.md` V.2 | A5 stands. |
|
||||||
|
|
||||||
|
### 1.5 Zynq-7020
|
||||||
|
|
||||||
|
No image can be built. Needed first, in order: the board chosen (it fixes `BOOT.BIN`); an ARMv7
|
||||||
|
port, `kernel/src/arch/armv7` (entry, MMU, GIC, private timer); and the four files that use
|
||||||
|
`__int128` or have no ARMv7 branch (`boards/zynq7020/README.md` names them). It is the host for
|
||||||
|
the v4 mesh, so it also waits on A6.
|
||||||
|
|
||||||
|
### 1.6 Found in rehearsal, and fixed, 2026-10-13: the bring-up build flooded its prompt
|
||||||
|
|
||||||
|
Built with `EMERGENCY_CONSOLE_ENABLED=1` and booted with no thumbdrive, the prompt printed
|
||||||
|
`ok> ok` without end: 1.4 million times in 200 seconds. The line reader
|
||||||
|
(`kernel/src/repl.c`, `sk_console_readline()`) gave up at once whenever no identity was logged
|
||||||
|
in, which the production build answers by going silent; the bring-up build took it as an
|
||||||
|
empty line and asked again. It now gives up only in the production build. Rehearsed on
|
||||||
|
riscv64 (`logs/20261013-235129`): one prompt, which waits, and three typed lines answered.
|
||||||
|
|
||||||
|
### 1.7 What I would close before the bench day
|
||||||
|
|
||||||
|
In this order, each as a design for approval first:
|
||||||
|
|
||||||
|
1. ~~R1 and M1: a console that finds its UART from the devicetree, and does nothing when
|
||||||
|
there is none.~~ Done 2026-10-13, and 1.6, the flood.
|
||||||
|
2. A6: the v4 switch in the board images. The v4 node needs only a console to reach a prompt;
|
||||||
|
it has no login, no fleet and no disk to wait for, so it is the shorter road to a first
|
||||||
|
prompt on each board.
|
||||||
|
3. A1: find the USB controller by its class code, not one vendor's number. That gives the SER5
|
||||||
|
thumbdrives. The Pi 5 and the Mars need R4 and M3 as well.
|
||||||
|
4. A serial cable for every board (section 2).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. Before the day
|
||||||
|
|
||||||
|
**To have on the bench**
|
||||||
|
|
||||||
|
- [ ] A USB-to-serial adapter with 3.3 V logic levels, and jumper wires. It is the one channel
|
||||||
|
that survives a framebuffer failure, and with A3 it is the one way to type. FABRIC-3
|
||||||
|
decided HDMI only for the Pi 5 and the Mars because no adapter was to hand; that
|
||||||
|
decision is worth revisiting before the day.
|
||||||
|
- [ ] HDMI display and cable (micro-HDMI for the Pi 5).
|
||||||
|
- [ ] A USB stick for the SER5; a microSD card each for the Pi 5 and the Mars; a card reader.
|
||||||
|
- [ ] A PS/2 keyboard if the SER5 turns out to have a PS/2 port; otherwise serial.
|
||||||
|
- [ ] A camera, for the screen: when there is no serial log, photographs are the record.
|
||||||
|
- [ ] The identity thumbdrives (`disk/README.md`), once A1 is closed.
|
||||||
|
|
||||||
|
**To know before starting**
|
||||||
|
|
||||||
|
- [ ] SER5: Secure Boot is off (`FABRIC-3.md` III says it is on this unit); which key opens
|
||||||
|
the firmware's boot menu; whether there is a serial header.
|
||||||
|
- [ ] Pi 5: the EEPROM firmware is recent enough to honour `kernel_address` and `os_check`
|
||||||
|
(boot Raspberry Pi OS once and note the version).
|
||||||
|
- [ ] Mars: the SPI flash holds a U-Boot that scans the SD card for an EFI loader; the boot
|
||||||
|
switches select SPI flash. Stop U-Boot at its prompt once and save `printenv`, then
|
||||||
|
`fdt addr ${fdtcontroladdr}` and the output of `fdt print /soc/serial@10000000`: that
|
||||||
|
settles M1.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. Build, and rehearse in QEMU
|
||||||
|
|
||||||
|
### 3.1 Build
|
||||||
|
|
||||||
|
```
|
||||||
|
make boot_image TARGET=PC EMERGENCY_CONSOLE_ENABLED=1
|
||||||
|
make boot_image TARGET=RASPI EMERGENCY_CONSOLE_ENABLED=1
|
||||||
|
make boot_image TARGET=MILKV EMERGENCY_CONSOLE_ENABLED=1
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] ~~`make clean TARGET=<board>` first.~~ `make boot_image` now cleans its ISA's kernel
|
||||||
|
objects itself (2026-10-14): make does not see a change of compile flags, and an image
|
||||||
|
built over old objects booted headless (2026-10-13) or would have lacked v4.
|
||||||
|
- [ ] The images boot v4. To boot v3 instead: change `system=v4` to `system=v3` in
|
||||||
|
`starforth.cfg` (PC, Mars) or `cmdline.txt` (Pi 5) on the medium. The boot prints "System: ..." with the choice.
|
||||||
|
- [ ] Each ends with its image in `build/boards/<board>/`. Record `sha256sum` of each.
|
||||||
|
- [ ] Confirm the switch took: the image booted in QEMU (3.2) shows a prompt with no
|
||||||
|
thumbdrive attached. After a clean build it does (tried on `MILKV`).
|
||||||
|
- [ ] The Pi 5 build fetches the board's DTB once from the pinned firmware release; with no
|
||||||
|
network, pass `RPI5_DTB=/path/to/bcm2712-rpi-5-b.dtb`.
|
||||||
|
- [ ] Put back `v3/include/version.h` and `capsules/BLOCK_MAP.md` afterwards: the build
|
||||||
|
rewrites both.
|
||||||
|
|
||||||
|
### 3.2 Rehearse each image as its own disk
|
||||||
|
|
||||||
|
One QEMU at a time. Use a copy of the image: the kernel writes to its disk.
|
||||||
|
|
||||||
|
- [ ] **PC:** q35 with OVMF, the image as the only disk, no `-cdrom`, no virtio disk, no
|
||||||
|
thumbdrive. This is the machine the README's "booted in QEMU" refers to.
|
||||||
|
- [ ] **MILKV:** the command in `boards/milkv/README.md` (OpenSBI, U-Boot, `bootefi`).
|
||||||
|
- [ ] **RASPI:** there is no QEMU model of the Pi 5, but its native path -- raw image, entry
|
||||||
|
at EL2 with the MMU off, devicetree in x0 -- is rehearsed on QEMU virt:
|
||||||
|
`make -f kernel/Makefile ARCH=aarch64 RPI5_NATIVE_BASE=0x40080000 rpi5-rehearsal`
|
||||||
|
(log under `logs/<TS>/aarch64-rpi5/`). Not rehearsed: the mailbox and framebuffer, the
|
||||||
|
Pi 5's own UART and GIC addresses (checked against its real devicetree by
|
||||||
|
`tools/fdt_uart_test.c` instead), and PCI (virt's needs ACPI, the Pi 5's is R4).
|
||||||
|
|
||||||
|
### 3.3 What to settle in the rehearsal
|
||||||
|
|
||||||
|
- [ ] With no virtio disk and no thumbdrive, how far does the v3 system get, and what does it
|
||||||
|
print? (A4. Not tried.)
|
||||||
|
- [ ] Note the verdict lines of that boot (section 5). They are what the board is compared
|
||||||
|
with.
|
||||||
|
- [ ] Type a line over the serial port. If it is not taken in QEMU it will not be on the
|
||||||
|
board.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. On the bench
|
||||||
|
|
||||||
|
Do one board at a time, in this order: SER5, then the Mars, then the Pi 5. The SER5's path is
|
||||||
|
the one QEMU exercises most closely, and the Pi 5's can be rehearsed only in part (3.2).
|
||||||
|
|
||||||
|
### 4.1 Writing the media, every board
|
||||||
|
|
||||||
|
- [ ] `lsblk` before and after inserting the stick or card. Write down the device name and its
|
||||||
|
size. **`dd` to the wrong device destroys a disk.**
|
||||||
|
- [ ] `sudo dd if=build/boards/<board>/<image> of=/dev/sdX bs=4M conv=fsync status=progress`
|
||||||
|
- [ ] Read it back and compare: `sudo cmp -n $(stat -c %s <image>) <image> /dev/sdX`.
|
||||||
|
|
||||||
|
### 4.2 PC (the SER5)
|
||||||
|
|
||||||
|
- [ ] Serial, if there is a header: 115200 8N1, logged to a file from before power-on.
|
||||||
|
- [ ] HDMI and keyboard connected. Stick in a rear port.
|
||||||
|
- [ ] Power on, open the boot menu, choose the stick.
|
||||||
|
- [ ] Watch for, in order: `StarKernel UEFI Loader`; `GOP: linear framebuffer found`;
|
||||||
|
`LithosAnanke v...`; `PMM initialized.`; `VMM initialized`; `APIC: init done`;
|
||||||
|
`Timer: init done`; `Kernel heap initialized.`; `Stadium: ...`; POST; the verdict lines.
|
||||||
|
- [ ] `rng: backend = rdrand`. In QEMU it says `virtio-rng`; this line is new on hardware.
|
||||||
|
- [ ] The timer lines differ from QEMU's by design: no hypervisor, so the HPET path runs for
|
||||||
|
the first time. S1 is the finding to remember if it stops there.
|
||||||
|
|
||||||
|
### 4.3 Milk-V Mars
|
||||||
|
|
||||||
|
- [ ] Serial on the 40-pin header's UART, 115200 8N1, logged from before power-on. U-Boot
|
||||||
|
talks on it, so it shows whether the board reached U-Boot even if the kernel prints
|
||||||
|
nothing.
|
||||||
|
- [ ] Card in, HDMI connected, power on.
|
||||||
|
- [ ] U-Boot finds `EFI/BOOT/BOOTRISCV64.EFI` and starts it. If it does not, at its prompt:
|
||||||
|
`load mmc 1:1 ${kernel_addr_r} EFI/BOOT/BOOTRISCV64.EFI` then
|
||||||
|
`bootefi ${kernel_addr_r} ${fdtcontroladdr}` (the device number may differ: `mmc list`).
|
||||||
|
- [ ] The lines of 4.2, with `PLIC:` in place of `APIC:`. For the first time the interrupt
|
||||||
|
controller's address and the timer's frequency should come from the devicetree: the
|
||||||
|
QEMU lines "no DTB PLIC node" and "FALLBACK, no devicetree" should **not** appear.
|
||||||
|
- [ ] `satp.MODE` is printed at entry. Under U-Boot it may be 0 where QEMU shows `0xa`.
|
||||||
|
|
||||||
|
### 4.4 Raspberry Pi 5
|
||||||
|
|
||||||
|
- [ ] Serial on the debug connector between the HDMI ports (needs the Pi debug probe or a
|
||||||
|
matching cable), 115200 8N1. The firmware prints there before the kernel runs.
|
||||||
|
- [ ] Card in, HDMI in the port nearest the USB-C socket, power on.
|
||||||
|
- [ ] The firmware loads `kernel_2712.img` at `0x80000`. If the screen stays on the firmware's
|
||||||
|
diagnostic page, the firmware did not accept the image: note what it says.
|
||||||
|
- [ ] Then the lines of 4.2 from `LithosAnanke v...` on (there is no UEFI loader), with
|
||||||
|
`GICv2:` in place of `APIC:`. The line "no DTB GIC node -- using QEMU virt-machine
|
||||||
|
defaults" should **not** appear.
|
||||||
|
- [ ] Expect `PCI: MCFG parse failed on aarch64 -- no ECAM`: that is R4 and is not a failure
|
||||||
|
of the boot.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. What counts as a pass
|
||||||
|
|
||||||
|
Record which level each board reached. A board is not "booted" on the strength of level 1.
|
||||||
|
|
||||||
|
| Level | What was seen | Compared with |
|
||||||
|
|---|---|---|
|
||||||
|
| 1 | The kernel's first line, on any channel | - |
|
||||||
|
| 2 | Every milestone line through `Kernel heap initialized.` | The QEMU log of the same build |
|
||||||
|
| 3 | `POST: PASSED` and `PARITY:OK` | The same test count as QEMU |
|
||||||
|
| 4 | The `PARITY:M7.1a` line's `word_count` and `hash` equal QEMU's for the same ISA | The rehearsal boot of 3.2 |
|
||||||
|
| 5 | A prompt, and a typed line answered: `1 2 + .` gives `3` | - |
|
||||||
|
| 6 | Entropy from hardware; an identity minted on a thumbdrive and attached again after a power cycle | The gates of `FABRIC-3.md` III, IV, V |
|
||||||
|
|
||||||
|
Level 4 is the one that says the board runs the same system as QEMU. Levels 5 and 6 wait on
|
||||||
|
section 1: today no board can reach 6, and only the SER5 with a serial header can reach 5.
|
||||||
|
|
||||||
|
For the v4 node, once A6 is built, the lines are `PARITY:V4_POST tests=538 pass=538 fail=0`,
|
||||||
|
`PARITY:V4_SYSTEM word_count=... dict_hash=...` equal to the hosted programs', `PARITY:OK`,
|
||||||
|
`POST: PASSED`, and the prompt `ok> `.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. If it stops
|
||||||
|
|
||||||
|
| What is seen | Look at |
|
||||||
|
|---|---|
|
||||||
|
| Nothing at all, any board | Is the firmware reaching the image? Serial shows the firmware's own output on the Mars and the Pi 5. On the SER5, try the UEFI shell: `startup.nsh` is in the image. |
|
||||||
|
| Pi 5: firmware runs, then nothing | R1, then R2, then R3. |
|
||||||
|
| Mars: U-Boot starts the loader, then nothing on serial | M1. HDMI may still show the boot if M2 holds. |
|
||||||
|
| SER5: stops in the `Timer:` lines | S1. |
|
||||||
|
| Stops at `APIC` / `GICv2` / `PLIC` | The controller's address: S2 on the SER5; on the others, whether the devicetree node was found (the line says). |
|
||||||
|
| Runs through POST, then silence | A2: the build is headless. Rebuild with `EMERGENCY_CONSOLE_ENABLED=1`. |
|
||||||
|
| A prompt that takes no keys | A3. Type over serial. |
|
||||||
|
| `Artemis: no virtio-blk disk` | A4. Expected on every board today. |
|
||||||
|
| `rng: WARNING -- no entropy backend available` | A5. Expected on the Pi 5 and the Mars today. |
|
||||||
|
|
||||||
|
Write down the last line shown, exactly, and photograph the screen. Do not change two things
|
||||||
|
between attempts.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. What to keep
|
||||||
|
|
||||||
|
- [ ] The serial transcript of every attempt, passed or failed, under `logs/` with the date,
|
||||||
|
the board and the image's `sha256` in its name. Logs are kept and committed, as QEMU's
|
||||||
|
are.
|
||||||
|
- [ ] Photographs of the screen where there was no serial.
|
||||||
|
- [ ] The firmware versions: SER5 BIOS, Pi 5 EEPROM, Mars U-Boot and OpenSBI.
|
||||||
|
- [ ] The Mars's `printenv` and devicetree, and the Pi 5's DTB as used.
|
||||||
|
- [ ] The results written into `FABRIC-3.md` (each section ends with "update this section with
|
||||||
|
results") and each board's `README.md` status line.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. Before the builds are cut
|
||||||
|
|
||||||
|
The administrative work that is yours to call, listed so it is not found on the day:
|
||||||
|
|
||||||
|
- [ ] The kernel's release number. `kernel/Makefile` holds a table that gives each hardware
|
||||||
|
gate its own number (SER5, then the Pi 5, then the Mars); it is still to be ruled.
|
||||||
|
- [ ] The uncommitted change to `kernel/Makefile` that adds the ISA to the version line: it
|
||||||
|
needs a three-ISA acceptance run in the v3 configuration before it is committed.
|
||||||
|
- [ ] `CHANGELOG.md`: nothing between 2026-08-18 and the uncommitted entry of 2026-10-09.
|
||||||
|
- [ ] `sbom.spdx` and `sbom.spdx.json` brought up to date.
|
||||||
|
- [ ] The merge of `StarForth-v4.0.0` to `master`, and the tags `LithosAnanke v2.0.0` and
|
||||||
|
`StarForth v4.0.0`: only when you say.
|
||||||
|
- [ ] `.claude/CLAUDE.md` still describes the build before `boards/` existed.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# boards/
|
||||||
|
|
||||||
|
One directory per physical target. `make boot_image TARGET=<NAME>` (repo root) maps the
|
||||||
|
name to a directory here, reads its `board.mk`, and builds the single file that goes on
|
||||||
|
that board's boot medium into `build/boards/<board>/`.
|
||||||
|
|
||||||
|
| TARGET | Directory | ISA | Boot path | Image |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| `PC` | `pc/` | amd64 | UEFI firmware, removable-media path -- any x86-64 PC | GPT + FAT32 ESP: `EFI/BOOT/BOOTX64.EFI` |
|
||||||
|
| `RASPI` | `raspi/` | aarch64 | Pi 5 EEPROM firmware, native | MBR + FAT32: `config.txt`, `kernel_2712.img`, `bcm2712-rpi-5-b.dtb` |
|
||||||
|
| `MILKV` | `milkv/` | riscv64 | SPI-flash U-Boot + OpenSBI, `bootefi` | GPT + FAT32 ESP: `EFI/BOOT/BOOTRISCV64.EFI` |
|
||||||
|
| `ZYNQ7020` | `zynq7020/` | armv7 | BootROM, `BOOT.BIN`, U-Boot | not yet: needs `kernel/src/arch/armv7` |
|
||||||
|
|
||||||
|
`board.mk` sets:
|
||||||
|
|
||||||
|
- `BOARD_DESC`: one-line description (`make boards`)
|
||||||
|
- `BOARD_ARCH`: kernel ISA (`kernel/src/arch/<arch>`)
|
||||||
|
- `BOARD_BOOT`: image recipe in `kernel/Makefile` (`uefi-esp`, `rpi-native`, ...)
|
||||||
|
- `BOARD_IMAGE`: output file name
|
||||||
|
|
||||||
|
Disk images are assembled by `scripts/mkdiskimage.sh`, which needs no root access and no loop
|
||||||
|
devices. `KERNEL_ARGS="..."` is written as `starforth.cfg` (UEFI boards) or `cmdline.txt`
|
||||||
|
(Pi 5, where the firmware copies it into `/chosen/bootargs`). `BOOT_IMAGE_SIZE_MIB` sets the
|
||||||
|
image size; the default is 128.
|
||||||
|
|
||||||
|
Hardware status: none of these images has been booted on real silicon from this build. The
|
||||||
|
PC image has been booted in QEMU (q35 + OVMF, from its own disk) through POST. (`PC` was named
|
||||||
|
`SER5` until 2026-10-14, after the first PC on the bench; the image was never specific to it.) The Pi 5
|
||||||
|
native path (`raspi/README.md`) and the JH7110 peripherals have still only been checked by
|
||||||
|
compiling.
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
# Milk-V Mars boot media
|
||||||
|
|
||||||
|
`make boot_image TARGET=MILKV` builds `build/boards/milkv/lithos-milkv.img`: a GPT disk with one
|
||||||
|
FAT32 EFI System Partition. Write it to an SD card with `dd`. The partition holds:
|
||||||
|
|
||||||
|
- `EFI/BOOT/BOOTRISCV64.EFI`: the riscv64 monolithic loader, the same one QEMU boots.
|
||||||
|
- `startup.nsh`: for a UEFI shell, if one is used.
|
||||||
|
- `starforth.cfg`: only present when `KERNEL_ARGS="..."` is given.
|
||||||
|
|
||||||
|
The board's own SPI-flash U-Boot, with OpenSBI underneath, finds the loader through its standard
|
||||||
|
`bootefi` scan of the removable-media path. U-Boot passes its devicetree to the loader through the
|
||||||
|
EFI configuration table.
|
||||||
|
|
||||||
|
Status: booted in QEMU through the same chain the board uses: OpenSBI, then U-Boot
|
||||||
|
`qemu-riscv64_smode`, then `bootefi` from this image's ESP, then the loader and the kernel. POST
|
||||||
|
passed, Stadium conservation was exact (resident 43691 + reservoir 21845 = 65536 = `Q48_ONE`), and
|
||||||
|
Hestia and Artemis came up. Not yet booted on the Mars itself. The JH7110 peripherals
|
||||||
|
(framebuffer, RNG) have only been checked by compiling.
|
||||||
|
|
||||||
|
To repeat the QEMU boot (`qemu-system-riscv64` is in Ubuntu 26.04's `qemu-system-riscv` package;
|
||||||
|
OpenSBI and U-Boot come from `opensbi` and `u-boot-qemu`). Use a copy, because the kernel writes
|
||||||
|
to its disk:
|
||||||
|
|
||||||
|
```
|
||||||
|
cp build/boards/milkv/lithos-milkv.img /tmp/mv.img
|
||||||
|
qemu-system-riscv64 -machine virt -cpu rv64 -m 2048 -nographic \
|
||||||
|
-bios /usr/lib/riscv64-linux-gnu/opensbi/generic/fw_dynamic.bin \
|
||||||
|
-kernel /usr/lib/u-boot/qemu-riscv64_smode/u-boot.bin \
|
||||||
|
-drive if=none,format=raw,file=/tmp/mv.img,id=d0 -device virtio-blk-device,drive=d0
|
||||||
|
```
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# boards/milkv/board.mk -- Milk-V Mars (StarFive JH7110, SiFive U74, RV64GC).
|
||||||
|
#
|
||||||
|
# The board's own SPI-flash U-Boot (OpenSBI underneath) runs the EFI
|
||||||
|
# application through its standard distro/bootefi scan: the SD card is a GPT
|
||||||
|
# disk with one FAT32 EFI System Partition holding EFI/BOOT/BOOTRISCV64.EFI,
|
||||||
|
# the same riscv64 monolithic loader QEMU boots. U-Boot passes its own
|
||||||
|
# devicetree through the EFI configuration table.
|
||||||
|
BOARD_DESC := Milk-V Mars (StarFive JH7110, RV64GC, U-Boot bootefi)
|
||||||
|
BOARD_ARCH := riscv64
|
||||||
|
BOARD_BOOT := uefi-esp
|
||||||
|
BOARD_IMAGE := lithos-milkv.img
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# PC boot media (generic x86-64, UEFI)
|
||||||
|
|
||||||
|
`make boot_image TARGET=PC` builds `build/boards/pc/lithos-pc.img`: a GPT disk with one FAT32
|
||||||
|
EFI System Partition, for any x86-64 PC whose UEFI firmware boots a removable medium. Write it to
|
||||||
|
a USB stick with `dd`. The partition holds:
|
||||||
|
|
||||||
|
- `EFI/BOOT/BOOTX64.EFI`: the amd64 monolithic loader, with the whole kernel embedded. Firmware
|
||||||
|
finds it through the UEFI removable-media path, so no boot entry has to be created.
|
||||||
|
- `startup.nsh`: runs the loader if the firmware drops into the UEFI shell.
|
||||||
|
- `starforth.cfg`: the boot arguments -- `system=v4` as built; change the word to `system=v3` to
|
||||||
|
boot v3 (and `KERNEL_ARGS="..."` adds to it).
|
||||||
|
|
||||||
|
Beside the image, `lithos-pc.spdx` / `.spdx.json`: its SBOM, every file on it with its SHA-256.
|
||||||
|
|
||||||
|
Nothing in the image is specific to one machine: it follows the generic UEFI/ACPI path in
|
||||||
|
FABRIC-3.md §III. Until 2026-10-14 this target was named `SER5`, after the first PC to be brought
|
||||||
|
up -- a Beelink SER5 (AMD Ryzen), which is still the one on the bench (`boards/BRINGUP.md`).
|
||||||
|
|
||||||
|
Status: booted in QEMU (q35 + OVMF, from this image as its own disk): v4 as built, v3 with
|
||||||
|
`system=v3`. Not yet booted on real hardware.
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# boards/pc/board.mk -- a generic PC: x86-64, UEFI firmware, ACPI.
|
||||||
|
#
|
||||||
|
# Not one machine: the standards-compliant UEFI path (FABRIC-3.md §III), so
|
||||||
|
# any x86-64 PC whose firmware boots a UEFI removable medium. (The first to be
|
||||||
|
# brought up on the bench is a Beelink SER5, an AMD Ryzen mini-PC -- see
|
||||||
|
# boards/BRINGUP.md.) The monolithic loader embeds the whole kernel, so the
|
||||||
|
# image is a GPT disk with one FAT32 EFI System Partition holding
|
||||||
|
# EFI/BOOT/BOOTX64.EFI. Write it to a USB stick with dd.
|
||||||
|
BOARD_DESC := Generic PC (x86-64, UEFI, ACPI)
|
||||||
|
BOARD_ARCH := amd64
|
||||||
|
BOARD_BOOT := uefi-esp
|
||||||
|
BOARD_IMAGE := lithos-pc.img
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Raspberry Pi 5 native boot media
|
||||||
|
|
||||||
|
`make boot_image TARGET=RASPI` builds `build/boards/raspi/lithos-raspi.img`: an MBR disk
|
||||||
|
with one FAT32 (LBA) partition. Write it to an SD card with `dd`. The partition holds:
|
||||||
|
|
||||||
|
- `config.txt`: checked in here (FABRIC-3.md §IV.3 item 6). It pins `kernel_address=0x80000`
|
||||||
|
because Pi 5 firmware loads `kernel_2712.img` at 0x200000 by default.
|
||||||
|
- `kernel_2712.img`: the aarch64 kernel objects relinked at 0x80000 by
|
||||||
|
`kernel/linker/starkernel-native-rpi5.ld`, entered at `rpi5_native_start`
|
||||||
|
(`kernel/src/arch/aarch64/native_rpi5_entry.S`, which zeroes `.bss` first), and flattened
|
||||||
|
with `objcopy -O binary`.
|
||||||
|
- `bcm2712-rpi-5-b.dtb`: the Raspberry Pi firmware's own stock DTB. It is not built by this
|
||||||
|
project; it is fetched once from the firmware release pinned in `board.mk`
|
||||||
|
(`RPI_FIRMWARE_TAG`) into `build/cache/`. To use a local copy, pass `RPI5_DTB=/path/to/dtb`.
|
||||||
|
- `cmdline.txt`: only present when `KERNEL_ARGS="..."` is given. The firmware copies it into
|
||||||
|
`/chosen/bootargs`, which `rpi5_native_boot()` parses.
|
||||||
|
|
||||||
|
Not yet verified on hardware. The native path still assumes everything `kernel_main()`
|
||||||
|
needs after a UEFI handoff. The firmware enters at EL2 with the MMU off, which is not what
|
||||||
|
UEFI hands over, and that difference has not been exercised.
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# boards/raspi/board.mk -- Raspberry Pi 5 (BCM2712, Cortex-A76, aarch64).
|
||||||
|
#
|
||||||
|
# Native firmware boot, no UEFI (FABRIC-3.md §IV): the Pi 5 bootloader
|
||||||
|
# lives in EEPROM and reads config.txt, kernel_2712.img and the board DTB
|
||||||
|
# from the first FAT partition of the SD card. kernel_2712.img is the
|
||||||
|
# aarch64 kernel relinked at 0x80000 (kernel/linker/starkernel-native-rpi5.ld)
|
||||||
|
# and flattened to a raw binary.
|
||||||
|
#
|
||||||
|
# The DTB is the Raspberry Pi firmware's own stock file, not built here. It
|
||||||
|
# is fetched once from the pinned firmware release below into build/cache/
|
||||||
|
# unless RPI5_DTB points at a local copy.
|
||||||
|
BOARD_DESC := Raspberry Pi 5 (BCM2712, Cortex-A76, native firmware boot)
|
||||||
|
BOARD_ARCH := aarch64
|
||||||
|
BOARD_BOOT := rpi-native
|
||||||
|
BOARD_IMAGE := lithos-raspi.img
|
||||||
|
RPI_FIRMWARE_TAG ?= 1.20260915
|
||||||
|
RPI5_DTB_URL ?= https://raw.githubusercontent.com/raspberrypi/firmware/$(RPI_FIRMWARE_TAG)/boot/bcm2712-rpi-5-b.dtb
|
||||||
|
RPI5_DTB ?= build/cache/raspi-$(RPI_FIRMWARE_TAG)/bcm2712-rpi-5-b.dtb
|
||||||
@@ -12,6 +12,13 @@
|
|||||||
# firmware picks up.
|
# firmware picks up.
|
||||||
kernel=kernel_2712.img
|
kernel=kernel_2712.img
|
||||||
|
|
||||||
|
# Pin the load address to the one the image is linked at
|
||||||
|
# (kernel/linker/starkernel-native-rpi5.ld). Pi 5 firmware's own default
|
||||||
|
# for kernel_2712.img is 0x200000, not the classic 0x80000 -- leaving it
|
||||||
|
# implicit would load a 0x80000-linked flat image 1.5 MiB away from where
|
||||||
|
# every absolute address in it points.
|
||||||
|
kernel_address=0x80000
|
||||||
|
|
||||||
# Disable the firmware's Linux-compatible-image sanity check. Without
|
# Disable the firmware's Linux-compatible-image sanity check. Without
|
||||||
# this, official docs describe it as checking for "a compatible Device
|
# this, official docs describe it as checking for "a compatible Device
|
||||||
# Tree file before attempting to boot" and warn that "older non-compatible
|
# Tree file before attempting to boot" and warn that "older non-compatible
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# Xilinx Zynq-7020 boot media
|
||||||
|
|
||||||
|
The Zynq-7020's processing system is a dual Cortex-A9: ARMv7-A, 32-bit. It is the host for the
|
||||||
|
StarForth v4 mesh (`docs/v4.0.0/JUSTIFICATION.md` §5, §8).
|
||||||
|
|
||||||
|
Boot chain: BootROM, then `BOOT.BIN` (U-Boot SPL with the board's `ps7_init` DDR and clock setup),
|
||||||
|
then U-Boot, then LithosAnanke. Everything is read from the SD card's FAT partition.
|
||||||
|
|
||||||
|
Status: no image yet. `make boot_image TARGET=ZYNQ7020` stops with an error, because there is no
|
||||||
|
ARMv7 kernel port (`kernel/src/arch/armv7`: entry code, MMU, GIC, private timer). A trial
|
||||||
|
compile for Cortex-A9 built 147 of the 151 kernel and engine sources. The four that failed use
|
||||||
|
`__int128` or have no ARMv7 branch: `kernel/src/crypto/fe25519.c`,
|
||||||
|
`kernel/src/crypto/scalar25519.c`, `kernel/src/hal/hal.c` and
|
||||||
|
`v3/src/word_source/mixed_arithmetic_words.c`.
|
||||||
|
|
||||||
|
`BOOT.BIN` depends on the exact board (Zybo Z7-20, PYNQ-Z2, Arty Z7-20, ZedBoard, ...), because
|
||||||
|
`ps7_init` holds that board's DDR timing. The board has not been chosen yet.
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
# boards/zynq7020/board.mk -- Xilinx Zynq-7020 (dual Cortex-A9, ARMv7-A, 32-bit).
|
||||||
|
#
|
||||||
|
# Boot chain: BootROM -> BOOT.BIN (U-Boot SPL with the board's ps7_init DDR/
|
||||||
|
# clock setup) -> U-Boot -> LithosAnanke, all from the SD card's FAT
|
||||||
|
# partition. Needs the ARMv7 kernel port (kernel/src/arch/armv7), which is
|
||||||
|
# in progress: until it exists, boot_image stops with an explicit error
|
||||||
|
# rather than producing an image that cannot run.
|
||||||
|
BOARD_DESC := Xilinx Zynq-7020 (Cortex-A9, ARMv7-A, BOOT.BIN) -- ARMv7 port in progress
|
||||||
|
BOARD_ARCH := armv7
|
||||||
|
BOARD_BOOT := zynq-bootbin
|
||||||
|
BOARD_IMAGE := lithos-zynq7020.img
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
# Raspberry Pi 5 native boot media
|
|
||||||
|
|
||||||
What goes on the SD card for the native (non-UEFI) boot path (FABRIC-3.md §IV):
|
|
||||||
|
|
||||||
- `config.txt` — checked in here, done (§IV.3 item 6).
|
|
||||||
- `bcm2712-rpi-5-b.dtb` — Raspberry Pi firmware's own stock DTB; not built by this
|
|
||||||
project, copied from the firmware release the card is otherwise built from.
|
|
||||||
- `kernel_2712.img` — **does not exist yet.** `config.txt` names it, but no build target
|
|
||||||
in `Makefile.starkernel` currently emits a raw image by this name at load address
|
|
||||||
0x80000 — item 1 (entry stub) explicitly scoped a separate-image build target as future
|
|
||||||
work, not part of that item. Building this file is the remaining prerequisite before
|
|
||||||
item 7 (assembling the card) is possible.
|
|
||||||
+105
-96
@@ -1,5 +1,5 @@
|
|||||||
# Capsule Block Manifest — Auto-generated
|
# Capsule Block Manifest — Auto-generated
|
||||||
<!-- Generated by mkcapsule --manifest 2026-09-22T22:29:26Z -->
|
<!-- Generated by mkcapsule --manifest 2026-10-14T16:07:07Z -->
|
||||||
<!-- DO NOT EDIT — re-run mkcapsule --manifest to refresh. -->
|
<!-- DO NOT EDIT — re-run mkcapsule --manifest to refresh. -->
|
||||||
<!-- Hand-written justifications and immutability notes live -->
|
<!-- Hand-written justifications and immutability notes live -->
|
||||||
<!-- in MANIFEST.md alongside this auto-generated index. -->
|
<!-- in MANIFEST.md alongside this auto-generated index. -->
|
||||||
@@ -8,50 +8,53 @@
|
|||||||
|
|
||||||
| Capsule | Blocks claimed | xxHash64 | Signed |
|
| Capsule | Blocks claimed | xxHash64 | Signed |
|
||||||
|---------|----------------|----------|--------|
|
|---------|----------------|----------|--------|
|
||||||
| `ACL.4th` | 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4015 | `0xf8890c05c0d8f921` | yes |
|
| `ACL.4th` | 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4008, 4015 | `0xf8890c05c0d8f921` | n/a |
|
||||||
| `acl-std79.4th` | 4023, 4024, 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048 | `0x773bf9209df191d1` | yes |
|
| `acl-std79.4th` | 4023, 4024, 4025, 4026, 4027, 4028, 4029, 4030, 4031, 4032, 4033, 4034, 4035, 4036, 4037, 4038, 4039, 4040, 4041, 4042, 4043, 4044, 4045, 4046, 4047, 4048 | `0x773bf9209df191d1` | n/a |
|
||||||
| `artemis:init.4th` | 4110, 4111, 4112, 4113, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 4140, 4141, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 4170, 4171, 4172, 4173, 4174, 4177, 4178, 4179, 4180, 4181, 4182, 4851, 4852, 4853, 4854, 4856, 4857, 4858, 4860 | `0xe6fba9ae56e1c916` | yes |
|
| `artemis:init.4th` | 4110, 4111, 4112, 4113, 4122, 4123, 4124, 4125, 4126, 4127, 4128, 4129, 4130, 4131, 4132, 4133, 4134, 4135, 4136, 4137, 4138, 4139, 4140, 4141, 4160, 4161, 4162, 4163, 4164, 4165, 4166, 4167, 4168, 4169, 4170, 4171, 4172, 4173, 4174, 4177, 4178, 4179, 4180, 4181, 4182, 4851, 4852, 4853, 4854, 4856, 4860 | `0x486772c973d0d087` | n/a |
|
||||||
| `block-acl.4th` | 4019, 4020 | `0xf6cc2a59e3a6734e` | yes |
|
| `block-acl.4th` | 4019, 4020 | `0xf6cc2a59e3a6734e` | n/a |
|
||||||
| `doe-campaign.4th` | 4060, 4061, 4062, 4063, 4064, 4065 | `0x26fb485e5c9dc6ff` | yes |
|
| `doe-campaign.4th` | 4060, 4061, 4062, 4063, 4064, 4065 | `0x26fb485e5c9dc6ff` | n/a |
|
||||||
| `doe.4th` | 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107 | `0xf154616d248e861f` | yes |
|
| `doe.4th` | 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107 | `0xf154616d248e861f` | n/a |
|
||||||
| `fabric.4th` | 4900, 4901, 4902, 4903, 4904, 4905, 4906, 4907, 4908, 4909, 4910, 4911, 4912, 4913, 4914, 4915, 4916, 4917, 4918, 4919, 4920, 4921, 4922, 4923, 4924, 5000, 5001, 5002 | `0x9d9489cbeca4099b` | yes |
|
| `fabric.4th` | 4900, 4901, 4902, 4903, 4904, 4905, 4906, 4907, 4908, 4909, 4910, 4911, 4912, 4913, 4914, 4915, 4916, 4917, 4918, 4919, 4920, 4921, 4922, 4923, 4924, 5000, 5001, 5002 | `0x9d9489cbeca4099b` | n/a |
|
||||||
| `font.4th` | 4925, 4926, 4927, 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, 4942, 4943, 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 4952, 4953, 4954, 4955, 4956, 4957, 4958, 4959, 4960, 4961, 4962, 4963, 4964, 4965, 4966, 4967, 4968, 4969, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 4980, 4981, 4982, 4983, 4984, 4985 | `0x3f305911500c78f6` | yes |
|
| `font.4th` | 4925, 4926, 4927, 4928, 4929, 4930, 4931, 4932, 4933, 4934, 4935, 4936, 4937, 4938, 4939, 4940, 4941, 4942, 4943, 4944, 4945, 4946, 4947, 4948, 4949, 4950, 4951, 4952, 4953, 4954, 4955, 4956, 4957, 4958, 4959, 4960, 4961, 4962, 4963, 4964, 4965, 4966, 4967, 4968, 4969, 4970, 4971, 4972, 4973, 4974, 4975, 4976, 4977, 4978, 4979, 4980, 4981, 4982, 4983, 4984, 4985 | `0x3f305911500c78f6` | n/a |
|
||||||
| `hestia:init.4th` | 4986, 4987, 4988 | `0x64e111990fbc45ff` | yes |
|
| `hestia:init.4th` | 4986, 4987, 4988 | `0x64e111990fbc45ff` | n/a |
|
||||||
| `init-l8-diverse.4th` | 4820, 4821, 4822 | `0xaa293201a6c91838` | yes |
|
| `init-l8-diverse.4th` | 4820, 4821, 4822 | `0xaa293201a6c91838` | n/a |
|
||||||
| `init-l8-omni.4th` | 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079 | `0x5979e314d6452045` | yes |
|
| `init-l8-omni.4th` | 2064, 2065, 2066, 2067, 2068, 2069, 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079 | `0x5979e314d6452045` | n/a |
|
||||||
| `init-l8-stable.4th` | 4806 | `0xdc3830f189063a9a` | yes |
|
| `init-l8-stable.4th` | 4806 | `0xdc3830f189063a9a` | n/a |
|
||||||
| `init-l8-temporal.4th` | 4830, 4831 | `0x51abd4c138246651` | yes |
|
| `init-l8-temporal.4th` | 4830, 4831 | `0x51abd4c138246651` | n/a |
|
||||||
| `init-l8-transition.4th` | 4840, 4841, 4842 | `0xbcc1a81976f0a4c9` | yes |
|
| `init-l8-transition.4th` | 4840, 4841, 4842 | `0xbcc1a81976f0a4c9` | n/a |
|
||||||
| `init-l8-volatile.4th` | 4810, 4811, 4812, 4813 | `0x98caabbbd92abac4` | yes |
|
| `init-l8-volatile.4th` | 4810, 4811, 4812, 4813 | `0x98caabbbd92abac4` | n/a |
|
||||||
| `init.4th` | 2049, 2050, 2057 | `0xea038ba684c53443` | yes |
|
| `init.4th` | 2049, 2050, 2057 | `0xd09db9461b336431` | n/a |
|
||||||
| `lib.4th` | 4050 | `0x4b216635c359ef73` | yes |
|
| `lib.4th` | 4050 | `0x4b216635c359ef73` | n/a |
|
||||||
| `multiuser-doe.4th` | 5044, 5045, 5046, 5047, 5048, 5049, 5050, 5051, 5052, 5053, 5054, 5055 | `0x22140588ee7c39e6` | yes |
|
| `multiuser-doe.4th` | 5044, 5045, 5046, 5047, 5048, 5049, 5050, 5051, 5052, 5053, 5054, 5055 | `0x22140588ee7c39e6` | n/a |
|
||||||
| `sdk.4th` | 5109, 5110, 5111, 5112, 5113, 5114, 5115 | `0x008fdbbb62c94a3a` | yes |
|
| `sdk.4th` | 5109, 5110, 5111, 5112, 5113, 5114, 5115 | `0x008fdbbb62c94a3a` | n/a |
|
||||||
| `turtle.4th` | 5100, 5101, 5102, 5103, 5104, 5105, 5106, 5107, 5108 | `0x4d470418ca543365` | yes |
|
| `turtle.4th` | 5100, 5101, 5102, 5103, 5104, 5105, 5106, 5107, 5108 | `0x4d470418ca543365` | n/a |
|
||||||
| `user-font-demo.4th` | 4200, 4201, 4202 | `0xce1fd7d1b581a56d` | yes |
|
| `user-font-demo.4th` | 4200, 4201, 4202 | `0xce1fd7d1b581a56d` | n/a |
|
||||||
| `workload-0.4th` | 2200, 2201 | `0x93f86f60aeba8feb` | yes |
|
| `v4:forth79.4th` | 6000, 6001, 6002 | `0x4055641ee17d176b` | n/a |
|
||||||
| `workload-1-lite.4th` | 5058, 5059 | `0x44a7a7e3176dcc8d` | yes |
|
| `v4:hera.4th` | 8000, 8001, 8002, 8003, 8004, 8005, 8006 | `0x1c5ea12a9341e796` | n/a |
|
||||||
| `workload-1.4th` | 4406, 4415, 4425, 4435 | `0x63e251adb0a03613` | yes |
|
| `workload-0.4th` | 2200, 2201 | `0x93f86f60aeba8feb` | n/a |
|
||||||
| `workload-2.4th` | 4506, 4515, 4525, 4535, 4545 | `0xf113b3d0bcccae47` | yes |
|
| `workload-1-lite.4th` | 5058, 5059 | `0x44a7a7e3176dcc8d` | n/a |
|
||||||
| `workload-3.4th` | 4606, 4615, 4625, 4635, 4645, 4655, 4665 | `0x62b7a71576ad1041` | yes |
|
| `workload-1.4th` | 4406, 4415, 4425, 4435 | `0x63e251adb0a03613` | n/a |
|
||||||
| `workload-4.4th` | 2130, 2131, 2132 | `0x099619264e650b1c` | yes |
|
| `workload-2.4th` | 4506, 4515, 4525, 4535, 4545 | `0xf113b3d0bcccae47` | n/a |
|
||||||
| `workload-5-lite.4th` | 5056, 5057 | `0xea0303f38824f254` | yes |
|
| `workload-3.4th` | 4606, 4615, 4625, 4635, 4645, 4655, 4665 | `0x62b7a71576ad1041` | n/a |
|
||||||
| `workload-5.4th` | *(none — raw code capsule)* | `0x526964c7c9506a11` | yes |
|
| `workload-4.4th` | 2130, 2131, 2132 | `0x099619264e650b1c` | n/a |
|
||||||
| `workload-6.4th` | 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095 | `0x06fc0ce1e369ef5a` | yes |
|
| `workload-5-lite.4th` | 5056, 5057 | `0xea0303f38824f254` | n/a |
|
||||||
| `workload-7.4th` | 2150 | `0x02862291387eb7ac` | yes |
|
| `workload-5.4th` | *(none — raw code capsule)* | `0x526964c7c9506a11` | n/a |
|
||||||
| `workload-8.4th` | 2160 | `0x56b7f2f0efa000df` | yes |
|
| `workload-6.4th` | 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, 2090, 2091, 2092, 2093, 2094, 2095 | `0x06fc0ce1e369ef5a` | n/a |
|
||||||
| `workload-9.4th` | 4706, 4715, 4725, 4735, 4745 | `0x3f2bec73142aa424` | yes |
|
| `workload-7.4th` | 2150 | `0x02862291387eb7ac` | n/a |
|
||||||
| `workload-calib1.4th` | 5043 | `0x3b9f2d17b554fabc` | yes |
|
| `workload-8.4th` | 2160 | `0x56b7f2f0efa000df` | n/a |
|
||||||
| `zuse-eligibility.4th` | 4021, 4022 | `0x7b28f4776a32e0b7` | yes |
|
| `workload-9.4th` | 4706, 4715, 4725, 4735, 4745 | `0x3f2bec73142aa424` | n/a |
|
||||||
| `zuse.4th` | 4016, 4017, 4018 | `0x490ded9be257a90b` | yes |
|
| `workload-calib1.4th` | 5043 | `0x3b9f2d17b554fabc` | n/a |
|
||||||
|
| `zuse.4th` | 4016, 4017, 4018 | `0x490ded9be257a90b` | n/a |
|
||||||
|
|
||||||
|
*Signed column is `n/a`: this manifest run had no `--sign-key`. Re-run with `--sign-key <path>` to check signing status (does not modify or require rebuilding capsule_generated.c).*
|
||||||
|
|
||||||
## Block Map (sorted by LBN)
|
## Block Map (sorted by LBN)
|
||||||
|
|
||||||
| LBN | Capsule | xxHash64 | Status |
|
| LBN | Capsule | xxHash64 | Status |
|
||||||
|-----|---------|----------|--------|
|
|-----|---------|----------|--------|
|
||||||
| 2049 | `init.4th` | `0xea038ba684c53443` | ok |
|
| 2049 | `init.4th` | `0xd09db9461b336431` | ok |
|
||||||
| 2050 | `init.4th` | `0xea038ba684c53443` | ok |
|
| 2050 | `init.4th` | `0xd09db9461b336431` | ok |
|
||||||
| 2057 | `init.4th` | `0xea038ba684c53443` | ok |
|
| 2057 | `init.4th` | `0xd09db9461b336431` | ok |
|
||||||
| 2064 | `init-l8-omni.4th` | `0x5979e314d6452045` | ok |
|
| 2064 | `init-l8-omni.4th` | `0x5979e314d6452045` | ok |
|
||||||
| 2065 | `init-l8-omni.4th` | `0x5979e314d6452045` | ok |
|
| 2065 | `init-l8-omni.4th` | `0x5979e314d6452045` | ok |
|
||||||
| 2066 | `init-l8-omni.4th` | `0x5979e314d6452045` | ok |
|
| 2066 | `init-l8-omni.4th` | `0x5979e314d6452045` | ok |
|
||||||
@@ -114,8 +117,6 @@
|
|||||||
| 4018 | `zuse.4th` | `0x490ded9be257a90b` | ok |
|
| 4018 | `zuse.4th` | `0x490ded9be257a90b` | ok |
|
||||||
| 4019 | `block-acl.4th` | `0xf6cc2a59e3a6734e` | ok |
|
| 4019 | `block-acl.4th` | `0xf6cc2a59e3a6734e` | ok |
|
||||||
| 4020 | `block-acl.4th` | `0xf6cc2a59e3a6734e` | ok |
|
| 4020 | `block-acl.4th` | `0xf6cc2a59e3a6734e` | ok |
|
||||||
| 4021 | `zuse-eligibility.4th` | `0x7b28f4776a32e0b7` | ok |
|
|
||||||
| 4022 | `zuse-eligibility.4th` | `0x7b28f4776a32e0b7` | ok |
|
|
||||||
| 4023 | `acl-std79.4th` | `0x773bf9209df191d1` | ok |
|
| 4023 | `acl-std79.4th` | `0x773bf9209df191d1` | ok |
|
||||||
| 4024 | `acl-std79.4th` | `0x773bf9209df191d1` | ok |
|
| 4024 | `acl-std79.4th` | `0x773bf9209df191d1` | ok |
|
||||||
| 4025 | `acl-std79.4th` | `0x773bf9209df191d1` | ok |
|
| 4025 | `acl-std79.4th` | `0x773bf9209df191d1` | ok |
|
||||||
@@ -149,51 +150,51 @@
|
|||||||
| 4063 | `doe-campaign.4th` | `0x26fb485e5c9dc6ff` | ok |
|
| 4063 | `doe-campaign.4th` | `0x26fb485e5c9dc6ff` | ok |
|
||||||
| 4064 | `doe-campaign.4th` | `0x26fb485e5c9dc6ff` | ok |
|
| 4064 | `doe-campaign.4th` | `0x26fb485e5c9dc6ff` | ok |
|
||||||
| 4065 | `doe-campaign.4th` | `0x26fb485e5c9dc6ff` | ok |
|
| 4065 | `doe-campaign.4th` | `0x26fb485e5c9dc6ff` | ok |
|
||||||
| 4110 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4110 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4111 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4111 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4112 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4112 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4113 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4113 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4122 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4122 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4123 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4123 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4124 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4124 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4125 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4125 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4126 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4126 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4127 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4127 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4128 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4128 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4129 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4129 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4130 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4130 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4131 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4131 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4132 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4132 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4133 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4133 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4134 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4134 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4135 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4135 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4136 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4136 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4137 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4137 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4138 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4138 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4139 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4139 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4140 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4140 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4141 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4141 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4160 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4160 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4161 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4161 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4162 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4162 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4163 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4163 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4164 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4164 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4165 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4165 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4166 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4166 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4167 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4167 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4168 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4168 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4169 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4169 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4170 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4170 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4171 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4171 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4172 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4172 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4173 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4173 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4174 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4174 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4177 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4177 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4178 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4178 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4179 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4179 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4180 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4180 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4181 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4181 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4182 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4182 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4200 | `user-font-demo.4th` | `0xce1fd7d1b581a56d` | ok |
|
| 4200 | `user-font-demo.4th` | `0xce1fd7d1b581a56d` | ok |
|
||||||
| 4201 | `user-font-demo.4th` | `0xce1fd7d1b581a56d` | ok |
|
| 4201 | `user-font-demo.4th` | `0xce1fd7d1b581a56d` | ok |
|
||||||
| 4202 | `user-font-demo.4th` | `0xce1fd7d1b581a56d` | ok |
|
| 4202 | `user-font-demo.4th` | `0xce1fd7d1b581a56d` | ok |
|
||||||
@@ -231,14 +232,12 @@
|
|||||||
| 4840 | `init-l8-transition.4th` | `0xbcc1a81976f0a4c9` | ok |
|
| 4840 | `init-l8-transition.4th` | `0xbcc1a81976f0a4c9` | ok |
|
||||||
| 4841 | `init-l8-transition.4th` | `0xbcc1a81976f0a4c9` | ok |
|
| 4841 | `init-l8-transition.4th` | `0xbcc1a81976f0a4c9` | ok |
|
||||||
| 4842 | `init-l8-transition.4th` | `0xbcc1a81976f0a4c9` | ok |
|
| 4842 | `init-l8-transition.4th` | `0xbcc1a81976f0a4c9` | ok |
|
||||||
| 4851 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4851 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4852 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4852 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4853 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4853 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4854 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4854 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4856 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4856 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4857 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
| 4860 | `artemis:init.4th` | `0x486772c973d0d087` | ok |
|
||||||
| 4858 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
|
||||||
| 4860 | `artemis:init.4th` | `0xe6fba9ae56e1c916` | ok |
|
|
||||||
| 4900 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
|
| 4900 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
|
||||||
| 4901 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
|
| 4901 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
|
||||||
| 4902 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
|
| 4902 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
|
||||||
@@ -364,10 +363,20 @@
|
|||||||
| 5113 | `sdk.4th` | `0x008fdbbb62c94a3a` | ok |
|
| 5113 | `sdk.4th` | `0x008fdbbb62c94a3a` | ok |
|
||||||
| 5114 | `sdk.4th` | `0x008fdbbb62c94a3a` | ok |
|
| 5114 | `sdk.4th` | `0x008fdbbb62c94a3a` | ok |
|
||||||
| 5115 | `sdk.4th` | `0x008fdbbb62c94a3a` | ok |
|
| 5115 | `sdk.4th` | `0x008fdbbb62c94a3a` | ok |
|
||||||
|
| 6000 | `v4:forth79.4th` | `0x4055641ee17d176b` | ok |
|
||||||
|
| 6001 | `v4:forth79.4th` | `0x4055641ee17d176b` | ok |
|
||||||
|
| 6002 | `v4:forth79.4th` | `0x4055641ee17d176b` | ok |
|
||||||
|
| 8000 | `v4:hera.4th` | `0x1c5ea12a9341e796` | ok |
|
||||||
|
| 8001 | `v4:hera.4th` | `0x1c5ea12a9341e796` | ok |
|
||||||
|
| 8002 | `v4:hera.4th` | `0x1c5ea12a9341e796` | ok |
|
||||||
|
| 8003 | `v4:hera.4th` | `0x1c5ea12a9341e796` | ok |
|
||||||
|
| 8004 | `v4:hera.4th` | `0x1c5ea12a9341e796` | ok |
|
||||||
|
| 8005 | `v4:hera.4th` | `0x1c5ea12a9341e796` | ok |
|
||||||
|
| 8006 | `v4:hera.4th` | `0x1c5ea12a9341e796` | ok |
|
||||||
|
|
||||||
## Conflicts
|
## Conflicts
|
||||||
|
|
||||||
None.
|
None.
|
||||||
|
|
||||||
---
|
---
|
||||||
*36 capsule(s) scanned. Re-run `mkcapsule --manifest <dir>` to refresh.*
|
*37 capsule(s) scanned. Re-run `mkcapsule --manifest <dir>` to refresh.*
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ Blocks: **2049–2052, 2057**
|
|||||||
|
|
||||||
| Block | Immutable | Justification |
|
| Block | Immutable | Justification |
|
||||||
|-------|-----------|---------------|
|
|-------|-----------|---------------|
|
||||||
| 2049 | No | Hera VM init: `VM-TREE`/`VM-PARENT`/`VM-CHILDREN`; loads `ACL.4th`, `block-acl.4th`, `zuse-eligibility.4th`, `lib.4th`. **Corrected 2026-09-19 (three times)** — first pass removed a stale listing of `compudynamics`/`common:msg`/`fleet-k`/`process` (none loaded here; two already-deleted, two stripped in the same pass, FABRIC-3.6.md tasks 0.2/0.3). Second pass (same day): `fabric.4th`/`font.4th` **removed** from this list — relocated to `hestia/init.4th` (FABRIC-3.6.md tasks 1.6/1.7), Hera no longer loads either. Third pass (2026-09-22, FABRIC-3.6.md Phase 4 Stage E): `common:messaging.4th` + `MSG-CD-INIT` **removed** — the file itself is deleted (see "Deleted capsules" below); every FORTH-owned message type was cut over to kernel-Hermes first (Phase 3) |
|
| 2049 | No | Hera VM init: `VM-TREE`/`VM-PARENT`/`VM-CHILDREN`; loads `ACL.4th`, `block-acl.4th`, `lib.4th` (`zuse-eligibility.4th` removed 2026-10-14 with word-ACL elevation — FABRIC-3.md §XXXVII). **Corrected 2026-09-19 (three times)** — first pass removed a stale listing of `compudynamics`/`common:msg`/`fleet-k`/`process` (none loaded here; two already-deleted, two stripped in the same pass, FABRIC-3.6.md tasks 0.2/0.3). Second pass (same day): `fabric.4th`/`font.4th` **removed** from this list — relocated to `hestia/init.4th` (FABRIC-3.6.md tasks 1.6/1.7), Hera no longer loads either. Third pass (2026-09-22, FABRIC-3.6.md Phase 4 Stage E): `common:messaging.4th` + `MSG-CD-INIT` **removed** — the file itself is deleted (see "Deleted capsules" below); every FORTH-owned message type was cut over to kernel-Hermes first (Phase 3) |
|
||||||
| 2050 | No | BOOT-BANNER call — separated so the banner block can be swapped without touching init logic |
|
| 2050 | No | BOOT-BANNER call — separated so the banner block can be swapped without touching init logic |
|
||||||
| 2051 | No | TRIPOD-TEST — 6 acceptance gates per TRIPOD.md. Dead EVENT-WAIT step replaced with HERMES-TICK liveness check (`3436d564`) |
|
| 2051 | No | TRIPOD-TEST — 6 acceptance gates per TRIPOD.md. Dead EVENT-WAIT step replaced with HERMES-TICK liveness check (`3436d564`) |
|
||||||
| 2052 | No | TRIPOD-TEST invocation block |
|
| 2052 | No | TRIPOD-TEST invocation block |
|
||||||
@@ -350,7 +350,7 @@ three-architecture acceptance for the deletion: `logs/20260922-181141/amd64/`,
|
|||||||
Phase 4 entry for the full account, including one found-not-fixed collateral
|
Phase 4 entry for the full account, including one found-not-fixed collateral
|
||||||
defect (`SEND-ELEVATE-REQUEST`, this file's own former caller into
|
defect (`SEND-ELEVATE-REQUEST`, this file's own former caller into
|
||||||
`zuse-eligibility.4th`'s `ELEVATE-GRANT`, is now unreachable — Captain Bob's
|
`zuse-eligibility.4th`'s `ELEVATE-GRANT`, is now unreachable — Captain Bob's
|
||||||
2026-09-22 decision: leave it, Phase 8 PKI will build its own entrypoint).
|
2026-09-22 decision: leave it, Phase 8 PKI will build its own entrypoint). Removed 2026-10-14: elevation was ruled not needed, and `zuse-eligibility.4th` (blocks 4021–4022), its C words and the eligibility list went with it (FABRIC-3.md §XXXVII).
|
||||||
Former blocks 4100–4153 (ex-Artemis-gaps) are now UNASSIGNED — see Unassigned
|
Former blocks 4100–4153 (ex-Artemis-gaps) are now UNASSIGNED — see Unassigned
|
||||||
Ranges below. The per-block justification table this section used to carry
|
Ranges below. The per-block justification table this section used to carry
|
||||||
(arena allocator ABI, message/channel field accessors, the VM-name routing
|
(arena allocator ABI, message/channel field accessors, the VM-name routing
|
||||||
|
|||||||
+1
-1
@@ -34,6 +34,6 @@ Each block is limited to 1024 bytes. Verify with `wc -c` before committing.
|
|||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [`experiments/bare_metal/README.md`](../experiments/bare_metal/README.md) — DoE protocols and block namespace rules
|
- [`experiments/bare_metal/README.md`](../experiments/bare_metal/README.md) — DoE protocols and block namespace rules
|
||||||
- [`docs/03-architecture/word-acl/DESIGN.md`](../docs/03-architecture/word-acl/DESIGN.md) — ACL system design
|
- [`docs/reference/word-acl/DESIGN.md`](../docs/reference/word-acl/DESIGN.md) — ACL system design
|
||||||
- [`tools/mkcapsule.c`](../tools/mkcapsule.c) — assembles capsules into `capsule_generated.c`
|
- [`tools/mkcapsule.c`](../tools/mkcapsule.c) — assembles capsules into `capsule_generated.c`
|
||||||
- [Project root](../README.md)
|
- [Project root](../README.md)
|
||||||
|
|||||||
+12
-36
@@ -498,47 +498,23 @@ Block 4854
|
|||||||
STARTUP-BANNER
|
STARTUP-BANNER
|
||||||
|
|
||||||
Block 4856
|
Block 4856
|
||||||
( Storage-attach ack builder. Hera sends "<dev-addr> )
|
( HERA-BLK-ATTACH-REQ, dev-addr -- : Hera's storage-attach )
|
||||||
( HERA-BLK-ATTACH-REQ"; reply is "<dev-addr> <ok?> )
|
( request, VM-EXEC'd into Artemis. Runs BLK-ATTACH here, then )
|
||||||
( BLK-ATTACH-ACK" so identity birth only proceeds once )
|
( replies with KH-BLK-ATTACH-SEND, dev-addr ok? -- sent? : )
|
||||||
( storage is confirmed (repl.c's BLK-ATTACH-ACK). Bob, )
|
( the kernel writes the reply text for Hera itself, from the )
|
||||||
( 2026-09-07. )
|
( two numbers, for Artemis only -- so identity birth only )
|
||||||
CREATE ATTACH-ACK-BUF 64 ALLOT
|
( proceeds once storage is confirmed. Until 2026-10-14 )
|
||||||
VARIABLE ATTACH-ACK-LEN
|
( Artemis built that text here and the word sent any text )
|
||||||
: ACK-APPEND ( src-addr len -- )
|
( from any VM, which Hera ran as Zuse: FABRIC-3.md SXXXVII. )
|
||||||
DUP >R
|
|
||||||
ATTACH-ACK-BUF ATTACH-ACK-LEN @ +
|
|
||||||
SWAP CMOVE
|
|
||||||
ATTACH-ACK-LEN @ R> + ATTACH-ACK-LEN ! ;
|
|
||||||
|
|
||||||
Block 4857
|
|
||||||
: ACK-APPEND-CHAR ( char -- )
|
|
||||||
ATTACH-ACK-BUF ATTACH-ACK-LEN @ + C!
|
|
||||||
ATTACH-ACK-LEN @ 1+ ATTACH-ACK-LEN ! ;
|
|
||||||
: ACK-APPEND-NUM ( n -- )
|
|
||||||
0 SWAP <# #S #> ACK-APPEND ;
|
|
||||||
|
|
||||||
Block 4858
|
|
||||||
( HERA-BLK-ATTACH-REQ ( dev-addr -- ): VM-EXEC'd by MSG- )
|
|
||||||
( DELIVER when Hera's request arrives. Runs BLK-ATTACH on )
|
|
||||||
( Artemis's own dictionary, then replies to Hera via kernel- )
|
|
||||||
( Hermes's KH-BLK-ATTACH-SEND (repl.c) -- FABRIC-3.6.md task )
|
|
||||||
( 3.8 Stage C, FORTH Hermes no longer sees this message type. )
|
|
||||||
: HERA-BLK-ATTACH-REQ ( dev-addr -- )
|
: HERA-BLK-ATTACH-REQ ( dev-addr -- )
|
||||||
0 ATTACH-ACK-LEN !
|
DUP BLK-ATTACH KH-BLK-ATTACH-SEND DROP ;
|
||||||
DUP ACK-APPEND-NUM
|
|
||||||
BL ACK-APPEND-CHAR
|
|
||||||
DUP BLK-ATTACH ACK-APPEND-NUM
|
|
||||||
DROP
|
|
||||||
BL ACK-APPEND-CHAR
|
|
||||||
S" BLK-ATTACH-ACK" ACK-APPEND
|
|
||||||
ATTACH-ACK-BUF ATTACH-ACK-LEN @ KH-BLK-ATTACH-SEND DROP ;
|
|
||||||
|
|
||||||
Block 4860
|
Block 4860
|
||||||
( LOG-APPEND ( level ts msg-addr msg-u -- ) )
|
( LOG-APPEND ( level ts msg-addr msg-u -- ) )
|
||||||
( FABRIC-3.md SXXVI follow-on Step 4, 2026-09-13: real per-VM )
|
( FABRIC-3.md SXXVI follow-on Step 4, 2026-09-13: real per-VM )
|
||||||
( log persistence, reached via a sender's LOG-FLUSH/MSG-SEND )
|
( log persistence, by hand at the console for a smoke test. )
|
||||||
( round trip, or by hand at the console for a smoke test. )
|
( LOG-FLUSH does not come through here: since 2026-10-14 a )
|
||||||
|
( VM's records reach the ring in C, vm_log_buffer.c. )
|
||||||
( Thin wrapper -- kernel-only (LOG-APPEND-RAW) (log_words.c/ )
|
( Thin wrapper -- kernel-only (LOG-APPEND-RAW) (log_words.c/ )
|
||||||
( log_region.c) does the real disk write; never calls )
|
( log_region.c) does the real disk write; never calls )
|
||||||
( log_message() (see log_region.c's own doc comment on why). )
|
( log_message() (see log_region.c's own doc comment on why). )
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ Block 2049
|
|||||||
: VM-CHILDREN ( -- ) ." (none)" CR ;
|
: VM-CHILDREN ( -- ) ." (none)" CR ;
|
||||||
S" ACL.4th" EXEC
|
S" ACL.4th" EXEC
|
||||||
S" block-acl.4th" EXEC
|
S" block-acl.4th" EXEC
|
||||||
S" zuse-eligibility.4th" EXEC
|
|
||||||
S" lib.4th" EXEC
|
S" lib.4th" EXEC
|
||||||
( FABRIC-3.6.md Phase 4, Stage E: common:messaging.4th/ )
|
( FABRIC-3.6.md Phase 4, Stage E: common:messaging.4th/ )
|
||||||
( MSG-CD-INIT removed -- no longer exists, no longer needed. )
|
( MSG-CD-INIT removed -- no longer exists, no longer needed. )
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
Block 6000
|
||||||
|
( forth79.4th -- the FORTH-79 Required Word Set for v4, )
|
||||||
|
( as colon definitions, loaded when the system boots. )
|
||||||
|
( docs/v4.0.0/NUCLEUS.md. Blocks 6000 up. )
|
||||||
|
( A word moves here from the assembled nucleus, v4/capsule, )
|
||||||
|
( once its colon definition passes POST. )
|
||||||
|
Block 6001
|
||||||
|
( U* U/MOD -- FORTH-79 unsigned multiply and divide. )
|
||||||
|
( Neither v3 nor the v4 nucleus had them. )
|
||||||
|
( The first two words count the bits in a cell. )
|
||||||
|
: (BITS) ( -- n )
|
||||||
|
0 1 BEGIN DUP WHILE 2* SWAP 1+ SWAP REPEAT DROP ;
|
||||||
|
(BITS) CONSTANT (NB)
|
||||||
|
VARIABLE (UD)
|
||||||
|
( u1 u2 -- ud the unsigned double product )
|
||||||
|
: U* UM* ;
|
||||||
|
Block 6002
|
||||||
|
( ud u1 -- u2 u3 unsigned: u2 the remainder, u3 the quotient )
|
||||||
|
( One bit a step: shift ud left, and take u1 from its high )
|
||||||
|
( cell whenever it goes, counting that in the low cell. )
|
||||||
|
( A zero divisor is error 11, Division by zero. )
|
||||||
|
: U/MOD
|
||||||
|
DUP 0= IF DROP DROP DROP 11 NODE-ERROR ! THEN (UD) !
|
||||||
|
(NB) 0 DO
|
||||||
|
DUP 0< >R 2* OVER 0< IF 1+ THEN SWAP 2* SWAP
|
||||||
|
R> IF (UD) @ - SWAP 1+ SWAP
|
||||||
|
ELSE DUP (UD) @ U< 0= IF (UD) @ - SWAP 1+ SWAP THEN THEN
|
||||||
|
LOOP SWAP ;
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
Block 8000
|
||||||
|
( hera.4th -- Hera: the node that has the others born and )
|
||||||
|
( manages them. docs/v4.0.0/MESH.md sections 9 and 10. )
|
||||||
|
( She asks whoever holds the fabric for a node, wires it, )
|
||||||
|
( and sends it its capsules through the port that joins )
|
||||||
|
( them. The unit rule is here and nowhere else: four outer )
|
||||||
|
( nodes round a centre, an outer node wired only inside its )
|
||||||
|
( unit. )
|
||||||
|
( Text for another node is built in PAD. )
|
||||||
|
VARIABLE (T#)
|
||||||
|
: (T0) ( -- ) 0 (T#) ! ;
|
||||||
|
: (TC) ( c -- ) PAD (T#) @ + C! 1 (T#) +! ;
|
||||||
|
: (TS) ( baddr u -- )
|
||||||
|
DUP IF 0 DO DUP I + C@ (TC) LOOP DROP ELSE DROP DROP THEN ;
|
||||||
|
: (TN) ( n -- ) 0 <# #S #> (TS) 32 (TC) ;
|
||||||
|
: (T) ( -- baddr u ) PAD (T#) @ ;
|
||||||
|
Block 8001
|
||||||
|
( The node being born: its place in the fabric, the number )
|
||||||
|
( it is to have, and the port of this node that leads to it. )
|
||||||
|
VARIABLE (KID) VARIABLE (KID#) VARIABLE (KIDP)
|
||||||
|
: (FAIL) ( -- )
|
||||||
|
." BIRTH: node " (KID#) @ . ." did not do as it was told" CR
|
||||||
|
-1 NODE-ERROR ! ;
|
||||||
|
: (TOLD) ( how -- ) 1 - IF (FAIL) THEN ;
|
||||||
|
: (TELL) ( baddr u -- ) (KID#) @ SEND (KID#) @ AWAIT (TOLD) ;
|
||||||
|
( the nucleus, a capsule of F18 code, cell by cell to its port )
|
||||||
|
: (NUCLEUS) ( -- )
|
||||||
|
S" v4:nucleus-64.f18" CAPSULE-OPEN 0= IF (FAIL) THEN
|
||||||
|
BEGIN CAPSULE-CELL WHILE (KIDP) @ PORT! REPEAT DROP ;
|
||||||
|
( a capsule of FORTH blocks, a line at a time )
|
||||||
|
: (LINES) ( baddr u -- ) CAPSULE-OPEN 0= IF (FAIL) THEN
|
||||||
|
BEGIN PAD CAPSULE-LINE DUP 0< 0= WHILE PAD SWAP (TELL) REPEAT
|
||||||
|
DROP ;
|
||||||
|
Block 8002
|
||||||
|
( The nodes this one has had born: for each its number and )
|
||||||
|
( its place in the fabric. Sixteen at most. )
|
||||||
|
CREATE (KIDS) 32 ALLOT VARIABLE (KIDS#) 0 (KIDS#) !
|
||||||
|
: (KID@) ( i -- addr ) 2 * (KIDS) + ;
|
||||||
|
: (NOTE) ( number place -- )
|
||||||
|
(KIDS#) @ 16 < IF
|
||||||
|
(KIDS#) @ (KID@) SWAP OVER 1+ ! ! 1 (KIDS#) +!
|
||||||
|
ELSE DROP DROP THEN ;
|
||||||
|
( which of them has that number: its place in the list, or -1 )
|
||||||
|
: (WHICH) ( number -- i | -1 )
|
||||||
|
-1 SWAP (KIDS#) @ DUP IF 0 DO
|
||||||
|
DUP I (KID@) @ = IF SWAP DROP I SWAP THEN
|
||||||
|
LOOP ELSE DROP THEN DROP ;
|
||||||
|
Block 8003
|
||||||
|
( who it is, where its printing goes, and that everything )
|
||||||
|
( not told of goes by its port 2, where this node is )
|
||||||
|
: (WHO) ( -- )
|
||||||
|
(T0) (KID#) @ (TN) S" (ME) ! " (TS)
|
||||||
|
(CONSOLE) @ (TN) S" (CONSOLE) ! 2 DEFAULT-ROUTE " (TS)
|
||||||
|
(ME) @ (TN) S" 2 NEIGHBOUR" (TS)
|
||||||
|
(T) 0 (KIDP) @ SEND-ON (KID#) @ AWAIT (TOLD) ;
|
||||||
|
( number port -- place A NODE IS BORN on that port of )
|
||||||
|
( this one: empty, then the nucleus, then FORTH-79. )
|
||||||
|
: BIRTH ( number port -- place )
|
||||||
|
(KIDP) ! (KID#) !
|
||||||
|
NODE-BORN DUP 0< IF (FAIL) THEN (KID) !
|
||||||
|
NODE-ME (KIDP) @ (KID) @ 2 NODE-WIRE 0= IF (FAIL) THEN
|
||||||
|
(NUCLEUS)
|
||||||
|
(KID#) @ (KIDP) @ ROUTE (KID#) @ (KIDP) @ NEIGHBOUR (WHO)
|
||||||
|
S" v4:forth79.4th" (LINES)
|
||||||
|
Block 8004
|
||||||
|
S" (SEAL)" (TELL)
|
||||||
|
(KID) @ (KID#) @ NODE-PARITY
|
||||||
|
(KID#) @ (KID) @ (NOTE)
|
||||||
|
(KID) @ ;
|
||||||
|
( Two outer nodes are joined: port 3 of X to port 4 of Y, )
|
||||||
|
( and each is told the other is there. )
|
||||||
|
VARIABLE (XP) VARIABLE (XN) VARIABLE (YP) VARIABLE (YN)
|
||||||
|
: (X) ( place number -- ) (XN) ! (XP) ! ;
|
||||||
|
: (Y) ( place number -- ) (YN) ! (YP) ! ;
|
||||||
|
: (SAY) ( them port me -- ) (KID#) !
|
||||||
|
(T0) OVER (TN) DUP (TN) S" ROUTE " (TS)
|
||||||
|
SWAP (TN) (TN) S" NEIGHBOUR" (TS) (T) (TELL) ;
|
||||||
|
: (JOIN) ( -- )
|
||||||
|
(XP) @ 3 (YP) @ 4 NODE-WIRE 0= IF (FAIL) THEN
|
||||||
|
(YN) @ 3 (XN) @ (SAY) (XN) @ 4 (YN) @ (SAY) ;
|
||||||
|
Block 8005
|
||||||
|
( n -- A UNIT: four outer nodes, n+1 to n+4, on ports 2 )
|
||||||
|
( to 5 of this one, and joined in a square: 1-2, 2-4, 4-3, )
|
||||||
|
( 3-1. The corners across from each other are not wired: )
|
||||||
|
( what one sends the other goes by this node. )
|
||||||
|
VARIABLE (U)
|
||||||
|
VARIABLE (P1) VARIABLE (P2) VARIABLE (P3) VARIABLE (P4)
|
||||||
|
: (N) ( k -- number ) (U) @ + ;
|
||||||
|
: UNIT ( n -- ) (U) !
|
||||||
|
1 (N) 2 BIRTH (P1) ! 2 (N) 3 BIRTH (P2) !
|
||||||
|
3 (N) 4 BIRTH (P3) ! 4 (N) 5 BIRTH (P4) !
|
||||||
|
(P1) @ 1 (N) (X) (P2) @ 2 (N) (Y) (JOIN)
|
||||||
|
(P2) @ 2 (N) (X) (P4) @ 4 (N) (Y) (JOIN)
|
||||||
|
(P4) @ 4 (N) (X) (P3) @ 3 (N) (Y) (JOIN)
|
||||||
|
(P3) @ 3 (N) (X) (P1) @ 1 (N) (Y) (JOIN) ;
|
||||||
|
Block 8006
|
||||||
|
( n -- KILL: node n is removed, whatever it was doing. )
|
||||||
|
( This node forgets the way to it, and every other node it )
|
||||||
|
( has had born is told that n is gone: each forgets its way )
|
||||||
|
( to n, and one that is waiting for n's answer stops. )
|
||||||
|
( docs/v4.0.0/MESH.md 7b.5. As v3's KILL, by number. )
|
||||||
|
: (UNLIST) ( i -- )
|
||||||
|
(KIDS#) @ 1- DUP (KIDS#) ! (KID@) DUP @ SWAP 1+ @
|
||||||
|
ROT (KID@) SWAP OVER 1+ ! ! ;
|
||||||
|
: KILL ( n -- )
|
||||||
|
DUP (WHICH) DUP 0< IF
|
||||||
|
DROP DROP ." KILL: no such node" CR -1 NODE-ERROR ! THEN
|
||||||
|
DUP (KID@) 1+ @ NODE-KILL (UNLIST)
|
||||||
|
DUP NO-ROUTE
|
||||||
|
(KIDS#) @ DUP IF 0 DO DUP I (KID@) @ GONE LOOP ELSE DROP THEN
|
||||||
|
DROP ;
|
||||||
Binary file not shown.
@@ -1,26 +0,0 @@
|
|||||||
Block 4021
|
|
||||||
( zuse-eligibility.4th - H.5/H.8 elevation grant )
|
|
||||||
( C prims: ZUSE-ELIGIBILITY-ADD ZUSE-ELIGIBLE? )
|
|
||||||
( NAME>XT ELEVATE-PUBKEY-UNPACK )
|
|
||||||
( Policy word this file: ELEVATE-GRANT. Runs in )
|
|
||||||
( Hera's own dict -- delivered here by kernel-Hermes's own )
|
|
||||||
( drain checkpoint (FABRIC-3.6.md task 3.10), not FORTH )
|
|
||||||
( MSG-DELIVER (messaging.4th, removed Phase 4 Stage E). )
|
|
||||||
( FABRIC-2.md H.12 step 21, 2026-09-03. )
|
|
||||||
CREATE ELEVATE-PK-BUF 32 ALLOT
|
|
||||||
|
|
||||||
Block 4022
|
|
||||||
( ELEVATE-GRANT ( waddr wu pk0 pk1 pk2 pk3 -- ) )
|
|
||||||
( Reconstructs the caller's pubkey, checks Zuse's )
|
|
||||||
( eligibility list, and on match grants the named )
|
|
||||||
( word ACL-ALLOW!/ACL-TTL! via the same reused )
|
|
||||||
( ACL-TTL mechanism H.5 decided on. No grant, no )
|
|
||||||
( error, on any mismatch -- silent refusal. )
|
|
||||||
: ELEVATE-GRANT ( waddr wu pk0 pk1 pk2 pk3 -- )
|
|
||||||
ELEVATE-PK-BUF ELEVATE-PUBKEY-UNPACK
|
|
||||||
ELEVATE-PK-BUF ZUSE-ELIGIBLE? IF
|
|
||||||
NAME>XT DUP IF
|
|
||||||
1 OVER ACL-ALLOW!
|
|
||||||
ACL-BASE-TTL SWAP ACL-TTL!
|
|
||||||
ELSE DROP THEN
|
|
||||||
ELSE 2DROP THEN ;
|
|
||||||
@@ -12,8 +12,6 @@ Block 4016
|
|||||||
( >BODY-then-store, so a pinned CONSTANT isn't tamper-proof. )
|
( >BODY-then-store, so a pinned CONSTANT isn't tamper-proof. )
|
||||||
( Read with ZUSE-PUBKEY@ / ZUSE-CERT-INSTALLED? -- both C )
|
( Read with ZUSE-PUBKEY@ / ZUSE-CERT-INSTALLED? -- both C )
|
||||||
( primitives, read-only; the seed has no FORTH access at all. )
|
( primitives, read-only; the seed has no FORTH access at all. )
|
||||||
( ZUSE-ELIGIBILITY-ADD denied by default -- see block 4017. )
|
|
||||||
0 ['] ZUSE-ELIGIBILITY-ADD ACL-ALLOW!
|
|
||||||
|
|
||||||
Block 4017
|
Block 4017
|
||||||
( ACL-ZUSE-BOOT ( -- ) re-invokable: capsule_zuse_boot.c )
|
( ACL-ZUSE-BOOT ( -- ) re-invokable: capsule_zuse_boot.c )
|
||||||
@@ -25,8 +23,6 @@ Block 4017
|
|||||||
: ACL-ZUSE-BOOT ( -- )
|
: ACL-ZUSE-BOOT ( -- )
|
||||||
ZUSE-CERT-INSTALLED? IF
|
ZUSE-CERT-INSTALLED? IF
|
||||||
ZUSE-AUTHENTICATE
|
ZUSE-AUTHENTICATE
|
||||||
1 ['] ZUSE-ELIGIBILITY-ADD ACL-ALLOW!
|
|
||||||
['] ZUSE-ELIGIBILITY-ADD ACL-PIN
|
|
||||||
LOG-INFO" zuse: activated"
|
LOG-INFO" zuse: activated"
|
||||||
ELSE
|
ELSE
|
||||||
LOG-INFO" zuse: NOT activated -- no cert installed"
|
LOG-INFO" zuse: NOT activated -- no cert installed"
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
# configs/
|
# configs/
|
||||||
|
|
||||||
Example Kconfig `defconfig` files — starting points for `make -f
|
Example Kconfig `defconfig` files — starting points for `make -f
|
||||||
Makefile.starkernel ARCH=<arch> defconfig` (kernel) or the equivalent
|
kernel/Makefile ARCH=<arch> defconfig` (kernel) or the equivalent
|
||||||
hosted target, matching the current committed default build behavior for
|
hosted target, matching the current committed default build behavior for
|
||||||
each profile. Loaded via `tools/kconfig/conf`.
|
each profile. Loaded via `tools/kconfig/conf`.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
# Dead ideas and revised claims
|
||||||
|
|
||||||
|
A register, started 2026-10-14 by the docs triage. An idea that was abandoned, or a claim that
|
||||||
|
turned out wrong, keeps its documents (archived, with a header) — this page says, in one place,
|
||||||
|
what is no longer true, since when, and where the decision is recorded. Add to it whenever a
|
||||||
|
document is superseded or a claim corrected.
|
||||||
|
|
||||||
|
## Dead — abandoned, removed, or never adopted
|
||||||
|
|
||||||
|
| Idea | Since | What happened | Recorded in |
|
||||||
|
|---|---|---|---|
|
||||||
|
| L4Re / Fiasco.OC as a platform target | mid-2026 | Removed as an active target; LithosAnanke is its own kernel. | `.claude/CLAUDE.md` (Project Overview); docs archived in `working/archive/dead/l4re/` |
|
||||||
|
| The `hal_*` interface contract and its migration plan | flagged 2026-10-09 | Never adopted; the kernel grew its own HAL. | `working/archive/dead/hal-target-contract/`; the HAL as built: `kernel/src/hal/README.md` |
|
||||||
|
| ACL "Rolling Window of Truth" (`ACL-RECHECK-RW`) | removed 2026-07-08 | Dead code from the start: `acl_recheck()` only ever looked up `ACL-RECHECK`. | `fabric/FABRIC-1.md` §M–T |
|
||||||
|
| The Hermes VM and FORTH messaging (`messaging.4th`, `MSG-TICK`) | 2026-09-22 | Messaging moved into the kernel as kernel-Hermes; the Tripod is Hera / Artemis / Hestia. | `fabric/FABRIC-3.5.md`, `FABRIC-3.6.md`; old docs in `working/archive/superseded/2026-08-tripod/` and `.claude/HERMES.md` (frozen) |
|
||||||
|
| Running a VM's messages from Hera's idle loop (a second delivery path) | 2026-10-14 | One path: a VM takes its own messages on its own turn. | `fabric/FABRIC-3.md` §XXXVI |
|
||||||
|
| Word-ACL elevation on request (`ELEVATE-GRANT`, `KH-ELEVATE-SEND`) and Zuse's eligibility list | 2026-10-14 | Ruled not needed: privilege comes from the drive. Removed, with the hole it carried; the list's disk area is reserved, unused. | `fabric/FABRIC-3.md` §XXXVII; `fabric/FABRIC-3.7.md` (closed) |
|
||||||
|
| A knowledge factor for identity (PIN, passphrase) | 2026-09-23 | Built, tested, reverted: "there's only the drive." | `fabric/FABRIC-3.7.md` §4 |
|
||||||
|
| Defending against a byte-for-byte cloned identity drive | 2026-09-23 | Accepted by design, not a gap. (Copying from *within* StarshipOS is blocked.) | `fabric/FABRIC-3.7.md` §4 |
|
||||||
|
| The StarForth-era roadmap (VM -> kernel -> OS -> FPGA, 2025-12) | flagged 2026-08-26 | Overtaken; the architecture and terms it uses no longer exist. | `working/archive/superseded/2025-12-14-starforth-roadmap.md`; now `reference/ROADMAP.md` |
|
||||||
|
| The complete 2^6 factorial DoE | flagged 2026-10-09 | Obsolete. | `working/archive/superseded/factorial-doe/` |
|
||||||
|
| "Everything is a VM" system architecture, draft 0.1 | 2026-01-27 | A vision draft; what was built is in the FABRIC record. | `working/archive/historical/2026-01-27-system-architecture-draft.md` |
|
||||||
|
|
||||||
|
**Deferred, not dead:**
|
||||||
|
- **The multiuser/multitasking DoE campaign** (`fabric/FABRIC-3.md` §XXXIII–XXXV). Deferred past
|
||||||
|
bare metal, 2026-10-14. Its original 30-reps-per-cell design (about 10.3 days) had already been
|
||||||
|
replaced, in §XXXIV.4, by a segmented per-ISA design.
|
||||||
|
- **Keyboard VMs.** A concept only (2026-10-14), not designed.
|
||||||
|
|
||||||
|
## Revised — claims that were corrected
|
||||||
|
|
||||||
|
| Was | Is | Since | Recorded in |
|
||||||
|
|---|---|---|---|
|
||||||
|
| ACL overhead "+0.0054%–+0.0088%" (the "ACL-RWT" campaign) | **+0.0603%**, the live ACL-TTL mechanism, CV 0.000% | 2026-08-21 | `fabric/FABRIC-1.md` §T |
|
||||||
|
| Kernel version 2.0.1 | rolled back to 2.0.0 on 2026-09-04 (2.0.1 names the SER5 hardware line), now **2.1.0** (tag `v2.1.0`) | 2026-09-22 | `fabric/FABRIC-3.md` §I.2; `kernel/Makefile` |
|
||||||
|
| Capsule blocks must be in `[2048, 5120)` | **2048 or more**, no upper bound | 2026-10-05 | `v4.0.0/NUCLEUS.md` §5.2 |
|
||||||
|
| A capsule block is a 1024-byte budget | **64 characters x 16 lines** (`mkcapsule --lint`) | 2026-09-19 | `.claude/CLAUDE.md` (block format) |
|
||||||
|
| Parity baseline: 530 words, hash `0x08873e0f44b7cb2a` | **526 words, `0x82f4ae7cb2e2d424`** (elevation words out, `LOG-FLUSH`/`LOG-SHOW` in) | 2026-10-14 | `fabric/FABRIC-3.md` §XXXVII, §XXXVIII |
|
||||||
|
| Identity drives attached together are dropped (§XIV) | **no longer reproduces**, all three ISAs | 2026-10-14 | `fabric/FABRIC-3.md` §XIV |
|
||||||
|
| `THRU`/`LOAD` lose the rest of their line | **fixed** | 2026-10-14 | `fabric/FABRIC-3.md` §XXXIV.1 |
|
||||||
|
| The log ring's growth is "safe regardless of wrap state" | **it was not**; fixed | 2026-10-14 | `fabric/FABRIC-3.md` §XXXVIII |
|
||||||
|
| The Pi 5's GIC is under `/axi` with two-cell addresses; its framebuffer address needs `& 0x3FFFFFFF` | **under `/soc`, one cell**, read through `ranges`; the address **goes through `dma-ranges`** | 2026-10-14 | `fabric/FABRIC-3.md` §XXXIX |
|
||||||
|
| The old elevation path passed a raw cross-VM address | **it copied text** (the narrower real gap was a `"` in a name) | 2026-09-22 | `fabric/FABRIC-3.7.md` (its own correction) |
|
||||||
|
| Kernel builds boot v3 (v4 only with `STARFORTH_V4=1`, then v3 not at all; board images v3 unless `system=v4`) | **every build carries both and boots v4** unless `system=v3` -- v3 is being retired | 2026-10-14 | `fabric/FABRIC-3.md` XLIII (revised) |
|
||||||
|
| `.claude/ARTEMIS.md`, `HERMES.md`, `TRIPOD.md`, `CONSOLE.md` describe the system | **frozen as record**, superseded by FABRIC-3.5/3.6 | 2026-09-22 | `.claude/CLAUDE.md` (top) |
|
||||||
|
|
||||||
|
**Resolved 2026-10-14:** the top-level `README.md` was titled "LithosAnanke v2.0.1" (the SER5
|
||||||
|
hardware line's version) while the kernel is 2.1.0; Captain Bob ruled it rewritten -- it now
|
||||||
|
describes the system as it is (Tripod Hera/Artemis/Hestia, kernel-Hermes, 1052-test POST, both
|
||||||
|
systems on every board image, v4 the default).
|
||||||
+23
-15
@@ -1,20 +1,28 @@
|
|||||||
# docs/DELETE-CANDIDATES.md
|
# docs/DELETE-CANDIDATES.md
|
||||||
|
|
||||||
**Generated:** 2026-06-16 (docs reorg Phase 2)
|
**Listed:** 2026-10-14 (docs triage). **Status: deleted 2026-10-14 on Captain Bob's ruling
|
||||||
**Status:** Awaiting Bob's explicit confirmation. Nothing here has been deleted.
|
("delete").** The list is kept as the record of what was removed and why; nothing is awaiting a
|
||||||
|
ruling now. The formal tier's `%% SOURCE:` comments that named two of these were repointed at
|
||||||
|
the maintained copies.
|
||||||
|
|
||||||
These files were tagged `DELETE` during Phase 1 triage (see `docs/INDEX.md`).
|
Every one is a duplicate: either byte-identical to another file in the same archive, or an older
|
||||||
Per the ground rules in `docs/CLAUDE.md`, they are listed here and left in place
|
copy of a document whose maintained copy is named in the reason. Deleting them loses nothing.
|
||||||
until Bob confirms removal. They were relocated with their parent trees during
|
|
||||||
the Phase 2 reorganization but otherwise left unmodified (no provenance header
|
|
||||||
was inserted into them).
|
|
||||||
|
|
||||||
| Path (current) | Original path | Reason |
|
(The four candidates listed 2026-06-16 -- an empty break-me report, two GitHub issue templates and
|
||||||
|----------------|---------------|--------|
|
an AI session note -- are no longer in the tree: they were removed at some point since.)
|
||||||
| docs/working/archive/quality/validation/break-me-report.md | docs/04-quality/validation/break-me-report.md | Empty (0 bytes); never written despite `break_me_tests.c` existing. |
|
|
||||||
| docs/working/scratch/src/bug_report.adoc | docs/src/bug_report.adoc | Generic GitHub bug-report template (smartphone/browser/OS fields) auto-converted to AsciiDoc; irrelevant to a CLI FORTH VM. |
|
| Path | Why |
|
||||||
| docs/working/scratch/src/feature_request.adoc | docs/src/feature_request.adoc | Generic GitHub feature-request template, garbled by AsciiDoc conversion; no project-specific content. |
|
|---|---|
|
||||||
| docs/working/scratch/src/internal/SHARED_CLAUDE.adoc | docs/src/internal/SHARED_CLAUDE.adoc | Dated 2025-10-19 ad-hoc AI session notes/chat log; pure transient working notes. |
|
| `docs/lithosananke/hal/README.md` | Duplicate of docs/working/archive/dead/hal-target-contract/README.md, without that copy's 2026-10-09 "never adopted" flags. |
|
||||||
|
| `docs/lithosananke/hal/interfaces.md` | Duplicate (older, unflagged) of docs/working/archive/dead/hal-target-contract/interfaces.md. |
|
||||||
|
| `docs/lithosananke/hal/lithosananke-integration.md` | The same document as docs/working/archive/dead/hal-target-contract/starkernel-integration.md under the kernel's newer name, without its "obsolete" flag. |
|
||||||
|
| `docs/lithosananke/hal/migration-plan.md` | Duplicate (older, unflagged) of docs/working/archive/dead/hal-target-contract/migration-plan.md. |
|
||||||
|
| `docs/lithosananke/hal/overview.md` | Duplicate (older) of docs/working/archive/dead/hal-target-contract/overview.md. |
|
||||||
|
| `docs/lithosananke/hal/platform-implementations.md` | Duplicate (older, unflagged) of docs/working/archive/dead/hal-target-contract/platform-implementations.md. |
|
||||||
|
| `docs/working/architecture/03-architecture/word-acl/DESIGN.md` | Older copy (2026-06) of docs/reference/word-acl/DESIGN.md, which is the maintained one (status through Phase 7). |
|
||||||
|
| `docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/02_SUPPORTING_DOCS/FORMAL_CLAIMS_FOR_REVIEWERS.txt` | Byte-identical to ../../FORMAL_CLAIMS_FOR_REVIEWERS.txt in the same archive. |
|
||||||
|
| `docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/02_SUPPORTING_DOCS/QUICK_REFERENCE.txt` | Byte-identical to ../../QUICK_REFERENCE.txt in the same archive. |
|
||||||
|
| `docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/03_EXPERIMENTAL_DATA/full_90_run_comprehensive/experiment_summary.txt` | Byte-identical to ../../../full_90_run_comprehensive/experiment_summary.txt in the same archive. |
|
||||||
|
| `docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/03_EXPERIMENTAL_DATA/full_90_run_comprehensive/run_logs/test_matrix.txt` | Byte-identical to the same file in ../../../full_90_run_comprehensive/run_logs/. |
|
||||||
|
| `docs/working/papers/ONTOLOGY.md` | Older copy (v1.0) of docs/reference/ONTOLOGY.md (v1.1, 2026-08-13). |
|
||||||
|
|
||||||
To approve deletion, tell Claude "delete the DELETE candidates" (or list specific
|
|
||||||
ones to keep).
|
|
||||||
|
|||||||
+636
-324
@@ -1,331 +1,643 @@
|
|||||||
# docs/INDEX.md — Documentation Triage
|
# docs/INDEX.md — every document, and its status
|
||||||
|
|
||||||
**Phase 1 triage:** 2026-06-16 · **Phase 2 reorg:** 2026-06-16 · **Phase 3 stubs:** 2026-06-16
|
Generated 2026-10-14 by the docs triage (docs/CLAUDE.md, Phase 1), from the tracked tree
|
||||||
**Total files inventoried:** 328
|
after the reorganisation. Start at **[README.md](README.md)** for the map; abandoned ideas and
|
||||||
**Status tags:** CURRENT · WORKING · HISTORICAL · SUPERSEDED · OBSOLETE · DELETE
|
revised claims are in **[DEAD-AND-REVISED.md](DEAD-AND-REVISED.md)**; files awaiting a delete
|
||||||
|
ruling are in **[DELETE-CANDIDATES.md](DELETE-CANDIDATES.md)**. Logs (`logs/`) and DoE run
|
||||||
|
CSVs are not listed. Bulk data folders, and the formal LaTeX tree (governed by
|
||||||
|
`docs/formal/CLAUDE.md`), are listed one row per folder.
|
||||||
|
|
||||||
---
|
| Status | Meaning | Rows |
|
||||||
|
|---|---|---|
|
||||||
|
| CURRENT | Accurate; reflects the system as it is | 96 |
|
||||||
|
| WORKING | Living draft or record, still edited | 128 |
|
||||||
|
| HISTORICAL | Accurate for its time; kept as record | 90 |
|
||||||
|
| SUPERSEDED | Replaced -- its header says by what | 26 |
|
||||||
|
| DEAD | An idea or design that was abandoned or never adopted | 12 |
|
||||||
|
| DELETE | Proposed for deletion, awaiting a ruling | 0 |
|
||||||
|
| RECORD | Experiment data and results | 50 |
|
||||||
|
| FORMAL | The press-ready LaTeX tier | 19 |
|
||||||
|
| LEGAL HOLD | Patent-adjacent; not touched without Captain Bob | 57 |
|
||||||
|
|
||||||
## Status Key
|
## .claude
|
||||||
|
|
||||||
| Tag | Meaning |
|
| Path | Title | Status | Notes |
|
||||||
|-----|---------|
|
|---|---|---|---|
|
||||||
| CURRENT | Accurate and up-to-date; reflects present architecture |
|
| .claude/ARTEMIS.md | ARTEMIS.md — Artemis VM Architecture | SUPERSEDED | Frozen 2026-08-15 by ruling (archive as-is); see FABRIC-3.5/3.6. |
|
||||||
| WORKING | Active draft or living document; still being edited |
|
| .claude/CLAUDE.md | CLAUDE.md | CURRENT | Project instructions and status; authoritative. |
|
||||||
| HISTORICAL | Accurate for its time; kept as a record |
|
| .claude/CONSOLE.md | CONSOLE.md — Console VM Architecture (DRAFT) | SUPERSEDED | Frozen 2026-08-15; see FABRIC-3.5/3.6. |
|
||||||
| SUPERSEDED | Replaced by a specific newer document |
|
| .claude/HERMES.md | HERMES.md — Hermes VM Architecture | SUPERSEDED | Frozen 2026-08-15; describes a VM that no longer exists. See FABRIC-3.5/3.6. |
|
||||||
| OBSOLETE | Describes architecture or processes that no longer exist |
|
| .claude/README.md | .claude/ | CURRENT | |
|
||||||
| DELETE | No value (empty, duplicate, pure noise) |
|
| .claude/TRIPOD.md | TRIPOD.md — Architectural Constraints for the Tripod VMs | SUPERSEDED | Frozen 2026-08-15; see FABRIC-3.5/3.6. |
|
||||||
|
|
||||||
---
|
## (root)
|
||||||
|
|
||||||
## Full File Index
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| CHANGELOG.md | Changelog | CURRENT | |
|
||||||
|
| CODE_OF_CONDUCT.md | Contributor Covenant Code of Conduct | CURRENT | |
|
||||||
|
| CONTRIBUTING.md | Contributing to StarForth | CURRENT | |
|
||||||
|
| NOTICE.md | NOTICE.md | CURRENT | |
|
||||||
|
| README.md | LithosAnanke v2.1.0 | CURRENT | |
|
||||||
|
|
||||||
| Path | Topic | Status | Notes |
|
## boards
|
||||||
|------|-------|--------|-------|
|
|
||||||
| ./.claude/CLAUDE.md | Authoritative architecture/status reference | CURRENT | Self-declared authoritative reference; internally consistent (v3.0.3, LithosAnanke v1.0.8, ACL phases 1-6 done/7-8 pending); used as ground truth for this audit. |
|
| Path | Title | Status | Notes |
|
||||||
| ./CODE_OF_CONDUCT.md | Community conduct standards | CURRENT | Standard Contributor Covenant boilerplate, not version/architecture-dependent. |
|
|---|---|---|---|
|
||||||
| ./CONTRIBUTING.md | Contribution guidelines, build/test workflow | WORKING | References "780+ tests" and points to `docs/CLAUDE.md` as project overview, while authoritative CLAUDE.md cites 936+ tests and itself (`.claude/CLAUDE.md`) as authoritative — minor staleness, but actively-useful living doc. |
|
| boards/BRINGUP.md | Board bring-up checklist | WORKING | Bare-metal bring-up checklist and blockers. |
|
||||||
| ./NOTICE.md | License attribution notice | CURRENT | Static legal/attribution text tied to Starship License 1.0, consistent with CLAUDE.md license section. |
|
| boards/README.md | boards/ | CURRENT | |
|
||||||
| ./ONTOLOGY.md | Formal taxonomy/thermodynamic lexicon | CURRENT | Dated 2025-12-13; explicitly referenced as canonical lexicon by CLAUDE.md and README; conceptual framework, not version-dependent. |
|
| boards/milkv/README.md | Milk-V Mars boot media | CURRENT | |
|
||||||
| ./README.md | Project overview/quick start | SUPERSEDED | Cites release tag v1.5.0-RELEASE, "800+ test suite", "21 theory files" vs CLAUDE.md's current v3.0.3, 936+ tests, 24 theory files — predates several version bumps; superseded by `.claude/CLAUDE.md`. |
|
| boards/pc/README.md | PC boot media (generic x86-64, UEFI) | CURRENT | |
|
||||||
| ./ROADMAP.md | VM→Kernel→OS→FPGA phased roadmap | SUPERSEDED | Dated 2025-12-14, describes StarKernel/HAL as not yet begun, but CLAUDE.md shows LithosAnanke v1.0.8 with M0–M6 complete and M7 in progress — overtaken by progress; CLAUDE.md's embedded roadmap summary is now current. |
|
| boards/raspi/README.md | Raspberry Pi 5 native boot media | CURRENT | |
|
||||||
| docs/working/experiments/campaigns/doe_2x7/README.md | 2^7 factorial DoE methodology guide | CURRENT | Reusable how-to-run guide for the DoE experiment class, not tied to one run; matches current 7-loop architecture. |
|
| boards/raspi/config.txt | LithosAnanke native (non-UEFI) boot config for Raspberry Pi 5 (BCM2712). | CURRENT | |
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/SESSION_REPORT_2025-12-10.md | Narrative session report on L8 attractor debugging | HISTORICAL | Dated first-person account of one specific debugging/analysis session; accurate record of its time. |
|
| boards/zynq7020/README.md | Xilinx Zynq-7020 boot media | CURRENT | |
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/results_20251209_145907/analysis_output/report/TIDBITS.md | Informal findings notes from L8 attractor analysis | HISTORICAL | Informal commentary tied to one specific dataset/run (2025-12-09); a snapshot artifact. |
|
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/results_20251209_145907/analysis_output/report/comprehensive_report.md | Statistical report on L8 heartbeat across 180 runs | HISTORICAL | Dated analysis report of one specific experiment run's results. |
|
## capsules
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/results_20251209_145907/analysis_output/report/comprehensive_report.md.pdf | Rendered PDF of comprehensive_report.md | HISTORICAL | Rendered artifact of the same dated run's report; same status as its .md source. |
|
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/results_20251209_145907/analysis_output/report/heartbeat_analysis.md | Heartbeat statistical analysis (ANOVA, workload effects) | HISTORICAL | Dated 2025-12-09, tied to this specific 180-run dataset; a results record. |
|
| Path | Title | Status | Notes |
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/results_20251209_145907/analysis_output/report/mathematical_framework.md | Oscillator-inspired equations fit to heartbeat data | HISTORICAL | Speculative modeling derived from this one dataset's measured frequencies; dated analysis artifact. |
|
|---|---|---|---|
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/results_20251209_145907/analysis_output/report/mathematical_framework.md.pdf | Rendered PDF of mathematical_framework.md | HISTORICAL | Rendered artifact of the same dated analysis. |
|
| capsules/BLOCK_MAP.md | Capsule Block Manifest — Auto-generated | CURRENT | |
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/results_20251209_145907/analysis_output/tables/NOTES.md | Notes accompanying generated data tables | HISTORICAL | Supporting notes for one run's generated tables; tied to that dated results directory. |
|
| capsules/MANIFEST.md | capsules/MANIFEST.md — Block Ownership Registry (justifications) | CURRENT | |
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/results_20251209_145907/analysis_output/tables/anova_results.txt | Raw ANOVA output (tick count/duration vs workload) | HISTORICAL | Raw statistical output specific to the 2025-12-09 run. |
|
| capsules/MANIFEST_AUTO.md | Capsule Block Manifest — Auto-generated | CURRENT | |
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/results_20251209_145907/binary_2cycle_analysis_report.md | Binary 2-cycle clustering analysis of heartbeat phase space | HISTORICAL | Dated (2025-12-11) follow-on analysis of the same 180-run dataset. |
|
| capsules/README.md | capsules/ | CURRENT | |
|
||||||
| docs/working/experiments/campaigns/l8_attractor_map/run_log.txt | Raw execution log of L8 attractor experiment run | HISTORICAL | Raw run transcript referencing a specific results directory; record of one execution session. |
|
| capsules/contrib/README.md | capsules/contrib/ | CURRENT | |
|
||||||
| docs/working/experiments/campaigns/l8_validation/EXPERIMENT_SUMMARY.txt | L8 Jacquard validation experiment design summary | HISTORICAL | Fixed summary of one validation campaign ("IMPLEMENTED: 2025-11-26"), not a reusable guide (README fills that role). |
|
| capsules/fonts/README.md | capsules/fonts/ | CURRENT | |
|
||||||
| docs/working/experiments/campaigns/l8_validation/README.md | L8 Jacquard validation methodology guide | CURRENT | Reusable how-to/experimental-design guide for re-running this class of experiment; matches current L8 Jacquard architecture. |
|
|
||||||
| docs/working/experiments/campaigns/l8_validation/l8_validation_20251208_102205/conditions_randomized.txt | Randomized condition matrix for one validation run | HISTORICAL | Raw generated condition list timestamped 2025-12-08; specific run's input data. |
|
## configs
|
||||||
| docs/working/experiments/campaigns/l8_validation/l8_validation_20251208_102205/conditions_raw.txt | Unrandomized condition matrix for one validation run | HISTORICAL | Companion raw matrix for the same dated run. |
|
|
||||||
| docs/working/experiments/campaigns/l8_validation/l8_validation_30reps_20251126_135128/conditions_randomized.txt | Randomized condition matrix, 30-rep run | HISTORICAL | Dated 2025-11-26 run's input matrix; an earlier run in the same family. |
|
| Path | Title | Status | Notes |
|
||||||
| docs/working/experiments/campaigns/l8_validation/l8_validation_30reps_20251126_135128/conditions_raw.txt | Unrandomized condition matrix, 30-rep run | HISTORICAL | Companion raw matrix for the same 2025-11-26 run. |
|
|---|---|---|---|
|
||||||
| docs/working/experiments/campaigns/shape_validation/README.md | Workload shape validation methodology guide | CURRENT | Reusable quick-start guide for re-running the shape-validation experiment class; architecture-consistent with CLAUDE.md. |
|
| configs/README.md | configs/ | CURRENT | |
|
||||||
| docs/working/experiments/campaigns/shape_validation/shape_RAJ_run_20251127_093208/conditions_randomized.txt | Randomized condition matrix for one shape-validation run | HISTORICAL | Specific dated (2025-11-27) run's randomized input data. |
|
|
||||||
| docs/working/experiments/campaigns/shape_validation/shape_RAJ_run_20251127_093208/conditions_raw.txt | Unrandomized condition matrix for one shape-validation run | HISTORICAL | Companion raw matrix for the same 2025-11-27 run. |
|
## disk
|
||||||
| docs/working/experiments/campaigns/shape_validation/shape_run_20251123_083147/conditions_randomized.txt | Randomized condition matrix, earlier shape-validation run | HISTORICAL | Dated 2025-11-23, earlier run in same family. |
|
|
||||||
| docs/working/experiments/campaigns/shape_validation/shape_run_20251123_083147/conditions_raw.txt | Unrandomized condition matrix, earlier shape-validation run | HISTORICAL | Companion raw matrix for the 2025-11-23 run. |
|
| Path | Title | Status | Notes |
|
||||||
| docs/working/experiments/campaigns/window_scaling/QUICK_START.md | Window-scaling (James Law) experiment quick-start steps | CURRENT | Reusable step-by-step workflow for re-running the experiment; procedural, not tied to a single completed run. |
|
|---|---|---|---|
|
||||||
| docs/working/experiments/campaigns/window_scaling/README.md | Window-scaling experiment design / James Law hypothesis | CURRENT | Reusable experimental-design overview (hypothesis, expected outcomes) for the experiment class. |
|
| disk/README.md | disk/ | CURRENT | |
|
||||||
| docs/working/papers/published/James_Steady-State_Convergence_Adaptive_Runtime.pdf | Published SSRN academic paper | CURRENT | Confirmed present; explicitly named as the published SSRN paper in CLAUDE.md; a citable finished artifact. |
|
|
||||||
| ./scripts/SCRIPT_REPAIR_LOG.md | Bug-fix log for run_ablation_study.sh | HISTORICAL | Documents specific fixes made 2025-11-20 to a script that still exists; valuable as a record but not living guidance. |
|
## docs
|
||||||
| docs/working/papers/ACADEMIC_WORDING_GUIDELINES.md | Academic language rules for physics-metaphor claims | CURRENT | Active style guide for SSRN paper and derivatives; referenced by authors/contributors. |
|
|
||||||
| docs/working/scratch/AGENTS.md | Repo structure and contribution rules for AI/human contributors | CURRENT | Accurate description of build, test, naming, and PR conventions; matches current codebase layout. |
|
| Path | Title | Status | Notes |
|
||||||
| docs/working/scratch/AI_AGENT_MANDATORY_README.md | Mandatory AI-agent pre-read for physics runtime changes | CURRENT | Governance document; rules are evergreen; references live subsystem names. |
|
|---|---|---|---|
|
||||||
| docs/working/papers/ANTI_CLAIMS.md | Explicit boundary statements for SSRN/peer-review defensibility | CURRENT | Directly supports published SSRN paper; no code references that have drifted. |
|
| docs/CLAUDE.md | CLAUDE.md — StarshipOS Documentation Root | CURRENT | Rules for documentation work. |
|
||||||
| ./docs/CLAUDE.md | Docs-root instructions for Claude Code; two-tier doc model plan | WORKING | Describes a `docs/formal/` + `docs/working/` restructure not yet executed; active planning doc, not authoritative state ref (`.claude/CLAUDE.md` is). |
|
| docs/DEAD-AND-REVISED.md | Dead ideas and revised claims | CURRENT | Register of abandoned ideas and revised claims. |
|
||||||
| docs/working/archive/COMPUTATIONAL_PHYSICS_FRAMEWORK.md | Expansive "physics of computation" claims framework | HISTORICAL | Contains strong over-claims ("This is not metaphor") that contradict `ANTI_CLAIMS.md` and `ACADEMIC_WORDING_GUIDELINES.md`; dates from earlier draft thinking (2025-12-10). |
|
| docs/DELETE-CANDIDATES.md | docs/DELETE-CANDIDATES.md | CURRENT | Record of the duplicates deleted 2026-10-14. |
|
||||||
| ./docs/DARPA_SSM_Proposal_James.docx | DARPA SSM grant proposal (Word format) | WORKING | Active proposal document; companion to the PDF version. |
|
| docs/INDEX.md | docs/INDEX.md — every document, and its status | CURRENT | This index. |
|
||||||
| ./docs/DARPA_SSM_Proposal_James.pdf | DARPA SSM grant proposal (PDF) | WORKING | Active funding proposal; filename indicates a working/submission-ready draft. |
|
| docs/README.md | StarForth / LithosAnanke documentation — the map | CURRENT | The map: start here. |
|
||||||
| docs/working/archive/DOCUMENTATION_AUDIT.md | Docs audit from 2025-12-14; gap/inconsistency findings | HISTORICAL | Audit from a past triage pass; most findings have since changed; useful historical record. |
|
| docs/SSM_DARPA_Summary_Slide.pptx | SSM_DARPA_Summary_Slide.pptx | CURRENT | |
|
||||||
| docs/working/papers/EXECUTIVE_SUMMARY.md | Plain-English summary of StarForth results for non-specialists | CURRENT | Accurate, well-calibrated summary with correct metaphor framing; audience: journalists, admins, reviewers. |
|
|
||||||
| docs/working/papers/FINAL_REPORT/appendix_glossary.adoc | AsciiDoc glossary appendix for multi-chapter report | CURRENT | Formal, math-precise definitions consistent with current ontology; intended for book/report compilation. |
|
## docs/book
|
||||||
| docs/working/papers/FORMAL_CLAIM_TABLE.md | Structured claim–evidence–reproducibility table for peer review | CURRENT | Core scientific accountability doc; tied to SSRN paper claims; still valid. |
|
|
||||||
| docs/working/archive/GAP_ANALYSIS.md | Gap analysis: StarForth → StarKernel → StarshipOS → FPGA | SUPERSEDED | Written when StarKernel had "zero implementation"; LithosAnanke v1.0.8 has M0-M6 complete — the kernel gaps section is stale. |
|
| Path | Title | Status | Notes |
|
||||||
| docs/working/papers/NEGATIVE_RESULTS.md | Documented failure modes and limitations | CURRENT | Honest failure-mode catalog; still accurate and academically valuable. |
|
|---|---|---|---|
|
||||||
| docs/working/papers/NULL_HYPOTHESIS.md | Formal null hypothesis and falsification criteria | CURRENT | Rigorous statistical framing for SSRN claims; no stale references. |
|
| docs/book/README.md | docs/book/ | CURRENT | |
|
||||||
| docs/working/papers/ONTOLOGY.md | Master ontology/taxonomy/lexicon for adaptive runtime concepts | CURRENT | Authoritative term definitions; referenced by root ONTOLOGY.md and docs/README.md; actively used. |
|
| docs/book/main.tex | LithosAnanke and StarForth | CURRENT | |
|
||||||
| docs/working/papers/ONTOLOGY_README.md | Index/guide to ontology file set (md, tex, adoc) | CURRENT | Accurate pointer document for ontology artifacts; still valid. |
|
|
||||||
| ./docs/README.md | Top-level docs directory README and navigation | WORKING | Navigation is broadly accurate but mentions HAL migration as "current active work" which is further along now. |
|
## docs/fabric
|
||||||
| docs/working/papers/REPLICATION_INVITE.md | Formal open invitation to independent replication | CURRENT | Evergreen scientific openness statement; expected output values still match claimed results. |
|
|
||||||
| docs/working/papers/REPRODUCIBILITY.md | One-command reproduction protocol with exact expected output | CURRENT | References valid build commands and `--doe` flag; expected output values consistent with published claims. |
|
| Path | Title | Status | Notes |
|
||||||
| docs/working/papers/SCIENTIFIC_DEFENSE_CHECKLIST.md | Checklist of attack vectors and defenses for peer review | WORKING | Many "missing defenses" (GPG signing, Zenodo DOI, R/Python scripts) not yet addressed; still actively relevant. |
|
|---|---|---|---|
|
||||||
| docs/working/papers/SENSITIVITY_ANALYSIS.md | Parameter sweep design: robustness of 0% CV claim | CURRENT | Documents planned sensitivity experiments; scientifically sound framing; supports SSRN defensibility. |
|
| docs/fabric/FABRIC-0.md | FABRIC-0.md — the Stadium | HISTORICAL | Closed design record (the Stadium). |
|
||||||
| ./docs/SSM_DARPA_Complete_Proposal_James_FINAL.docx | DARPA SSM complete/final proposal (Word, FINAL) | WORKING | "FINAL" in name suggests submission-ready; likely supersedes `DARPA_SSM_Proposal_James.docx` but keep both until confirmed. |
|
| docs/fabric/FABRIC-1.md | FABRIC-1.md — the Stadium, continued | HISTORICAL | Closed design record. |
|
||||||
| docs/working/papers/SSRN_companion/Math_Companion_SSRN.pdf | Compiled PDF of math companion to SSRN paper | CURRENT | Rendered output of the `.tex` source; companion to the published SSRN paper. |
|
| docs/fabric/FABRIC-2.md | FABRIC-2.md — the Stadium, continued again | HISTORICAL | Closed design record. |
|
||||||
| docs/working/papers/SSRN_companion/Math_Companion_SSRN.tex | LaTeX source for math companion document | CURRENT | Source of record for comprehensive math/engineering structures reference; cross-references implementation. |
|
| docs/fabric/FABRIC-3.5.md | FABRIC-3.5.md — the Tripod/kernel reshuffle | HISTORICAL | Closed at v2.1.0: the Tripod/kernel reshuffle, design. Authoritative for what it ruled. |
|
||||||
| docs/working/papers/SSRN_companion/figures/fig1_snake_trajectory.pdf | Figure asset: snake/phase trajectory | CURRENT | Figure asset for the SSRN math companion. |
|
| docs/fabric/FABRIC-3.6.md | FABRIC-3.6.md — the Tripod/kernel reshuffle: execution log | HISTORICAL | Closed at v2.1.0: the reshuffle, execution. |
|
||||||
| docs/working/papers/SSRN_companion/figures/fig2_K_vs_window.pdf | Figure asset: K vs window width | CURRENT | Figure asset for the SSRN math companion. |
|
| docs/fabric/FABRIC-3.7.md | FABRIC-3.7.md — Phase 8 PKI: the elevation entrypoint | DEAD | Closed 2026-10-14: elevation ruled not needed and removed (FABRIC-3 XXXVII). |
|
||||||
| docs/working/papers/SSRN_companion/figures/fig3_FFT_spectrum.pdf | Figure asset: FFT spectrum | CURRENT | Figure asset for the SSRN math companion. |
|
| docs/fabric/FABRIC-3.md | FABRIC-3.md — bare metal boot | WORKING | The living record: bare metal boot and everything since. Authoritative. |
|
||||||
| docs/working/papers/SSRN_companion/figures/fig4_golden_ratio_penalties.pdf | Figure asset: golden ratio penalties | CURRENT | Figure asset for the SSRN math companion. |
|
| docs/fabric/FABRIC-4.md | FABRIC-4.md — forward-looking design notes | WORKING | Ideas caught early, not yet scoped. |
|
||||||
| docs/working/papers/SSRN_companion/figures/fig5_bimodal_distributions.pdf | Figure asset: bimodal distributions | CURRENT | Figure asset for the SSRN math companion. |
|
|
||||||
| docs/working/papers/SSRN_companion/figures/fig6_performance_vs_k.pdf | Figure asset: performance vs K | CURRENT | Figure asset for the SSRN math companion. |
|
## docs/formal
|
||||||
| docs/working/papers/SSRN_companion/figures/fig7_performance_by_regime.pdf | Figure asset: performance by regime | CURRENT | Figure asset for the SSRN math companion. |
|
|
||||||
| ./docs/SYSTEM_NARRATIVE.pdf | Compiled PDF of system narrative | CURRENT | Rendered output of `SYSTEM_NARRATIVE.tex`; technical story for patent counsel and reviewers. |
|
| Path | Title | Status | Notes |
|
||||||
| ./docs/SYSTEM_NARRATIVE.tex | LaTeX source: technical narrative for patent/research review | CURRENT | Well-framed, correctly calibrated narrative; accurate description of the adaptive runtime and 90-run experiment. |
|
|---|---|---|---|
|
||||||
| docs/working/scratch/TASK_LIST.md | AI/human task list with working rules and incremental tasks | WORKING | All tasks are unchecked; likely predates recent physics work; rules section is evergreen but specific tasks may be stale or partially done. |
|
| docs/formal/CLAUDE.md | docs/formal/CLAUDE.md — Authoring Conventions for the Formal Documentation Tier | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/archive/artifacts/kanban-workflow/MANIFEST.adoc | Artifact manifest for kanban workflow validation scripts | HISTORICAL | Tracks process-tooling artifacts from a past workflow setup session; no ongoing relevance to VM or kernel. |
|
| docs/formal/README.md | docs/formal/ | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/scratch/assets/README.md | Binary assets holding area README | WORKING | Correctly flags `book-FIXED.docx` etc. as misplaced; the guidance (move to LFS/external) is still actionable. |
|
| docs/formal/common/ | 2 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/scratch/assets/book-FIXED.docx | Book/report Word document | WORKING | Binary asset misplaced in docs/assets; should move to LFS per assets/README.md guidance. |
|
| docs/formal/cookbook/ | 2 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/architecture/heartbeat_csv_export.md | Heartbeat CSV export design: format, columns, TODO status | WORKING | Several columns marked `⚠️ TODO`; matches CLAUDE.md note that `heartbeat_export_csv()` is not yet implemented; active design/tracking doc. |
|
| docs/formal/dev-guide/ | 2 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| ./docs/ontology.pdf | Compiled PDF of `ontology.tex` | CURRENT | Rendered output of `ontology.tex`; self-contained reference for academic inclusion. |
|
| docs/formal/experiments/ | 2 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| ./docs/ontology.tex | LaTeX source for formal ontology | CURRENT | Source of record matching `ONTOLOGY.md` content; used for journal/conference paper inclusion. |
|
| docs/formal/patent/ | 1 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/archive/prog-prove.pdf | Unknown — likely Isabelle/HOL or proof-assistant tutorial PDF | HISTORICAL | Filename suggests a proof-programming reference; not authored by this project; reference material only. |
|
| docs/formal/proofs/ | 2 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/architecture/getting-started/DEVELOPER.md | Dev environment setup, Isabelle install | CURRENT | Generic setup instructions still match current build system. |
|
| docs/formal/scraps/ | 1 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/architecture/getting-started/README.md | Getting-started index/TOC | CURRENT | Navigation page; links resolve to existing files. |
|
| docs/formal/scraps/architecture/ | 49 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/architecture/getting-started/quick-start/factorial-doe.md | Quick-start for 2^6 per-loop factorial DoE | OBSOLETE | Describes retired `ENABLE_LOOP_1..6` compile-time toggles; replaced by L8 Jacquard runtime mode selector. Hardcoded `/home/rajames/...` paths. |
|
| docs/formal/scraps/archive/ | 81 files | SUPERSEDED | Flagged obsolete in its own header. |
|
||||||
| docs/working/architecture/getting-started/quick-start/heartbeat-doe.md | Quick-start for heartbeat DoE run | HISTORICAL | Dated 2025-11-20, references a specific completed run directory and hardcoded user paths. |
|
| docs/formal/scraps/experiments/ | 31 files | HISTORICAL | Flagged in its own header. |
|
||||||
| docs/working/architecture/getting-started/quick-start/optimization-doe.md | Quick-start for 5-opportunity optimization DoE | HISTORICAL | References dated result dirs from a completed tuning campaign; superseded conceptually by L8's data-driven design. |
|
| docs/formal/scraps/hardware/ | 10 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/experiments/02-experiments/L8_WIRING_CODE_REVIEW_GUIDE.md | Code review guide for L8 wiring (L2/L3/L5/L6) | HISTORICAL | Dated 2025-12-05; matches current `physics_metadata.c` — completed, accurate review record. |
|
| docs/formal/scraps/legal/ | 1 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/experiments/02-experiments/L8_WIRING_IMPLEMENTATION_SUMMARY.md | Summary of L8 gating implementation | HISTORICAL | Dated 2025-12-05, marked complete; verified consistent with current source. |
|
| docs/formal/scraps/papers/ | 13 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/experiments/02-experiments/L8_WIRING_PLAN.md | Plan for wiring loops to L8 mode selector | SUPERSEDED | Superseded by L8_WIRING_IMPLEMENTATION_SUMMARY.md and L8_WIRING_CODE_REVIEW_GUIDE.md (plan was executed and reviewed). |
|
| docs/formal/scraps/scratch/ | 23 files | HISTORICAL | Flagged in its own header. |
|
||||||
| docs/working/experiments/02-experiments/README.md | Experiments directory index | CURRENT | Accurately lists existing subdirectories. |
|
| docs/formal/scraps/specifications/ | 1 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/experiments/02-experiments/factorial-doe/guide.md | Full 2^6 factorial DoE guide | OBSOLETE | Describes retired per-loop Makefile-toggle architecture, replaced by L8 Jacquard. |
|
| docs/formal/ssrn/ | 2 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/experiments/02-experiments/factorial-doe/incompatible-configs.md | Handling incompatible factorial loop configs | OBSOLETE | Build-time incompatibility handling for the retired 2^6 toggle experiment. |
|
| docs/formal/user-guide/ | 2 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/experiments/02-experiments/factorial-doe/index.md | Index for factorial DoE docs | OBSOLETE | Points to stale doc paths; describes retired architecture. |
|
| docs/formal/vol1-vm-physics/ | 9 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/experiments/02-experiments/factorial-doe/workflow.md | Factorial DoE data pipeline workflow | HISTORICAL | Documents completed 2025-11-19 factorial campaign that produced data behind current L8 design; toggle architecture retired. |
|
| docs/formal/vol2-kernel/ | 8 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/experiments/02-experiments/heartbeat-doe/corrected-design.md | Heartbeat DoE corrected metric design | SUPERSEDED | Superseded by phase2-corrected.md ("corrected and finalized" version). |
|
| docs/formal/vol3-research/ | 11 files | FORMAL | Press tier; see docs/formal/CLAUDE.md. |
|
||||||
| docs/working/experiments/02-experiments/heartbeat-doe/design.md | Original Phase 2 heartbeat DoE design | SUPERSEDED | Pre-correction draft; superseded by corrected-design.md / phase2-corrected.md. |
|
|
||||||
| docs/working/experiments/02-experiments/heartbeat-doe/execution-guide.md | How to run Phase 2 heartbeat DoE | HISTORICAL | Dated 2025-11-20, hardcoded stale path; describes running the now-superseded design. |
|
## docs/patent
|
||||||
| docs/working/experiments/02-experiments/heartbeat-doe/implementation-summary.md | Deliverables summary for heartbeat DoE | HISTORICAL | Point-in-time "complete" status snapshot dated 2025-11-20 for pre-correction design. |
|
|
||||||
| docs/working/experiments/02-experiments/heartbeat-doe/phase2-corrected.md | Final corrected heartbeat DoE design | WORKING | Latest version in the revision chain; still describes not-yet-fully-implemented work. |
|
| Path | Title | Status | Notes |
|
||||||
| docs/working/experiments/02-experiments/james-law/protocol.md | SSM gravitational-collapse threshold hypothesis/protocol | WORKING | Forward-looking theoretical experiment protocol, no completion markers. |
|
|---|---|---|---|
|
||||||
| docs/working/experiments/02-experiments/physics-optimization/doe-guide.md | Guide for 5-opportunity progressive optimization DoE | CURRENT | Generic script-driven methodology still consistent with current physics engine. |
|
| docs/patent/CHANGES_SUMMARY.md | Patent Application Review and Changes | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/experiments/02-experiments/physics-optimization/execution-guide.md | Guide for 90-run comprehensive physics validation | CURRENT | Underlies the "0% variance across 90 runs" claim in CLAUDE.md. |
|
| docs/patent/JARGON_CHANGES.md | Jargon Removal and Precision Language Changes | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/experiments/02-experiments/physics-optimization/hotwords-cache.md | Hot-words cache experiment results (1.78x speedup) | HISTORICAL | Completed-experiment results report with fixed numbers. |
|
| docs/patent/README_V3.md | StarForth Patent Application Version 3.0 | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/experiments/02-experiments/physics-optimization/proposals.md | 9 proposed future optimization opportunities | WORKING | Living forward-looking proposal doc built on hotwords-cache result. |
|
| docs/patent/USPTO_COVER_LETTER.md | USPTO PROVISIONAL PATENT APPLICATION | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/experiments/02-experiments/physics-optimization/reproduce.md | Reproduction recipe for hotwords-cache result | CURRENT | Narrow, still-valid step-by-step reproduction guide. |
|
| docs/patent/bibliography/bibliography.tex | bibliography.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/OVERVIEW.md | Top-level architecture overview (3-layer model, physics loops, boot sequence) | WORKING | Header says "Status: Complete, 2025-12-14" but roadmap still frames StarKernel as "PLANNED"/HAL migration "IN PROGRESS," lagging CLAUDE.md's actual M0-M6-done/M7-in-progress state; needs a refresh pass. |
|
| docs/patent/figures/fig1_snake_trajectory.pdf | fig1_snake_trajectory.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/README.md | Directory index/landing page for 03-architecture/ | WORKING | Shorter duplicate of OVERVIEW.md's roadmap; same staleness (treats StarKernel as not-yet-started); functions as nav index, content needs sync with CLAUDE.md. |
|
| docs/patent/figures/fig2_K_vs_window.pdf | fig2_K_vs_window.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/adaptive-systems/adaptive-window-and-decay.md | Root-cause investigation: rolling-window shrink + decay_slope placeholder bugs | HISTORICAL | Dated 2025-11-08, "Root Cause Analysis Complete." Diagnostic/incident report; trigger doc for window-inference-redesign.md. |
|
| docs/patent/figures/fig3_FFT_spectrum.pdf | fig3_FFT_spectrum.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/adaptive-systems/loop-5-sketch.md | Alternate Loop #5 proposal: prefetch-accuracy-driven binary-chop window tuning | SUPERSEDED | Superseded by window-inference-redesign.md. Undated draft ending in an open question to the user (never approved); the shipped Loop #5 uses Levene's test, not this mechanism. |
|
| docs/patent/figures/fig4_golden_ratio_penalties.pdf | fig4_golden_ratio_penalties.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/adaptive-systems/multivariate-dynamics.md | Phase 2 DoE experiment design: multivariate stability fingerprinting across 7 metrics | WORKING | Dated 2025-11-20, "Status: Design Phase." Forward-looking proposal tied to still-unimplemented heartbeat instrumentation. |
|
| docs/patent/figures/fig5_bimodal_distributions.pdf | fig5_bimodal_distributions.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/adaptive-systems/window-inference-redesign.md | Redesign of window-width inference using Levene's test on disjoint chunks | CURRENT | Dated 2025-11-19, "DESIGN (approved for implementation)." Matches the Loop #5/#6 mechanism CLAUDE.md/OVERVIEW.md describe as actually implemented (inference_engine.c). |
|
| docs/patent/figures/fig6_performance_vs_k.pdf | fig6_performance_vs_k.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/hal/README.md | Index/reading-order guide for HAL doc set | WORKING | Status table claims all 5 HAL docs "Complete, 2025-12-14," but describes target architecture per overview.md's own disclaimer, not built code; misleading without that caveat. |
|
| docs/patent/figures/fig7_performance_by_regime.pdf | fig7_performance_by_regime.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/hal/interfaces.md | hal_* C interface contract spec (time, interrupt, memory, console, cpu, panic) | WORKING | Normative target API design; current codebase uses sf_time_backend_t-style naming per overview.md — this HAL layer is not yet built as specified. |
|
| docs/patent/final_provisional/cover_letter.txt | cover_letter.txt | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/hal/migration-plan.md | 7-phase plan to migrate codebase to hal_* interfaces | WORKING | Forward plan ("Phase 2 IN PROGRESS" per roadmap); CLAUDE.md's current source tree shows this migration not yet executed. |
|
| docs/patent/final_provisional/sb0015a.pdf | sb0015a.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/hal/overview.md | HAL rationale/design-principles doc | WORKING | Contains the key disclaimer: "current codebase uses sf_time_backend_t... different naming" — explicitly flags the whole HAL doc family as target/aspirational, not current. |
|
| docs/patent/final_provisional/sb0016.pdf | sb0016.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/hal/platform-implementations.md | Example hal_* implementations for Linux and kernel platforms | OBSOLETE | Assumes src/platform/<platform>/hal_*.c layout; actual built StarKernel tree (per CLAUDE.md) uses src/starkernel/{arch,boot,capsule,hal,memory,...} — a different, already-implemented structure. |
|
| docs/patent/final_provisional/ssm_RAJ_v1_patent_application.pdf | ssm_RAJ_v1_patent_application.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/hal/starkernel-integration.md | Kernel HAL integration guide, src/platform/kernel/ layout, milestone roadmap to "ok" prompt | OBSOLETE | Describes Milestone 1 "Boot + Serial Output" as a starting point; LithosAnanke is actually at v1.0.8 with M0-M6 complete, M7 in progress, using a wholly different src/starkernel/ directory structure. |
|
| docs/patent/macros/commands.tex | commands.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/heartbeat-system/architecture.md | Proposes vm_tick() dispatcher centralizing Loop #3/#5 heartbeat logic | HISTORICAL | No date; ends in an open question, never confirmed adopted. Foundational rationale doc; superseded in specifics by instrumentation-plan.md's HeartbeatTickSnapshot design. |
|
| docs/patent/main.pdf | main.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/heartbeat-system/critical-insight.md | Discovery memo: heartbeat tick rate is variable, not fixed; Stage 1 DoE baseline was flawed | HISTORICAL | Dated 2025-11-20, "Game-changer for Phase 2 DoE." Point-in-time investigation memo that directly motivated implementation-plan.md. |
|
| docs/patent/main.tex | main.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/heartbeat-system/implementation-plan.md | Plan for HeartbeatRateSample logging to capture variable tick rate | SUPERSEDED | Superseded by instrumentation-plan.md. Same date (2025-11-20) and goal, but proposes an earlier/different struct (HeartbeatRateSample) than the HeartbeatTickSnapshot design CLAUDE.md cites as the live target. |
|
| docs/patent/sb0015a.pdf | sb0015a.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/heartbeat-system/instrumentation-plan.md | Per-tick instrumentation plan: HeartbeatTickSnapshot, tick_buffer, heartbeat_export_csv() | WORKING | Explicitly the doc CLAUDE.md cites as current ("declared in include/vm.h, but heartbeat_export_csv() is not yet implemented"). Checklist entirely unchecked. |
|
| docs/patent/sb0016.pdf | sb0016.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/heartbeat-system/segfault-analysis.md | Root-cause analysis of heartbeat-thread/main-thread race on RollingWindowOfTruth | HISTORICAL | Dated 2025-11-19, "Identified & Ready for Fix," includes a past-tense commit-message template implying the tuning_lock fix was applied. No current doc mentions this race as open. |
|
| docs/patent/sections/00_claims_validation_v3.tex | 00_claims_validation_v3.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/physics-engine/feedback-loops-analysis.md | Investigative bug-hunt audit of 6 feedback loops (precursor to the 7-loop model) | SUPERSEDED | Superseded by feedback-loops.md. Dated 2025-11-08, full of strikethrough "FIXED" headers; covers only 6 loops, unlike the polished current 7-loop reference. |
|
| docs/patent/sections/00_complete_patent_v3.tex | 00_complete_patent_v3.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/physics-engine/feedback-loops.md | Canonical reference: all 7 feedback loops, tuning knobs, related source files | CURRENT | Matches CLAUDE.md's explicit citation ("all 7 loops detailed") verbatim; clean finished reference table covering Loops #1-7 including #5/#6 inference. |
|
| docs/patent/sections/01_title.tex | 01_title.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/physics-engine/metrics-and-knobs.md | Gap-analysis backlog of metrics not yet collected (stack depth, bucket histograms, etc.) | WORKING | Explicitly self-titled "GAPS ONLY"; prioritized TODO backlog, not a current-state description; some gaps may have since been filled. |
|
| docs/patent/sections/01_title_v2.tex | 01_title_v2.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/physics-engine/monitoring-principles.md | Doctrinal rules for non-perturbative monitoring instrumentation | CURRENT | Presents itself as binding/evergreen ("canonical rules for ALL AI assistants"); uses an older "four core loops (FL1-FL4)" framing that should be reconciled with the current 7-loop model, but the doctrine itself remains in force. |
|
| docs/patent/sections/02_field.tex | 02_field.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/physics-engine/ssm-equations.md | Exploratory mathematical modeling of SSM via physics analogies for patent/DARPA strategy | HISTORICAL | Dated 2025-11-29, self-labeled "Status: Research Analysis - Exploratory." Predates Jacquard naming; speculates generically about future "L8" without Jacquard/attractor-bucket/mode-name vocabulary. |
|
| docs/patent/sections/02_field_v2.tex | 02_field_v2.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/physics-engine/ssm-raw-data-analysis.md | Raw experimental data analysis from a specific Nov 22-27 2025 DoE campaign (51,840 runs) | HISTORICAL | Dated 2025-11-29; tied to specific named CSV files and a calendar-based "Next Steps" plan. Uses "L8" and 4 of 6 Jacquard mode names but never "Jacquard" — an early/transitional naming stage. |
|
| docs/patent/sections/03_background.tex | 03_background.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/physics-engine/steady-state-machine.md | Formal theoretical definition of SSM as a computational model (attractor basins, axioms) | OBSOLETE | Zero mentions of "Jacquard," "L8," "attractor bucket," or the six named modes from CLAUDE.md; reads as a conceptual precursor never reconciled with the concrete ssm_jacquard.c system. |
|
| docs/patent/sections/03_background_v2.tex | 03_background_v2.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/pipelining/context-window-and-binary-chop.md | Context-window infrastructure (Knob #6) + planned binary-chop tuning for Loop #4 | WORKING | Dated 2025-11-06, "Phase 1 Extension Complete," but binary-chop decision logic explicitly a doubling-rule stub with "Phase 2 (Next session)" unchecked; corroborated as still-unutilized by wired-not-utilized.md. |
|
| docs/patent/sections/04_summary.tex | 04_summary.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/pipelining/design.md | Master architectural design for pipelining/speculative execution (Loop #4) | HISTORICAL | No date/status stamp; entirely aspirational ("Goal:", "Hypothesis"); Phase 3+ (actual prefetching/speculation) roadmap items remain unchecked and appear unrealized per wired-not-utilized.md. |
|
| docs/patent/sections/04_summary_v2.tex | 04_summary_v2.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/pipelining/phase-1-instrumentation.md | Completed-checkpoint record of Phase 1 transition-tracking instrumentation | HISTORICAL | Dated 2025-11-06, "Phase 1 Complete," 731 tests passing — accurate closed record of one sub-phase; its Phase 2-4 TODOs were never closed per wired-not-utilized.md. |
|
| docs/patent/sections/05_drawings.tex | 05_drawings.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/pipelining/wired-not-utilized.md | Critical-issue report: pipelining decision/speculation logic defined but never called | WORKING | No date/commit stamp; ends on an unactioned recommendation ("Option A: Disable") with no resolution language. Indicates Loop #4's prediction/speculation half may still be inactive in code. |
|
| docs/patent/sections/06_detailed_description.tex | 06_detailed_description.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/architecture/03-architecture/word-acl/DESIGN.md | Full design spec for word-level ACL system (C fields, ACL.4th, zuse.4th, two-console model) | CURRENT | Explicitly the doc CLAUDE.md designates authoritative; internal 8-phase punch list (Phases 1-6 done, 7-8 remaining) matches CLAUDE.md's summary exactly. |
|
| docs/patent/sections/06_detailed_description_v2.tex | 06_detailed_description_v2.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/README.md | Quality directory index | OBSOLETE | States "18 modules"; current is 22 categories/936+ tests per CLAUDE.md. |
|
| docs/patent/sections/07_embodiments.tex | 07_embodiments.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/audits/codebase-audit-report.md | Full codebase audit | HISTORICAL | Dated 2025-12-03; point-in-time snapshot, paired with corrective-actions.md. |
|
| docs/patent/sections/08_claims.tex | 08_claims.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/audits/corrective-actions.md | Resolution log for codebase audit | HISTORICAL | Dated 2025-12-03, v3.0.1, "COMPLETE" — 21/22 issues resolved; companion to codebase-audit-report.md. |
|
| docs/patent/sections/08_claims_REAL.tex | 08_claims_REAL.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/audits/implementation-audit.md | Adaptive tuning implementation audit | HISTORICAL | Dated 2025-11-19, references 787/840 tests (now 936+); overtaken by later OPP reports. |
|
| docs/patent/sections/08_claims_v2.tex | 08_claims_v2.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/audits/section-2-audit.md | Physics subsystem safety audit (full) | HISTORICAL | Dated 2025-11-20; paired with section-2-executive-summary.md. |
|
| docs/patent/sections/09_validation.tex | 09_validation.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/audits/section-2-executive-summary.md | Physics safety audit executive summary | HISTORICAL | Dated 2025-11-20, "complete - awaiting final approval"; summary counterpart to section-2-audit.md. |
|
| docs/patent/sections/09_validation_v2.tex | 09_validation_v2.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/phase-tracking/phase-2-implementation-checklist.md | Checklist for heartbeat instrumentation (tick_buffer/snapshot) | WORKING | CLAUDE.md confirms struct exists but heartbeat_export_csv() still not implemented — open, unrealized plan. |
|
| docs/patent/sections/10_implementation.tex | 10_implementation.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/phase-tracking/phase-2-issues-identified.md | Float/double violations root-cause list in physics code | HISTORICAL | Dated 2025-11-08, "in progress" at the time; precedes implementation-checklist. |
|
| docs/patent/sections/11_abstract.tex | 11_abstract.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/phase-tracking/phase-2a-session-summary.md | Session summary: WORD_FROZEN flag + linear decay | HISTORICAL | Dated 2025-11-07, "complete & validated"; distinct earlier "Phase 2a" thread. |
|
| docs/patent/sections/11_abstract_REAL.tex | 11_abstract_REAL.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/regression/detection-framework.md | Regression detection framework design (for OPP #2+) | HISTORICAL | Dated 2025-11-19, design doc later used in opp-02-report.md. |
|
| docs/patent/sections/11_abstract_v2.tex | 11_abstract_v2.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/regression/opp-02-report.md | OPP #2 window-width tuning experiment report | HISTORICAL | Dated 2025-11-19, "complete"; recommends a config for OPP #3 — completed dated report. |
|
| docs/patent/sections/11_appendix.tex | 11_appendix.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/validation/break-me-report.md | Adversarial/fuzz testing report (intended) | DELETE | File is empty (0 bytes); never written despite break_me_tests.c existing. |
|
| docs/patent/sections/12_appendix.tex | 12_appendix.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/validation/comprehensive-physics-validation.md | Triple-blind 90-run DoE physics validation protocol | HISTORICAL | Dated 2025-11-06; source protocol behind the "0% variance across 90 runs" figure cited in CLAUDE.md. |
|
| docs/patent/sections/RAJ_v1_01_background.tex | RAJ_v1_01_background.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/validation/phase-1-protocol.md | GitHub governance/document-routing validation protocol | OBSOLETE | Dated 2025-11-03; describes a governance/vault repo system absent from current architecture, unrelated to physics DoE. |
|
| docs/patent/sections/RAJ_v1_02_summary.tex | RAJ_v1_02_summary.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/quality/validation/phase-2-executive-summary.md | DoE paradigm shift: factorial to multivariate dynamics (750-run plan) | HISTORICAL | Dated 2025-11-20, "design complete, ready for implementation." |
|
| docs/patent/sections/RAJ_v1_03_drawings.tex | RAJ_v1_03_drawings.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/operations/README.md | Ops directory index / build & CI overview | CURRENT | Build/test commands match current Makefile; honestly labels CI/CD section "(Future)". |
|
| docs/patent/sections/RAJ_v1_04_detailed_description.tex | RAJ_v1_04_detailed_description.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/operations/backlog-gatekeeper.md | Backlog governance (ECO/CAPA gatekeeper) | OBSOLETE | References a `.github/workflows/...` file that doesn't exist; no `.github/` directory in repo at all. |
|
| docs/patent/sections/RAJ_v1_05_claims.tex | RAJ_v1_05_claims.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/operations/jenkins-pipeline-guide.adoc | Jenkins CI pipeline architecture | OBSOLETE | No Jenkinsfile or CI config exists anywhere in the repo. |
|
| docs/patent/sections/RAJ_v1_06_abstract.tex | RAJ_v1_06_abstract.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/operations/qa-intake-workflow.adoc | QA defect intake / CAPA process | OBSOLETE | Cites stale version v2.0.2 (current v3.0.3); references nonexistent GitHub issue templates and Jenkins automation. |
|
| docs/patent/sections/architecture_diagram_clean.tex | architecture_diagram_clean.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/operations/refinement/annotations.adoc | C/Isabelle refinement annotation guide | WORKING | "Phase 1 in-progress" header; active methodology guide for ongoing refinement work. |
|
| docs/patent/ssm_RAJ_v1_patent_application.pdf | ssm_RAJ_v1_patent_application.pdf | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/operations/refinement/capa.adoc | C/Isabelle refinement defect tracking log | WORKING | All phases "not started," currently empty live tracking doc. |
|
| docs/patent/ssm_RAJ_v1_patent_application.tex | ssm_RAJ_v1_patent_application.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/operations/refinement/roadmap.adoc | C/Isabelle refinement roadmap | WORKING | All key functions listed "OPEN"; active planning doc with 6-8 month estimate. |
|
| docs/patent/ssm_provisional_patent.tex | ssm_provisional_patent.tex | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
| docs/working/archive/operations/workflow.md | CI/CD trunk-based branch workflow (devl/test/qual/prod) | OBSOLETE | Describes branches/Jenkins triggers that don't exist; repo only has master and feature branches. |
|
|
||||||
| docs/working/archive/research/README.md | Research directory index | SUPERSEDED | References a patent-filing placeholder/submission package now superseded by the published SSRN paper. |
|
## docs/pptx
|
||||||
| docs/working/archive/research/doe-metrics-schema.md | DoE CSV metrics schema (35 columns) | HISTORICAL | Dated 2025-11-19, predates the 2025-12-08 CSV-export suppression noted in CLAUDE.md. |
|
|
||||||
| docs/working/archive/research/literature-review.md | Literature positioning for the optimization paper | SUPERSEDED | Draft feeder material for the now-published SSRN paper. |
|
| Path | Title | Status | Notes |
|
||||||
| docs/working/archive/research/research-outline.md | Paper outline draft ("working title" + alternatives) | SUPERSEDED | Pre-publication draft outline; paper has since been published. |
|
|---|---|---|---|
|
||||||
| docs/working/archive/research/results-for-publication.md | Draft abstract targeting PLDI/ASPLOS | SUPERSEDED | Draft abstracts for venues other than where it was ultimately published (SSRN). |
|
| docs/pptx/01-technical-elevator-pitch.pptx | 01-technical-elevator-pitch.pptx | CURRENT | |
|
||||||
| docs/working/archive/session-logs/2025-11-20-recap.md | Dated session recap (DoE multivariate dynamics pivot) | HISTORICAL | Explicitly dated point-in-time design discussion record. |
|
| docs/pptx/02-nontechnical-elevator-pitch.pptx | 02-nontechnical-elevator-pitch.pptx | CURRENT | |
|
||||||
| docs/working/archive/session-logs/2025-11-26-worklog.md | Dated work log (L8 Jacquard integration) | HISTORICAL | Explicitly dated; documents the l8-final-integration milestone. |
|
| docs/pptx/03-academic-overview.pptx | 03-academic-overview.pptx | CURRENT | |
|
||||||
| docs/working/archive/session-logs/README.md | Session-logs directory index | CURRENT | Accurately describes folder purpose; explicitly warns logs may be outdated. |
|
| docs/pptx/04-phd-deep-dive.pptx | 04-phd-deep-dive.pptx | CURRENT | |
|
||||||
| docs/working/archive/session-logs/experimental-addendum.md | Mislabeled: actually a "StarForth to StarshipOS Hybrid Kernel Transformation Plan" | OBSOLETE | Early kernel design plan superseded by the actually-implemented LithosAnanke v1.0.8 architecture (M0-M7). |
|
| docs/pptx/README.md | docs/pptx/ | CURRENT | |
|
||||||
| docs/working/archive/session-logs/experimental-iteration-usage.md | Usage guide for run_doe.sh / run_experimental_iteration.sh | WORKING | Matching scripts still exist in scripts/; living usage guide, not a dated log. |
|
|
||||||
| docs/working/archive/session-logs/serialized-questing-pike.md | Informal narrative on physics-analogy overclaiming risk | HISTORICAL | Captured point-in-time exploratory discussion, not a guide. |
|
## docs/reference
|
||||||
| ./docs/patent/CHANGES_SUMMARY.md | Patent revision log (title, James Law language, claim changes) dated 2025-12-10 | HISTORICAL | Records decisions made during v2 revisions; accurate for its time but describes edits already applied — not a live working document. |
|
|
||||||
| ./docs/patent/JARGON_CHANGES.md | Term-replacement log (e.g. "Execution Heat" → "Execution Frequency Counters") dated 2025-12-10 | HISTORICAL | Records terminology decisions already baked into _v2 section files; useful audit trail but not a living document. |
|
| Path | Title | Status | Notes |
|
||||||
| ./docs/patent/Makefile | LaTeX build rules for `main.tex` | CURRENT | Minimal but functional; drives `pdflatex main.tex` double-pass build. |
|
|---|---|---|---|
|
||||||
| ./docs/patent/README_V3.md | Overview claiming `patent_v3_complete.tex` is the master document | OBSOLETE | Describes a master file (`patent_v3_complete.tex`) that does not exist; structure does not match the actual `main.tex`-based layout. |
|
| docs/reference/DICTIONARY.md | LithosAnanke / StarForth — Word Dictionary Reference | CURRENT | |
|
||||||
| ./docs/patent/USPTO_COVER_LETTER.md | Draft USPTO provisional cover letter with placeholder contact fields | WORKING | Contact fields (`[Your email]`, `[Your phone]`) still blank; needs completion before filing. |
|
| docs/reference/L8_ADAPTIVE_CONFIG_TABLE.md | L8 Jacquard: Adaptive 128-Config Heat-Ranked Selector | CURRENT | |
|
||||||
| ./docs/patent/main.tex | Master LaTeX patent document; inputs _v2 section files | CURRENT | This is the live build root; actual `\input` order confirmed. |
|
| docs/reference/M7.1.md | M7.1: Init Capsule Architecture | CURRENT | |
|
||||||
| ./docs/patent/sb0015a.pdf | USPTO form SB0015a (Provisional Application cover sheet) | CURRENT | Byte-identical to `final_provisional/sb0015a.pdf` (205016 bytes both); root copy is authoritative working copy. |
|
| docs/reference/ONTOLOGY.md | StarForth Ontology, Taxonomy, and Lexicon | CURRENT | |
|
||||||
| ./docs/patent/sb0016.pdf | USPTO form SB0016 (fee transmittal or declaration) | WORKING | Differs from `final_provisional/sb0016.pdf` (557654 vs 577171 bytes); root copy is smaller — likely a prior draft; the larger `final_provisional/` copy appears to be the filed version. |
|
| docs/reference/ROADMAP.md | LithosAnanke Roadmap | CURRENT | Roadmap and the ratified release-versioning policy. |
|
||||||
| ./docs/patent/ssm_RAJ_v1_patent_application.pdf | Compiled patent application PDF | CURRENT | Byte-identical to `final_provisional/ssm_RAJ_v1_patent_application.pdf` (1735085 bytes both); root copy is authoritative working copy. |
|
| docs/reference/STARFORTH_PRIMITIVES.md | StarForth Primitive Word Reference | CURRENT | |
|
||||||
| ./docs/patent/ssm_provisional_patent.tex | Standalone monolithic provisional patent LaTeX document | SUPERSEDED | Self-contained single-file precursor; superseded by the modular `main.tex` + sections/ architecture. |
|
| docs/reference/hosted-acceptance-test/README.md | Hosted StarForth — 3-Architecture Acceptance Test | CURRENT | |
|
||||||
| ./docs/patent/sections/01_title_inventors.tex | Section file — title/inventors | OBSOLETE | Does not exist on disk; name never appears in any `\input` in main.tex. |
|
| docs/reference/kernel-args/DESIGN.md | Kernel Command-Line Arguments (KernelArgs) | CURRENT | |
|
||||||
| ./docs/patent/sections/02_cross_reference.tex | Section file — cross-references | OBSOLETE | Does not exist on disk; the 02_* slot in main.tex is `02_field_v2`, not a cross-reference section. |
|
| docs/reference/kernel-args/README.md | docs/reference/kernel-args/ | CURRENT | |
|
||||||
| ./docs/patent/sections/02_cross_reference_v2.tex | Section file — cross-references v2 | OBSOLETE | Does not exist on disk; main.tex uses `02_field_v2`, not a cross-reference section. |
|
| docs/reference/word-acl/DESIGN.md | Word-Level ACL System | CURRENT | |
|
||||||
| ./docs/patent/sections/03_background.tex | Background of the Invention — original draft | SUPERSEDED | Exists on disk; superseded by `03_background_v2.tex` which main.tex actually inputs. |
|
| docs/reference/word-acl/README.md | docs/reference/word-acl/ | CURRENT | |
|
||||||
| ./docs/patent/sections/03_background_v2.tex | Background of the Invention — revised | CURRENT | Inputted by main.tex. |
|
|
||||||
| ./docs/patent/sections/04_summary.tex | Summary of the Invention — original draft | SUPERSEDED | Exists on disk; superseded by `04_summary_v2.tex` which main.tex actually inputs. |
|
## docs/v4.0.0
|
||||||
| ./docs/patent/sections/04_summary_v2.tex | Summary of the Invention — revised | CURRENT | Inputted by main.tex. |
|
|
||||||
| ./docs/patent/sections/05_brief_description.tex | Brief Description of Drawings — original | OBSOLETE | Does not exist on disk; the 05_* slot in main.tex is `05_drawings`. |
|
| Path | Title | Status | Notes |
|
||||||
| ./docs/patent/sections/05_brief_description_v2.tex | Brief Description of Drawings — v2 | OBSOLETE | Does not exist on disk; main.tex uses `05_drawings`, not this name. |
|
|---|---|---|---|
|
||||||
| ./docs/patent/sections/06_detailed_description.tex | Detailed Description — original draft | SUPERSEDED | Exists on disk; superseded by `06_detailed_description_v2.tex` which main.tex actually inputs. |
|
| docs/v4.0.0/DECOMPOSITION.md | StarForth v4.0.0 — Primitive Decomposition | CURRENT | |
|
||||||
| ./docs/patent/sections/06_detailed_description_v2.tex | Detailed Description — revised | CURRENT | Inputted by main.tex. |
|
| docs/v4.0.0/ENGINE.md | StarForth v4.0.0 — The F18 engine in the VM's place | CURRENT | |
|
||||||
| ./docs/patent/sections/07_claims.tex | Claims section — original | OBSOLETE | Does not exist on disk; the 07_* slot in main.tex is `07_embodiments`, not claims. |
|
| docs/v4.0.0/JUSTIFICATION.md | StarForth v4.0.0 — Justification | CURRENT | |
|
||||||
| ./docs/patent/sections/07_claims_v2.tex | Claims section — v2 | OBSOLETE | Does not exist on disk; main.tex uses `07_embodiments` and `08_claims_v2` for claims. |
|
| docs/v4.0.0/MESH.md | StarForth v4.0.0 — Talking nodes | CURRENT | |
|
||||||
| ./docs/patent/sections/08_abstract.tex | Abstract section | OBSOLETE | Does not exist on disk; main.tex uses `11_abstract_v2` for the abstract. |
|
| docs/v4.0.0/NUCLEUS.md | StarForth v4.0.0 — Nucleus, FORTH-79 Capsule and POST | CURRENT | |
|
||||||
| ./docs/patent/sections/RAJ_v1_01_title_inventors.tex | RAJ v1 title/inventors section | OBSOLETE | Does not exist on disk; entire RAJ_v1_* naming scheme not referenced in main.tex. |
|
| docs/v4.0.0/POST79.md | POST for the FORTH-79 Required Word Set: where it departs from v3 | CURRENT | |
|
||||||
| ./docs/patent/sections/RAJ_v1_02_cross_reference.tex | RAJ v1 cross-reference section | OBSOLETE | Does not exist on disk. |
|
| docs/v4.0.0/V3-PARITY.md | StarForth v4.0.0 — Parity with v3 up to the first prompt | CURRENT | |
|
||||||
| ./docs/patent/sections/RAJ_v1_03_background.tex | RAJ v1 background section | OBSOLETE | Does not exist on disk. |
|
| docs/v4.0.0/plans/2026-10-06-step6-storage.md | Step 6: Storage Implementation Plan (revised 2026-10-07) | HISTORICAL | An executed step plan. |
|
||||||
| ./docs/patent/sections/RAJ_v1_04_summary.tex | RAJ v1 summary section | OBSOLETE | Does not exist on disk. |
|
| docs/v4.0.0/plans/2026-10-07-step6b-post.md | Step 6b: POST Is the Kernel's — Implementation Plan | HISTORICAL | An executed step plan. |
|
||||||
| ./docs/patent/sections/RAJ_v1_05_brief_description.tex | RAJ v1 brief description section | OBSOLETE | Does not exist on disk. |
|
| docs/v4.0.0/plans/2026-10-07-step6c-refusals-and-waits.md | Step 6c: Refusals and Waits — Implementation Plan | HISTORICAL | An executed step plan. |
|
||||||
| ./docs/patent/sections/RAJ_v1_06_detailed_description.tex | RAJ v1 detailed description section | OBSOLETE | Does not exist on disk. |
|
| docs/v4.0.0/plans/2026-10-07-step6d-the-wait.md | Step 6d: The Wait — Implementation Plan | HISTORICAL | An executed step plan. |
|
||||||
| ./docs/patent/final_provisional/README.md | README for the final_provisional/ subdirectory | OBSOLETE | Does not exist on disk. |
|
| docs/v4.0.0/plans/2026-10-08-step6e-messages-on-the-wire.md | Step 6e: Messages on the Wire — Implementation Plan | HISTORICAL | An executed step plan. |
|
||||||
| ./docs/patent/final_provisional/sb0015a.pdf | USPTO form SB0015a — filed copy | SUPERSEDED | Byte-identical to root `sb0015a.pdf` (205016 bytes); root copy is the working canonical version. |
|
|
||||||
| ./docs/patent/final_provisional/sb0016.pdf | USPTO form SB0016 — filed copy | CURRENT | Differs from root `sb0016.pdf` (577171 vs 557654 bytes); this larger copy is the filed/submitted version and is the more complete document. |
|
## docs/working
|
||||||
| ./docs/patent/final_provisional/ssm_RAJ_v1_patent_application.pdf | Compiled patent application PDF — filed copy | SUPERSEDED | Byte-identical to root `ssm_RAJ_v1_patent_application.pdf` (1735085 bytes); root copy is the working canonical version. |
|
|
||||||
| docs/working/scratch/src/INTEGRATION_NOTES.adoc | StarForth↔StarshipOS sync scripts (integrator.sh) | HISTORICAL | Describes ad-hoc integrator.sh scripts and one-day debugging session; superseded by formal capsule/build pipeline in current CLAUDE.md. Worth keeping as record of integration approach. |
|
| Path | Title | Status | Notes |
|
||||||
| docs/working/scratch/src/L4RE_INTEGRATION_TODO.adoc | L4Re integration checklist, hardcoded local paths | OBSOLETE | References absolute local dev paths (`/home/rajames/CLionProjects/...`) and a TODO checklist for copying platform files; current architecture has moved on. |
|
|---|---|---|---|
|
||||||
| docs/working/scratch/src-index.adoc | docs/src documentation index | WORKING | Active index/TOC for the docs/src tree, but contains multiple dead links (ABI.adoc, BLOCK_STORAGE_GUIDE.adoc, WORD_DEVELOPMENT.adoc, TESTING.adoc, BREAK_ME_REPORT.adoc, GAP_ANALYSIS.adoc) — needs pruning/repair. |
|
| docs/working/README.md | docs/working/ — Living Documentation | WORKING | |
|
||||||
| docs/working/architecture/architecture-internals/INIT_SYSTEM.adoc | INIT system / conf/init.4th boot mechanism | CURRENT | Describes init.4th, INIT word, dictionary fence — matches current capsule/init architecture described in CLAUDE.md. |
|
| docs/working/architecture/03-architecture/OVERVIEW.md | StarForth Architecture Overview | WORKING | |
|
||||||
| docs/working/architecture/architecture-internals/MESSAGING.adoc | Thermodynamic "Message Field" model for StarshipOS IPC | WORKING | Forward-looking design doc for a not-yet-implemented StarshipOS messaging subsystem; consistent with physics/thermodynamic metaphor language. |
|
| docs/working/architecture/03-architecture/README.md | Architecture | WORKING | |
|
||||||
| docs/working/scratch/src/bug_report.adoc | GitHub issue template (bug report) converted to AsciiDoc | DELETE | Generic GitHub bug-report template with smartphone/browser/OS fields irrelevant to a CLI FORTH VM; auto-converted from `.github/ISSUE_TEMPLATE`; no project-specific value. |
|
| docs/working/architecture/03-architecture/adaptive-systems/adaptive-window-and-decay.md | Adaptive Window Shrinking & Decay Slope Investigation | WORKING | |
|
||||||
| docs/working/architecture/build-and-tooling/BUILD_OPTIONS.adoc | Build-time flags/defines reference | CURRENT | Cross-checked flag names against Makefile; consistent catalog of build options, actively useful reference. |
|
| docs/working/architecture/03-architecture/adaptive-systems/multivariate-dynamics.md | StarForth Multivariate Coupled Dynamics Experiment | WORKING | |
|
||||||
| docs/working/architecture/build-and-tooling/DOCUMENTATION_README.adoc | How docs/API docs are generated (make docs, Doxygen→AsciiDoc) | CURRENT | Describes `docs/src/appendix/` generation via `scripts/generate-doxygen-appendix.sh`, directly wired into Makefile. |
|
| docs/working/architecture/03-architecture/adaptive-systems/window-inference-redesign.md | Window Width Inference Redesign - Statistically Valid Approach | WORKING | |
|
||||||
| docs/working/architecture/build-and-tooling/INIT_TOOLS.adoc | tools/extract-init and init.4th↔disk image sync tooling | WORKING | Describes `tools/extract-init`; tool binary not confirmed in current `tools/` directory — may have been renamed; treat as living doc needing verification. |
|
| docs/working/architecture/03-architecture/heartbeat-system/architecture.md | VM Heartbeat Architecture: Centralized Time-Based Tuning | WORKING | |
|
||||||
| docs/working/hardware/PGO_GUIDE.adoc | Profile-Guided Optimization guide | WORKING | Content matches current Makefile `pgo`/`pgo-build`/`pgo-perf`/`pgo-valgrind` targets exactly, but the document's own title line literally reads "QUARANTiNE ME MOTHERFUCKER" — self-flagged for review before being trusted as polished. |
|
| docs/working/architecture/03-architecture/heartbeat-system/critical-insight.md | CRITICAL INSIGHT: Heartbeat Rate is Variable, Not Fixed | WORKING | |
|
||||||
| docs/working/hardware/PLATFORM_BUILD_GUIDE.adoc | Cross-compilation / platform build matrix (POSIX, L4Re) | CURRENT | Matches Makefile `L4RE=1` flag and platform/time_posix.c, platform/time_l4re.c files in src/platform/. |
|
| docs/working/architecture/03-architecture/heartbeat-system/instrumentation-plan.md | Heartbeat Per-Tick Instrumentation Plan | WORKING | |
|
||||||
| docs/working/scratch/ci-cd/FMEA_BLOCKING_GATES.adoc | FMEA gating for CAPA/ECR/ECO governance workflow | CURRENT | Dated 2025-11-03, describes active GitHub Workflows + pending Jenkins governance gate; consistent with other governance docs. |
|
| docs/working/architecture/03-architecture/heartbeat-system/segfault-analysis.md | Heartbeat Segfault Root Cause Analysis & Repair | WORKING | |
|
||||||
| docs/working/scratch/ci-cd/GITHUB_ISSUES_GOVERNANCE_FLOW.adoc | Relationship between GitHub Issues and governance in_basket | CURRENT | Same governance doc set, dated 2025-11-03, internally consistent. |
|
| docs/working/architecture/03-architecture/physics-engine/feedback-loops.md | StarForth Physics Feedback Loops | WORKING | The seven feedback loops. |
|
||||||
| docs/working/scratch/ci-cd/GOVERNANCE_INPUT_AUDIT.adoc | Audit/compliance checklist for governance input routing | CURRENT | Dated 2025-11-03, "COMPLIANT" audit result; part of active governance documentation set. |
|
| docs/working/architecture/03-architecture/physics-engine/monitoring-principles.md | StarForth Physics Runtime | WORKING | |
|
||||||
| docs/working/scratch/ci-cd/JENKINS_GOVERNANCE_INTEGRATION.adoc | Jenkins pipeline → governance in_basket integration spec | CURRENT | Same active governance doc set, dated 2025-11-03. |
|
| docs/working/architecture/03-architecture/physics-engine/ssm-equations.md | Mathematical Analysis of the Steady-State Machine | WORKING | |
|
||||||
| docs/working/scratch/src/development/AGENTS.adoc | Repository guidelines / coding conventions | DELETE | Duplicate of docs/working/scratch/AGENTS.md (the live version); older AsciiDoc precursor with stale binary path (`./build/starforth`). Archived in docs/trash/duplicates-pass4.tar.gz. |
|
| docs/working/architecture/03-architecture/physics-engine/ssm-raw-data-analysis.md | Steady-State Machine (SSM): Raw Experimental Data Analysis | WORKING | |
|
||||||
| docs/working/scratch/src/development/CONTRIBUTING.adoc | Generic contribution guide for "StarshipOS" | OBSOLETE | Boilerplate/templated contribution guide (placeholder `coc-contact@example.org`, generic Conventional Commits advice) not tailored to actual StarForth workflow or governance process; contradicts more specific and current ci-cd governance docs. |
|
| docs/working/architecture/03-architecture/pipelining/context-window-and-binary-chop.md | Phase 1 Extension: Context Window & Phase 2 Binary Chop Tuning | WORKING | |
|
||||||
| docs/working/architecture/doxygen/DOXYGEN_QUICK_REFERENCE.adoc | Doxygen comment cheat-sheet | CURRENT | Matches `make docs`/`make docs-html` targets and Doxygen pipeline; straightforward reference card still applicable. |
|
| docs/working/architecture/03-architecture/pipelining/design.md | FORTH VM Pipelining & Speculative Execution Design | WORKING | |
|
||||||
| docs/working/architecture/doxygen/DOXYGEN_STYLE_GUIDE.adoc | Doxygen documentation style guide | CURRENT | Companion to quick-reference; consistent with active Doxygen→AsciiDoc/HTML/PDF pipeline. |
|
| docs/working/architecture/03-architecture/pipelining/phase-1-instrumentation.md | Phase 1: Pipelining Instrumentation | WORKING | |
|
||||||
| docs/working/scratch/src/feature_request.adoc | GitHub issue template (feature request) converted to AsciiDoc | DELETE | Generic GitHub feature-request template, garbled by adoc conversion; no project-specific content. |
|
| docs/working/architecture/03-architecture/pipelining/wired-not-utilized.md | Pipelining Feedback Loop: WIRED BUT NOT UTILIZED (Critical Issue) | WORKING | |
|
||||||
| docs/working/architecture/getting-started/INSTALL.adoc | Installation guide (prerequisites, build/install) | WORKING | References `./build/starforth` run path rather than current `./build/amd64/<profile>/starforth` convention; otherwise generally accurate. |
|
| docs/working/architecture/ARTEMIS-BAM-ACCEPTANCE-20260703.md | Artemis BAM — Phase 1 Acceptance Report | WORKING | |
|
||||||
| docs/working/architecture/getting-started/QUICKSTART.adoc | Quick-start build/run guide | WORKING | Same stale-path issue (`./build/starforth` instead of `./build/amd64/standard/starforth`); otherwise build command list matches current Makefile targets. |
|
| docs/working/architecture/ARTEMIS-BLOCK-PHYSICS-DESIGN-20260708.md | Artemis Block Heat Physics — Design Doc | WORKING | |
|
||||||
| docs/working/scratch/governance/index.adoc | Pointer/redirect to external StarForth-Governance repo | CURRENT | Tiny stub file that redirects to the external governance repository README; still valid as a redirect. |
|
| docs/working/architecture/ARTEMIS-FREEMAP-CAPSULE-RESERVATION-GAP-20260710.md | Artemis Free-Map Doesn't Reserve Capsule-Claimed Blocks | WORKING | |
|
||||||
| docs/working/scratch/COMMUNICATION_GUIDE.adoc | "Analogy cheat sheet" for explaining physics-driven OS concept to various audiences | WORKING | Internal communications/marketing aid; not tied to specific code, ages well, still usable living document. |
|
| docs/working/architecture/CAPSULE-BLOCK-PERSISTENCE-BOUNDARY-FINDING-20260709.md | Capsule Loader — Missing Persistence Boundary Check | WORKING | |
|
||||||
| docs/working/scratch/GOVERNANCE_EXPORT_NOTES.adoc | Checklist of Phase 1 physics artifacts to mirror into governance repo | WORKING | Dated 2025-10-23; references HOLA_PROTOCOL.adoc and formal/Physics_*.thy files which still exist — consistent and current as an internal checklist. |
|
| docs/working/architecture/CAPSULE-LOADER-DEFINITIONS-ONLY-DESIGN-20260709.md | Capsules Load Definitions Only — Design Doc | WORKING | |
|
||||||
| docs/working/specifications/HOLA_PROTOCOL.adoc | HOLA shared-memory analytics protocol spec | CURRENT | Cross-checked against `include/physics_runtime.h`: HOLA_SHARED_MAGIC, HOLA_PROTOCOL_MAJOR/MINOR, and the analytics header struct all exist verbatim in current source — accurate technical reference. |
|
| docs/working/architecture/DOE-LIBRARY-HOWTO-20260819.md | DoE Library HOWTO — `capsules/doe.4th` | CURRENT | HOWTO for capsules/doe.4th. |
|
||||||
| docs/working/architecture/MAMA_FORTH_SUPERVISOR_ARCHITECTURE.adoc | Multi-VM supervisor architecture ("Mama Forth") | WORKING | Concept is alive in current code — `src/starkernel/capsule/mama_forth_words.c` exists and capsule birth protocol (MAMA_INIT capsule type) matches CLAUDE.md; this doc appears to be the design precursor to the now-partially-implemented capsule system. |
|
| docs/working/architecture/K-PUSH-DICTIONARY-SHADOWING-BUG-20260704.md | K-PUSH Dictionary Shadowing Bug — Full Report | WORKING | |
|
||||||
| docs/working/scratch/src/internal/PHASE_2A_COMPLETION_REPORT.adoc | Completion report: Freeze flag + linear decay (Phase 2a) | HISTORICAL | Accurate closed record dated 2025-11-07; feature is shipped and stable — downgraded from CURRENT as a completion record, not a living doc. |
|
| docs/working/architecture/MAMA_FORTH_SUPERVISOR_ARCHITECTURE.adoc | Mama Forth: Multi-VM Supervisor Architecture | WORKING | |
|
||||||
| docs/working/scratch/src/internal/PHASE_2_IMPLEMENTATION_SUMMARY.adoc | Phase 2 action-item summary pointing to design + completion docs | HISTORICAL | Companion index to PHASE_2A_COMPLETION_REPORT; both docs describe a completed, closed phase — downgraded from CURRENT. |
|
| docs/working/architecture/PHYSICS_CONE_OF_INFLUENCE_DESIGN.adoc | Physics Engine: Cone of Influence Design | WORKING | |
|
||||||
| docs/working/scratch/src/internal/PHASE_2_PHYSICS_DECAY_AND_FREEZE.adoc | Design spec for decay/freeze mechanisms | HISTORICAL | Marked "Design Phase" as of 2025-11-07, but the corresponding PHASE_2A_COMPLETION_REPORT.adoc shows this has since been implemented and validated — spec is now historical record of the design rationale behind the now-shipped feature. |
|
| docs/working/architecture/PHYSICS_CONTROL_SYSTEM_DESIGN.adoc | Physics Control System: Observables → Scheduling & Memory Management | WORKING | |
|
||||||
| docs/working/architecture/PHYSICS_CONE_OF_INFLUENCE_DESIGN.adoc | Feedback-control architecture design ("cone of influence") | WORKING | Forward-looking architectural design note for scheduling/control; consistent with physics engine terminology still in active use. |
|
| docs/working/architecture/PHYSICS_SIGNAL_MAP.adoc | Physics Signal Inventory | WORKING | |
|
||||||
| docs/working/architecture/PHYSICS_CONTROL_SYSTEM_DESIGN.adoc | Physics observables → scheduling/memory management integration design | WORKING | Design-stage architecture note, not yet fully realized; scheduling/memory integration is still aspirational per current CLAUDE.md roadmap. |
|
| docs/working/architecture/README.md | docs/working/architecture/ | WORKING | |
|
||||||
| docs/working/scratch/src/internal/PHYSICS_HOTWORDS_CACHE_INTEGRATION.adoc | Hot-words cache integration implementation checklist | SUPERSEDED | Describes a step-by-step plan to add hot-words caching; this feature is now implemented and documented as "Loop #1 — Execution Heat" / `ENABLE_HOTWORDS_CACHE=1` / `dictionary_heat_optimization.c` in current CLAUDE.md. |
|
| docs/working/architecture/SDK-HOWTO-20260819.md | SDK HOWTO — `capsules/sdk.4th` | WORKING | |
|
||||||
| docs/working/scratch/src/internal/PHYSICS_IMPLEMENTATION_OPTIONS.adoc | Three implementation-path options for physics engine | HISTORICAL | "Phase 1 complete" framing with options for next steps; physics engine has since progressed well past this decision point (7 loops, L8 Jacquard). |
|
| docs/working/architecture/TURTLE-GRAPHICS-HOWTO-20260819.md | Turtle Graphics HOWTO — `capsules/turtle.4th` | WORKING | |
|
||||||
| docs/working/scratch/src/internal/PHYSICS_IMPLEMENTATION_STATUS.adoc | POSIX vs L4Re porting strategy status for physics hooks | HISTORICAL | Describes early wiring state of `physics_metadata_touch()` calls; physics engine has since matured substantially — status snapshot now outdated. |
|
| docs/working/architecture/VM-FLEET-ATTRACTOR-DESIGN-20260705.md | VM Fleet Attractor Experiment — Design Doc | WORKING | Fleet physics; pre-reshuffle (names the Hermes VM) but still the source for the attractor design. |
|
||||||
| docs/working/scratch/src/internal/PHYSICS_SCHEDULING_PLAN.adoc | Planning note for physics-inspired scheduling metadata | HISTORICAL | Describes `DictPhysics` struct fields as stub/unpopulated placeholders; current `DictPhysics` is now populated and actively used — doc predates that implementation. |
|
| docs/working/architecture/VM-PHYSICS-DYNAMIC-FLEET-DESIGN-20260705.md | Dynamic VM Fleet Physics — Design Doc | WORKING | |
|
||||||
| docs/working/architecture/PHYSICS_SIGNAL_MAP.adoc | Telemetry signal inventory (L4Re KIP signals + VM-internal counters) | WORKING | Useful living reference of available L4Re kernel telemetry signals for future physics/scheduler work; L4Re remains a supported platform. |
|
| docs/working/architecture/VM_FORMALIZATION_PLAN.adoc | VM Formalization Roadmap | WORKING | |
|
||||||
| docs/working/scratch/src/internal/SHARED_CLAUDE.adoc | Cross-project Claude-instance shared notepad (StarForth↔StarshipOS) | DELETE | Dated 2025-10-19 ad-hoc session notes/chat log between AI instances about integrator script status; pure transient working notes with no lasting reference value. |
|
| docs/working/architecture/architecture-internals/INIT_SYSTEM.adoc | L4RE_TARGET | WORKING | |
|
||||||
| docs/working/architecture/VM_FORMALIZATION_PLAN.adoc | Isabelle/HOL formalization roadmap for `docs/src/internal/formal/` theories | CURRENT | Directly describes the `docs/src/internal/formal/*.thy` files which exist on disk and are wired into the Makefile's Isabelle build targets. |
|
| docs/working/architecture/architecture-internals/MESSAGING.adoc | SFM_THERMO_H | WORKING | |
|
||||||
| docs/working/hardware/performance-profiling/ARM64_OPTIMIZATIONS.adoc | ARM64 assembly optimization summary | CURRENT | Referenced headers (`include/vm_asm_opt_arm64.h`, `vm_inner_interp_arm64.h`, `arch_detect.h`) all confirmed present in current `include/` tree. |
|
| docs/working/architecture/build-and-tooling/BUILD_OPTIONS.adoc | defined(__x86_64__) // defined(_M_X64) // defined(__amd64__) | WORKING | |
|
||||||
| docs/working/hardware/performance-profiling/ASM_OPTIMIZATIONS.adoc | x86_64 assembly optimization guide | CURRENT | Referenced headers (`vm_asm_opt.h`, `vm_inner_interp_asm.h`) confirmed present; consistent with `USE_ASM_OPT=1` build flag in current CLAUDE.md. |
|
| docs/working/architecture/build-and-tooling/DOCUMENTATION_README.adoc | Generate the AsciiDoc API documentation | WORKING | |
|
||||||
| docs/working/hardware/performance-profiling/PROFILER.adoc | Built-in word-execution profiler guide | CURRENT | Describes profiler integrated with PGO pipeline; consistent with `make test PROFILE=1` and `profiler.c` present in current src tree. |
|
| docs/working/architecture/build-and-tooling/INIT_TOOLS.adoc | 1. Work in disk (using StarForth REPL) | WORKING | |
|
||||||
| docs/working/hardware/platform-integration/L4RE_DICTIONARY_ALLOCATION.adoc | Dictionary allocation strategy proposal for L4Re | WORKING | References `src/dictionary_management.c:228` (`vm_create_word()` malloc) and `defining_words.c:554` (`FORGET` free) — both locations exist; malloc/free dependency has likely not yet been replaced with L4Re-native allocator. |
|
| docs/working/architecture/doxygen/DOXYGEN_QUICK_REFERENCE.adoc | MACRO_NAME value | WORKING | |
|
||||||
| docs/working/hardware/platform-integration/L4RE_INTEGRATION.adoc | General L4Re integration guide (IPC, dataspaces, package structure) | WORKING | Broad integration guide; L4Re remains a supported platform per CLAUDE.md tech stack diagram. |
|
| docs/working/architecture/doxygen/DOXYGEN_STYLE_GUIDE.adoc | STACK_SIZE 1024 | WORKING | |
|
||||||
| docs/working/hardware/platform-integration/PLATFORM_ABSTRACTION.adoc | Platform abstraction layer (vtable pattern for POSIX/L4Re) | CURRENT | Matches actual `platform/linux/time.c` and `platform/l4re/time.c` files present in current src tree per CLAUDE.md source tree listing. |
|
| docs/working/architecture/getting-started/DEVELOPER.md | StarForth Developer Guide | WORKING | |
|
||||||
| docs/working/hardware/platform-integration/RASPBERRY_PI_BUILD.adoc | Raspberry Pi 4 / ARM64 build guide | CURRENT | Matches `rpi4-cross` Makefile target and ARM64 architecture support (`ARCH=raspi`) listed in current CLAUDE.md build targets. |
|
| docs/working/architecture/getting-started/INSTALL.adoc | Build package | WORKING | |
|
||||||
| docs/working/hardware/platform-integration/l_4_re_blkio_endpoints.adoc | Block I/O L4Re porting endpoints (blkio vtable mapping) | CURRENT | Describes `blkio_open/close/read` vtable API; matches `blkio_*.c` backend files listed in current CLAUDE.md source tree. |
|
| docs/working/architecture/getting-started/QUICKSTART.adoc | Build the fastest version for your platform | WORKING | |
|
||||||
| docs/working/scratch/testing-quality/KANBAN-WORKFLOW-VALIDATION.adoc | Validation procedure for GitHub Projects Kanban automation (CAPA-032) | CURRENT | Dated 2025-11-02 with explicit source commit hash; references `.github/workflows/capa-kanban-sync.yml` which is a concrete CI artifact. |
|
| docs/working/architecture/getting-started/README.md | Getting Started with StarForth | WORKING | |
|
||||||
| docs/working/archive/legacy/OPTIMIZATION_OPPORTUNITIES.md | Physics engine optimization opportunity ranking dated 2025-11-19 | SUPERSEDED | Superseded by docs/03-architecture/physics-engine/ and Loop #5/#6 implementations |
|
| docs/working/architecture/getting-started/quick-start/heartbeat-doe.md | StarForth Heartbeat DoE – Quick Start | WORKING | |
|
||||||
| docs/working/archive/legacy/README.md | Index and usage guide for the docs/archive directory | CURRENT | Self-referential; accurately describes the archive's purpose and sub-structure |
|
| docs/working/architecture/getting-started/quick-start/optimization-doe.md | Quick Start: Optimization DoE | WORKING | |
|
||||||
| docs/working/archive/legacy/START_HERE_HEARTBEAT_DOE.md | Phase 2 heartbeat DoE launch guide (250 runs, 5 elite configs) | SUPERSEDED | README notes this is superseded by docs/02-experiments/heartbeat-doe/ |
|
| docs/working/architecture/heartbeat_csv_export.md | Heartbeat CSV Export - Real-Time VM Metrics | WORKING | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/BACKLOG_INJECTION_ANALYSIS.md | Governance model analysis of GitHub issue injection points | HISTORICAL | Nov 2025 snapshot of CI/process governance state |
|
| docs/working/archive/COMPUTATIONAL_PHYSICS_FRAMEWORK.md | The Physics of Adaptive Computation | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/EXPERIMENT_QUICK_REFERENCE.txt | Quick-reference ops card for the 90-run A/B/C physics validation experiment | HISTORICAL | Raw ops card tied to a specific pre-publication experiment run |
|
| docs/working/archive/DOCUMENTATION_AUDIT.md | StarForth Documentation Audit | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/IMPLEMENTATION_SUMMARY.md | Phase 1 CI/Kanban automation implementation summary | HISTORICAL | Records CI automation decisions made during project Phase 1 |
|
| docs/working/archive/GAP_ANALYSIS.md | Gap Analysis: Missing Evolutionary Links | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/JENKINS_USER_GUIDE.md | Jenkins CI user guide | HISTORICAL | Jenkins may no longer be the active CI system; check .github/workflows/ |
|
| docs/working/archive/README.md | docs/working/archive/ | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/KANBAN-TESTING-GUIDE.md | Guide for testing GitHub Projects Kanban automation | HISTORICAL | Companion to CAPA-032 Kanban work; superseded by live workflow |
|
| docs/working/archive/artifacts/kanban-workflow/MANIFEST.adoc | Kanban Workflow Artifacts Manifest | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/KANBAN-WORKFLOW-TEST.md | Kanban workflow test procedures | HISTORICAL | Point-in-time test doc for Kanban automation validation |
|
| docs/working/archive/dead/hal-target-contract/README.md | Hardware Abstraction Layer (HAL) Documentation | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/PHASE_1_FINAL_STATUS.md | Final status report for project Phase 1 | HISTORICAL | Closed-loop status report; accurately captures Phase 1 completion state |
|
| docs/working/archive/dead/hal-target-contract/interfaces.md | HAL Interface Specifications | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/PHASE_1_IMPLEMENTATION_COMPLETE.md | Phase 1 implementation completion announcement | HISTORICAL | Records the Phase 1 done-condition at time of writing |
|
| docs/working/archive/dead/hal-target-contract/migration-plan.md | HAL Migration Plan | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/PHASE_1_TESTING_RESULTS.md | Phase 1 testing results summary | HISTORICAL | Test results from Phase 1 CI/governance work |
|
| docs/working/archive/dead/hal-target-contract/overview.md | Hardware Abstraction Layer (HAL) Architecture | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/PHYSICS_EXPERIMENT_README.md | README for the 90-run physics validation experiment | HISTORICAL | Companion README to the experiment data in physics_experiment/ |
|
| docs/working/archive/dead/hal-target-contract/platform-implementations.md | HAL Platform Implementation Guide | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/RULE_1_GATES_IMPLEMENTATION.md | Implementation notes for Rule 1 CI gating | HISTORICAL | CI gate design decisions from Phase 1 |
|
| docs/working/archive/dead/hal-target-contract/starkernel-integration.md | StarKernel HAL Integration Guide | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/SECURITY.md | Security notes predating the ACL system | HISTORICAL | Pre-ACL security model; superseded by docs/03-architecture/word-acl/DESIGN.md |
|
| docs/working/archive/dead/l4re/L4RE_DICTIONARY_ALLOCATION.adoc | STARFORTH_VM_DICT_ALLOC | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/SESSION_SUMMARY.md | Transient AI session summary | HISTORICAL | Session-level notes; limited long-term value |
|
| docs/working/archive/dead/l4re/L4RE_INTEGRATION.adoc | Subdirectories to build | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/TEST-CAPA-TEMPLATE.md | CAPA test case template | HISTORICAL | Template used during Phase 1 CAPA process |
|
| docs/working/archive/dead/l4re/L4RE_INTEGRATION_TODO.adoc | Note: Do NOT copy time_posix.c - not needed in L4Re build | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/codex_audit_report.md | Codex audit report of the codebase | HISTORICAL | Point-in-time static analysis or review; may be stale |
|
| docs/working/archive/dead/l4re/l_4_re_blkio_endpoints.adoc | l_4_re_blkio_endpoints.adoc | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/codex_capa_list.md | CAPA action items derived from Codex audit | HISTORICAL | Action items from Phase 1 audit cycle |
|
| docs/working/archive/dead/metrics-and-knobs.md | StarForth Metrics & Knobs: GAPS ONLY | DEAD | See the file's own header. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/github_backlog_items.md | GitHub backlog items list | HISTORICAL | Snapshot of backlog at Phase 1; likely stale |
|
| docs/working/archive/historical/2026-01-27-system-architecture-draft.md | LithosAnanke System Architecture | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/DEVIATION_REPORT_CSV_FORMATTING.md | CSV formatting deviation report for experiment output | HISTORICAL | Experiment data-hygiene note for the 90-run run |
|
| docs/working/archive/historical/2026-06-03-test-gap-audit.md | StarForth Dictionary Test Coverage — Gap Audit | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/FORMAL_CLAIMS_FOR_REVIEWERS.txt | Formal claims document prepared for peer reviewers | HISTORICAL | Pre-publication version; superseded by published SSRN paper |
|
| docs/working/archive/historical/2026-06-10-next-session-plan.md | Next Session Plan | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/01_MAIN_PAPER/PAPER_KEY_CONTRIBUTIONS_SUMMARY.md | Key contributions summary for peer review submission | HISTORICAL | Pre-SSRN draft; superseded by papers/James_Steady-State_Convergence_Adaptive_Runtime.pdf |
|
| docs/working/archive/historical/2026-06-30-break-me-report.md | 🔥 STARFORTH BREAK-ME DIAGNOSTIC REPORT 🔥 | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/01_MAIN_PAPER/PEER_REVIEW_PAPER_DRAFT.md | Full paper draft submitted for peer review | HISTORICAL | Pre-SSRN draft; superseded by published SSRN paper |
|
| docs/working/archive/historical/2026-07-amd64-isr-fix/README.md | APIC Timer ISR Fix — amd64 | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/02_SUPPORTING_DOCS/FORMAL_CLAIMS_FOR_REVIEWERS.txt | Formal claims for reviewers (supporting docs copy) | HISTORICAL | Duplicate of physics_experiment/FORMAL_CLAIMS_FOR_REVIEWERS.txt |
|
| docs/working/archive/historical/2026-07-birthing/PLAN.md | Birthing Plan: Child VMs Born of Hera | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/02_SUPPORTING_DOCS/FORMAL_VERIFICATION_INTERPRETATION.md | Interpretation guide for Isabelle/HOL proofs for reviewers | HISTORICAL | Pre-publication; proof/ directory is the live source |
|
| docs/working/archive/historical/2026-07-birthing/README.md | docs/working/archive/historical/2026-07-birthing/ | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/02_SUPPORTING_DOCS/PEER_REVIEW_SUBMISSION_PACKAGE.md | Cover doc for the full peer review submission package | HISTORICAL | Submission metadata; superseded by SSRN publication |
|
| docs/working/archive/historical/2026-07-birthing/STATUS.md | Birthing — Work Status and Context | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/02_SUPPORTING_DOCS/QUICK_REFERENCE.txt | Quick reference for reviewers | HISTORICAL | Reviewer-facing summary; superseded by published abstract |
|
| docs/working/archive/historical/2026-07-birthing/acceptance-logs/README.md | docs/working/archive/historical/2026-07-birthing/acceptance-logs/ | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/02_SUPPORTING_DOCS/VARIANCE_ANALYSIS_SUMMARY.md | Variance analysis summary for the 90-run experiment | HISTORICAL | Source data for SSRN paper; keep as experimental record |
|
| docs/working/archive/historical/2026-07-birthing/acceptance-logs/SUMMARY.md | Birthing — Kernel QEMU Acceptance Test Summary | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/03_EXPERIMENTAL_DATA/full_90_run_comprehensive/experiment_summary.txt | Comprehensive 90-run experiment summary | HISTORICAL | Primary experimental record; source data for SSRN paper |
|
| docs/working/archive/historical/2026-08-riscv64-stack-fix/README.md | Kernel Stack Trampoline Fix — riscv64 | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/03_EXPERIMENTAL_DATA/full_90_run_comprehensive/run_logs/test_matrix.txt | Test matrix for full 90-run experiment | HISTORICAL | Experimental record; run configuration matrix |
|
| docs/working/archive/historical/2026-10-lithosananke-orientation.md | LithosAnanke — StarForth Kernel Branch | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/05_SUPPLEMENTARY/PEER_REVIEW_PAPER_OUTLINE.md | Outline used to structure the peer review paper | HISTORICAL | Pre-publication outline; superseded by final SSRN paper |
|
| docs/working/archive/legacy/OPTIMIZATION_OPPORTUNITIES.md | StarForth Optimization Opportunities | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/05_SUPPLEMENTARY/WORK_COMPLETION_STATUS.md | Work completion checklist for peer review submission | HISTORICAL | Point-in-time submission checklist |
|
| docs/working/archive/legacy/README.md | Archived Documentation | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/00-abstract.adoc | AsciiDoc abstract section for peer review paper | HISTORICAL | Pre-publication AsciiDoc draft; superseded by SSRN PDF |
|
| docs/working/archive/legacy/START_HERE_HEARTBEAT_DOE.md | START HERE – Heartbeat DoE Phase 2 | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/01-introduction.adoc | AsciiDoc introduction section | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/BACKLOG_INJECTION_ANALYSIS.md | Backlog Injection Points Analysis | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/01-summary.adoc | AsciiDoc summary section | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/EXPERIMENT_QUICK_REFERENCE.txt | Watch CSV grow in real-time | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/02-formal-theorems.adoc | AsciiDoc formal theorems section | HISTORICAL | Pre-publication; proof/ directory is live source |
|
| docs/working/archive/legacy/phase-1/Reference/IMPLEMENTATION_SUMMARY.md | Physics Engine Comprehensive Validation - Complete Implementation Summary | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/02-related-work.adoc | AsciiDoc related-work section | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/JENKINS_USER_GUIDE.md | Jenkins User Guide | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/03-experimental-methodology.adoc | AsciiDoc experimental methodology section | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/KANBAN-TESTING-GUIDE.md | Kanban Workflow Testing Guide | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/03-methodology.adoc | AsciiDoc methodology section (alternate) | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/KANBAN-WORKFLOW-TEST.md | Kanban Workflow Test Guide (Phase 3) | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/04-results.adoc | AsciiDoc results section | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/PHASE_1_FINAL_STATUS.md | Phase 1 Final Status & Completion Report | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/04-variance-analysis.adoc | AsciiDoc variance analysis section | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/PHASE_1_IMPLEMENTATION_COMPLETE.md | Phase 1 Implementation Complete ✅ | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/05-convergence-proof.adoc | AsciiDoc convergence proof section | HISTORICAL | Pre-publication; proof/ directory is live source |
|
| docs/working/archive/legacy/phase-1/Reference/PHASE_1_TESTING_RESULTS.md | Phase 1 Testing Results | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/05-discussion.adoc | AsciiDoc discussion section | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/PHYSICS_EXPERIMENT_README.md | StarForth Physics Engine Validation Experiment | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/06-stability-proof.adoc | AsciiDoc stability proof section | HISTORICAL | Pre-publication; proof/ directory is live source |
|
| docs/working/archive/legacy/phase-1/Reference/RULE_1_GATES_IMPLEMENTATION.md | Rule 1: Governance-First Backlog Injection Gates Implementation | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/07-predictability-bounds.adoc | AsciiDoc predictability bounds section | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/SECURITY.md | Security Policy | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/08-peer-review-defense.adoc | AsciiDoc peer-review defense section | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/SESSION_SUMMARY.md | Session Summary: Governance Workflow Implementation Complete ✅ | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/index.adoc | AsciiDoc index/master file for the peer review paper | HISTORICAL | Pre-publication AsciiDoc draft |
|
| docs/working/archive/legacy/phase-1/Reference/StarForth_Complete_Presentation.pptx | StarForth_Complete_Presentation.pptx | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/06_ASCIIDOC/paper.adoc | AsciiDoc combined paper source | HISTORICAL | Pre-publication; superseded by SSRN PDF |
|
| docs/working/archive/legacy/phase-1/Reference/TEST-CAPA-TEMPLATE.md | Test CAPA Issue Template | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/PEER_REVIEW_SUBMISSION/README.md | README for the peer review submission package | HISTORICAL | Submission index; superseded by SSRN publication |
|
| docs/working/archive/legacy/phase-1/Reference/codex_audit_report.md | StarForth Governance – Fresh Audit Report | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/QUICK_REFERENCE.txt | Quick reference for the 90-run experiment | HISTORICAL | Ops-level quick card; raw experiment record |
|
| docs/working/archive/legacy/phase-1/Reference/codex_capa_list.md | StarForth Governance – CAPA Register (Fresh Audit) | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/experiment_summary.txt | Top-level experiment summary | HISTORICAL | Primary experimental record; source data for SSRN paper |
|
| docs/working/archive/legacy/phase-1/Reference/github_backlog_items.md | GitHub Project Backlog Prep | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/full_90_run_comprehensive/experiment_summary.txt | Full 90-run comprehensive experiment summary | HISTORICAL | Experimental record (duplicate path from submission tree) |
|
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/ | 35 files | HISTORICAL | Grouped: bulk data or a self-governed tree. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/full_90_run_comprehensive/run_logs/test_matrix.txt | Test matrix for full 90-run experiment | HISTORICAL | Run configuration matrix |
|
| docs/working/archive/legacy/phase-1/Reference/toolchain/ | 2 files | HISTORICAL | Grouped: bulk data or a self-governed tree. |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/run_logs/test_matrix.txt | Run logs test matrix (top-level) | HISTORICAL | Raw run log; experimental record |
|
| docs/working/archive/operations/README.md | Operations | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/test_run/experiment_summary.txt | Test run experiment summary | HISTORICAL | Pre-full-run trial; experimental record |
|
| docs/working/archive/operations/backlog-gatekeeper.md | Backlog Gatekeeper Procedures | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/test_run/run_logs/test_matrix.txt | Test run matrix | HISTORICAL | Raw test matrix for trial run |
|
| docs/working/archive/operations/jenkins-pipeline-guide.adoc | StarForth Jenkins Pipeline Guide | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/test_run2/experiment_summary.txt | Second test run experiment summary | HISTORICAL | Pre-full-run trial #2; experimental record |
|
| docs/working/archive/operations/qa-intake-workflow.adoc | QA Intake & CAPA Backlog Population Workflow | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/physics_experiment/test_run2/run_logs/test_matrix.txt | Second test run matrix | HISTORICAL | Raw test matrix for trial run #2 |
|
| docs/working/archive/operations/refinement/annotations.adoc | StarForth Refinement Code Annotation Guide | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/toolchain/gcc.txt | GCC toolchain version/configuration notes | HISTORICAL | Point-in-time toolchain pinning record |
|
| docs/working/archive/operations/refinement/capa.adoc | StarForth C↔Isabelle Refinement Defect Tracking | HISTORICAL | |
|
||||||
| docs/working/archive/legacy/phase-1/Reference/toolchain/make.txt | Make version/configuration notes | HISTORICAL | Point-in-time toolchain pinning record |
|
| docs/working/archive/operations/refinement/roadmap.adoc | StarForth C↔Isabelle Refinement Implementation Roadmap | HISTORICAL | |
|
||||||
|
| docs/working/archive/operations/workflow.md | StarForth CI/CD Workflow | HISTORICAL | |
|
||||||
|
| docs/working/archive/prog-prove.pdf | prog-prove.pdf | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/README.md | Quality Assurance | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/audits/codebase-audit-report.md | StarForth Codebase Audit Report | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/audits/corrective-actions.md | StarForth Codebase Audit: Corrective Actions Report | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/audits/implementation-audit.md | StarForth Adaptive Tuning: Implementation Audit | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/audits/section-2-audit.md | SECTION 2 AUDIT REPORT | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/audits/section-2-executive-summary.md | SECTION 2 EXECUTIVE SUMMARY | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/phase-tracking/phase-2-implementation-checklist.md | Phase 2 Implementation Checklist | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/phase-tracking/phase-2-issues-identified.md | Phase 2 Issues: Shrink/Grow, Decay Slope, Fixed-Point Violations | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/phase-tracking/phase-2a-session-summary.md | Phase 2a Session Summary: Linear Decay & Freeze Flag Implementation | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/regression/detection-framework.md | Optimization Regression Detection Framework | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/regression/opp-02-report.md | OPP #2: VARIANCE-BASED WINDOW WIDTH TUNING | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/validation/comprehensive-physics-validation.md | Comprehensive Physics Engine Validation Protocol | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/validation/phase-1-protocol.md | Phase 1 Governance Validation Protocol | HISTORICAL | |
|
||||||
|
| docs/working/archive/quality/validation/phase-2-executive-summary.md | Phase 2 Experiment: Executive Summary | HISTORICAL | |
|
||||||
|
| docs/working/archive/research/README.md | Research | HISTORICAL | |
|
||||||
|
| docs/working/archive/research/doe-metrics-schema.md | StarForth Design of Experiments (DoE) Metrics Schema | HISTORICAL | |
|
||||||
|
| docs/working/archive/research/literature-review.md | Literature Review: Physics-Driven VM Optimization | HISTORICAL | |
|
||||||
|
| docs/working/archive/research/research-outline.md | Research Paper Outline: Physics-Driven VM Optimization | HISTORICAL | |
|
||||||
|
| docs/working/archive/research/results-for-publication.md | Results for Publication: Physics-Driven VM Optimization | HISTORICAL | |
|
||||||
|
| docs/working/archive/session-logs/2025-11-20-recap.md | Session Recap: 2025-11-20 | HISTORICAL | |
|
||||||
|
| docs/working/archive/session-logs/2025-11-26-worklog.md | Work Log: November 26, 2025 | HISTORICAL | |
|
||||||
|
| docs/working/archive/session-logs/2026-07-05-worklog.md | Work Log: July 5, 2026 | HISTORICAL | |
|
||||||
|
| docs/working/archive/session-logs/2026-07-24-punch-list.md | Punch List: Gaps from 2026-07-24 Session | HISTORICAL | |
|
||||||
|
| docs/working/archive/session-logs/README.md | Session Logs | HISTORICAL | |
|
||||||
|
| docs/working/archive/session-logs/experimental-addendum.md | Window Scaling Experiment — Validation of the James Law of Computational Dynamic | HISTORICAL | |
|
||||||
|
| docs/working/archive/session-logs/experimental-iteration-usage.md | Experimental Iteration Runner - Usage Guide | HISTORICAL | |
|
||||||
|
| docs/working/archive/session-logs/serialized-questing-pike.md | StarForth → StarshipOS Hybrid Kernel Transformation Plan | HISTORICAL | |
|
||||||
|
| docs/working/archive/superseded/2025-12-14-starforth-roadmap.md | StarForth Roadmap: VM → Kernel → OS → FPGA | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/2026-07-08-hermes-message-block-storage-design.md | Hermes Message/Channel Block-Backed Storage — Design Doc | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/2026-07-08-hermes-message-channel-physics-design.md | Hermes Message/Channel Heat Physics — Design Doc | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/2026-08-02-artemis-hermes-compudynamics-plan.md | Artemis (and Hermes) Compudynamics — Implementation Plan | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/2026-08-tripod/03-architecture-README.md | docs/03-architecture/ | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/2026-08-tripod/ARTEMIS.md | ARTEMIS.md — Artemis VM Architecture | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/2026-08-tripod/HERMES.md | HERMES.md — Hermes VM Architecture | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/2026-08-tripod/README.md | docs/working/archive/superseded/2026-08-tripod/ | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/2026-08-tripod/TRIPOD.md | TRIPOD.md — Architectural Constraints for the Tripod VMs | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/L8_WIRING_PLAN.md | L8 Control Wiring Implementation Plan | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/factorial-doe/guide.md | StarForth Complete 2^6 Factorial Design of Experiments | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/factorial-doe/incompatible-configs.md | Handling Incompatible Configurations in Factorial DoE | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/factorial-doe/index.md | StarForth Complete 2^6 Factorial DoE - Documentation Index | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/factorial-doe/quick-start.md | Quick Start: Complete 2^6 Factorial DoE | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/factorial-doe/workflow.md | Factorial DoE Analysis Workflow | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/feedback-loops-analysis.md | StarForth Feedback Loops & Self-Optimization Analysis | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/heartbeat-doe-corrected-design.md | StarForth Heartbeat DoE – CORRECTED Design (Heartrate Focus) | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/heartbeat-doe-design.md | StarForth Factorial DoE with Heartbeat Integration | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/heartbeat-rate-logging-plan.md | Implementation Plan: Heartbeat Rate Logging | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/loop-5-sketch.md | Loop #5: Context-Aware Window Tuning - Design Sketch | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/archive/superseded/steady-state-machine.md | 1. Introduction | SUPERSEDED | See the file's own header for what replaces it. |
|
||||||
|
| docs/working/experiments/02-experiments/L8_WIRING_CODE_REVIEW_GUIDE.md | L8 Wiring Code Review Guide | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/L8_WIRING_IMPLEMENTATION_SUMMARY.md | L8 Control Wiring Implementation Summary | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/README.md | Experiments | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/heartbeat-doe/execution-guide.md | StarForth Heartbeat DoE Experiment – Execution Guide | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/heartbeat-doe/implementation-summary.md | StarForth Heartbeat DoE – Implementation Summary | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/heartbeat-doe/phase2-corrected.md | StarForth Phase 2 Heartbeat DoE – CORRECTED AND FINALIZED | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/james-law/protocol.md | Critical Window Scaling Experiment | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/physics-optimization/doe-guide.md | StarForth Optimization DoE Guide | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/physics-optimization/execution-guide.md | StarForth Physics Engine - Comprehensive Validation Experiment | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/physics-optimization/hotwords-cache.md | Physics Engine Experiment: Hot-Words Cache Performance Analysis | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/physics-optimization/proposals.md | Physics-Driven Optimization Proposals for StarForth | WORKING | |
|
||||||
|
| docs/working/experiments/02-experiments/physics-optimization/reproduce.md | Reproducing the Physics Engine Hot-Words Cache Experiment | WORKING | |
|
||||||
|
| docs/working/experiments/README.md | docs/working/experiments/ | WORKING | |
|
||||||
|
| docs/working/experiments/campaigns/doe_2x7/README.md | 2^7 Factorial Design of Experiments (DoE) | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/l8_attractor_map/SESSION_REPORT_2025-12-10.md | L8 Attractor Map: From Crashes to Computational Physics | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/l8_attractor_map/results_20251209_145907/ | 9 files | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/l8_attractor_map/run_log.txt | run_log.txt | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/l8_validation/EXPERIMENT_SUMMARY.txt | Quick test (10 reps, ~8 min) | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/l8_validation/README.md | L8 Jacquard Mode Selector Validation Experiment | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/l8_validation/l8_validation_20251208_102205/ | 2 files | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/l8_validation/l8_validation_30reps_20251126_135128/ | 2 files | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/shape_validation/README.md | Workload Shape Validation Experiment | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/shape_validation/shape_RAJ_run_20251127_093208/ | 2 files | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/shape_validation/shape_run_20251123_083147/ | 2 files | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/window_scaling/QUICK_START.md | Window Scaling Experiment - Quick Start Guide | RECORD | Campaign data. |
|
||||||
|
| docs/working/experiments/campaigns/window_scaling/README.md | Window Scaling Experiment — James Law Validation | RECORD | Campaign data. |
|
||||||
|
| docs/working/hardware/PGO_GUIDE.adoc | Interactive TUI | WORKING | |
|
||||||
|
| docs/working/hardware/PLATFORM_BUILD_GUIDE.adoc | POSIX Build (Linux/macOS/BSD) - DEFAULT | WORKING | |
|
||||||
|
| docs/working/hardware/README.md | docs/working/hardware/ | HISTORICAL | Flagged in its own header. |
|
||||||
|
| docs/working/hardware/performance-profiling/ARM64_OPTIMIZATIONS.adoc | Detect architecture | WORKING | |
|
||||||
|
| docs/working/hardware/performance-profiling/ASM_OPTIMIZATIONS.adoc | Add to CFLAGS | WORKING | |
|
||||||
|
| docs/working/hardware/performance-profiling/PROFILER.adoc | Run your typical Forth program with profiling | WORKING | |
|
||||||
|
| docs/working/hardware/platform-integration/PLATFORM_ABSTRACTION.adoc | POSIX build (default - Linux/macOS/BSD) | WORKING | |
|
||||||
|
| docs/working/hardware/platform-integration/RASPBERRY_PI_BUILD.adoc | Install dependencies | WORKING | |
|
||||||
|
| docs/working/legal/README.md | docs/working/legal/ — Patent-Adjacent Material (HOLD) | LEGAL HOLD | Not touched without Captain Bob. |
|
||||||
|
| docs/working/papers/ACADEMIC_WORDING_GUIDELINES.md | Academic Wording Guidelines for StarForth | WORKING | |
|
||||||
|
| docs/working/papers/ANTI_CLAIMS.md | Anti-Claims: What This Work Does NOT Claim | WORKING | |
|
||||||
|
| docs/working/papers/EXECUTIVE_SUMMARY.md | Executive Summary: StarForth in Plain English | WORKING | |
|
||||||
|
| docs/working/papers/FINAL_REPORT/appendix_glossary.adoc | appendix_glossary.adoc | WORKING | |
|
||||||
|
| docs/working/papers/FORMAL_CLAIM_TABLE.md | Formal Claim Table: StarForth Adaptive Runtime | WORKING | |
|
||||||
|
| docs/working/papers/NEGATIVE_RESULTS.md | Negative Results: Where StarForth Fails | WORKING | |
|
||||||
|
| docs/working/papers/NULL_HYPOTHESIS.md | Null Hypothesis and Falsification Criteria | WORKING | |
|
||||||
|
| docs/working/papers/ONTOLOGY_README.md | StarForth Ontology Documentation | WORKING | |
|
||||||
|
| docs/working/papers/README.md | docs/working/papers/ | WORKING | |
|
||||||
|
| docs/working/papers/REPLICATION_INVITE.md | Invitation to Independent Replication | WORKING | |
|
||||||
|
| docs/working/papers/REPRODUCIBILITY.md | Reproducibility: One-Command Experiment Reproduction | WORKING | |
|
||||||
|
| docs/working/papers/SCIENTIFIC_DEFENSE_CHECKLIST.md | Scientific Defense Checklist | WORKING | |
|
||||||
|
| docs/working/papers/SENSITIVITY_ANALYSIS.md | Sensitivity Analysis: Parameter Robustness | WORKING | |
|
||||||
|
| docs/working/papers/SSRN_companion/Math_Companion_SSRN.pdf | Math_Companion_SSRN.pdf | WORKING | |
|
||||||
|
| docs/working/papers/SSRN_companion/Math_Companion_SSRN.tex | | WORKING | |
|
||||||
|
| docs/working/papers/SSRN_companion/figures/fig1_snake_trajectory.pdf | fig1_snake_trajectory.pdf | WORKING | |
|
||||||
|
| docs/working/papers/SSRN_companion/figures/fig2_K_vs_window.pdf | fig2_K_vs_window.pdf | WORKING | |
|
||||||
|
| docs/working/papers/SSRN_companion/figures/fig3_FFT_spectrum.pdf | fig3_FFT_spectrum.pdf | WORKING | |
|
||||||
|
| docs/working/papers/SSRN_companion/figures/fig4_golden_ratio_penalties.pdf | fig4_golden_ratio_penalties.pdf | WORKING | |
|
||||||
|
| docs/working/papers/SSRN_companion/figures/fig5_bimodal_distributions.pdf | fig5_bimodal_distributions.pdf | WORKING | |
|
||||||
|
| docs/working/papers/SSRN_companion/figures/fig6_performance_vs_k.pdf | fig6_performance_vs_k.pdf | WORKING | |
|
||||||
|
| docs/working/papers/SSRN_companion/figures/fig7_performance_by_regime.pdf | fig7_performance_by_regime.pdf | WORKING | |
|
||||||
|
| docs/working/papers/SYSTEM_NARRATIVE.pdf | SYSTEM_NARRATIVE.pdf | WORKING | |
|
||||||
|
| docs/working/papers/SYSTEM_NARRATIVE.tex | StarForth System Narrative}\\ | WORKING | |
|
||||||
|
| docs/working/papers/ontology.pdf | ontology.pdf | WORKING | |
|
||||||
|
| docs/working/papers/ontology.tex | StarForth Ontology: Formal Conceptual Framework for\\ | WORKING | |
|
||||||
|
| docs/working/papers/proposals/DARPA_SSM_Proposal_James.docx | DARPA_SSM_Proposal_James.docx | WORKING | |
|
||||||
|
| docs/working/papers/proposals/DARPA_SSM_Proposal_James.pdf | DARPA_SSM_Proposal_James.pdf | WORKING | |
|
||||||
|
| docs/working/papers/proposals/SSM_DARPA_Complete_Proposal_James_FINAL.docx | SSM_DARPA_Complete_Proposal_James_FINAL.docx | WORKING | |
|
||||||
|
| docs/working/papers/published/James_ACL_Security_Invariant_TTL_Mitigation.tex | % | WORKING | |
|
||||||
|
| docs/working/papers/published/James_Steady-State_Convergence_Adaptive_Runtime.pdf | James_Steady-State_Convergence_Adaptive_Runtime.pdf | WORKING | |
|
||||||
|
| docs/working/scratch/AGENTS.md | Repository Guidelines | WORKING | |
|
||||||
|
| docs/working/scratch/AI_AGENT_MANDATORY_README.md | AI_AGENT_MANDATORY_README.md | WORKING | |
|
||||||
|
| docs/working/scratch/COMMUNICATION_GUIDE.adoc | StarshipOS Analogy Cheat Sheet | WORKING | |
|
||||||
|
| docs/working/scratch/GOVERNANCE_EXPORT_NOTES.adoc | Governance Export Notes (Physics Phase 1) | WORKING | |
|
||||||
|
| docs/working/scratch/README.md | docs/working/scratch/ | WORKING | |
|
||||||
|
| docs/working/scratch/TASK_LIST.md | StarForth Physics Runtime — TASK_LIST.md | WORKING | |
|
||||||
|
| docs/working/scratch/assets/README.md | Binary Assets | WORKING | |
|
||||||
|
| docs/working/scratch/assets/book-FIXED.docx | book-FIXED.docx | WORKING | |
|
||||||
|
| docs/working/scratch/ci-cd/FMEA_BLOCKING_GATES.adoc | FMEA Blocking Gates Implementation | WORKING | |
|
||||||
|
| docs/working/scratch/ci-cd/GITHUB_ISSUES_GOVERNANCE_FLOW.adoc | GitHub Issues & Governance Integration | WORKING | |
|
||||||
|
| docs/working/scratch/ci-cd/GOVERNANCE_INPUT_AUDIT.adoc | Governance Input Audit & Compliance Checklist | WORKING | |
|
||||||
|
| docs/working/scratch/ci-cd/JENKINS_GOVERNANCE_INTEGRATION.adoc | Jenkins Governance Integration Guide | WORKING | |
|
||||||
|
| docs/working/scratch/governance/index.adoc | Governance | WORKING | |
|
||||||
|
| docs/working/scratch/src-index.adoc | StarForth Documentation Index | WORKING | |
|
||||||
|
| docs/working/scratch/src/INTEGRATION_NOTES.adoc | This blocks EVERYTHING because of empty line: | WORKING | |
|
||||||
|
| docs/working/scratch/src/development/CONTRIBUTING.adoc | 1) Fork and clone | WORKING | |
|
||||||
|
| docs/working/scratch/src/internal/PHASE_2A_COMPLETION_REPORT.adoc | Phase 2a Completion Report: Freeze Flag & Linear Decay | WORKING | |
|
||||||
|
| docs/working/scratch/src/internal/PHASE_2_IMPLEMENTATION_SUMMARY.adoc | Phase 2 Implementation Summary & Action Items | WORKING | |
|
||||||
|
| docs/working/scratch/src/internal/PHASE_2_PHYSICS_DECAY_AND_FREEZE.adoc | Phase 2: Physics Model Extensions — Decay & Freeze Mechanisms | WORKING | |
|
||||||
|
| docs/working/scratch/src/internal/PHYSICS_HOTWORDS_CACHE_INTEGRATION.adoc | Hot-Words Cache Integration Guide | WORKING | |
|
||||||
|
| docs/working/scratch/src/internal/PHYSICS_IMPLEMENTATION_OPTIONS.adoc | Physics Engine Implementation Options: Three Paths Forward | WORKING | |
|
||||||
|
| docs/working/scratch/src/internal/PHYSICS_IMPLEMENTATION_STATUS.adoc | Physics Engine Implementation Status: POSIX vs L4Re Porting Strategy | WORKING | |
|
||||||
|
| docs/working/scratch/src/internal/PHYSICS_SCHEDULING_PLAN.adoc | Physics-Driven Scheduling Metadata Plan | WORKING | |
|
||||||
|
| docs/working/scratch/testing-quality/KANBAN-WORKFLOW-VALIDATION.adoc | Kanban Workflow Validation Procedure | WORKING | |
|
||||||
|
| docs/working/specifications/HOLA_PROTOCOL.adoc | HOLA Shared Memory Protocol (Phase 1) | WORKING | |
|
||||||
|
| docs/working/specifications/README.md | docs/working/specifications/ | WORKING | |
|
||||||
|
|
||||||
|
## experiments
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| experiments/README.md | experiments/ | RECORD | Experiment design, data or result. |
|
||||||
|
|
||||||
|
## experiments/artemis_stress
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| experiments/artemis_stress/analysis/ | 6 files | RECORD | Experiment design, data or result. |
|
||||||
|
|
||||||
|
## experiments/bare_metal
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| experiments/bare_metal/README.md | Bare-Metal DoE Experiment | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/bare_metal/analysis/ | 130 files | RECORD | Experiment design, data or result. |
|
||||||
|
|
||||||
|
## experiments/std79-doe
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| experiments/std79-doe/README.md | std79 DoE — 3(architecture) × 9(identity) × 3(replicate) randomized full-factori | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/analysis-20260912/ | 2 files | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/README.md | std79-doe LaTeX report: the fleet conservation invariant K | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/actual_window_size_dark.pdf | actual_window_size_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/actual_window_size_light.pdf | actual_window_size_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/apic_delta_dark.pdf | apic_delta_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/apic_delta_light.pdf | apic_delta_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/artemis_heat_dark.pdf | artemis_heat_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/artemis_heat_light.pdf | artemis_heat_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/avg_word_heat_dark.pdf | avg_word_heat_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/avg_word_heat_light.pdf | avg_word_heat_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/fleet_k_dark.pdf | fleet_k_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/fleet_k_light.pdf | fleet_k_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/hera_heat_dark.pdf | hera_heat_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/hera_heat_light.pdf | hera_heat_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/hermes_heat_dark.pdf | hermes_heat_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/hermes_heat_light.pdf | hermes_heat_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/hot_word_count_dark.pdf | hot_word_count_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/hot_word_count_light.pdf | hot_word_count_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/jitter_ns_dark.pdf | jitter_ns_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/jitter_ns_light.pdf | jitter_ns_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/time_trust_dark.pdf | time_trust_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/time_trust_light.pdf | time_trust_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/variance_dark.pdf | variance_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/variance_light.pdf | variance_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/vm_call_depth_max_dark.pdf | vm_call_depth_max_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/vm_call_depth_max_light.pdf | vm_call_depth_max_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/window_width_dark.pdf | window_width_dark.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/figures/window_width_light.pdf | window_width_light.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/std79_doe_report.pdf | std79_doe_report.pdf | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-doe/report-20260912/report/std79_doe_report.tex | % | RECORD | Experiment design, data or result. |
|
||||||
|
|
||||||
|
## experiments/std79-exerciser
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| experiments/std79-exerciser/README.md | FORTH-79 Standard-Dictionary Cross-ISA Exerciser | RECORD | Experiment design, data or result. |
|
||||||
|
| experiments/std79-exerciser/results-20260910/ | 27 files | RECORD | Experiment design, data or result. |
|
||||||
|
|
||||||
|
## img
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| img/README.md | img/ | CURRENT | |
|
||||||
|
|
||||||
|
## kernel
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| kernel/include/starkernel/README.md | include/starkernel/ | CURRENT | |
|
||||||
|
| kernel/include/starkernel/freestanding/README.md | include/starkernel/freestanding/ | CURRENT | |
|
||||||
|
| kernel/include/starkernel/freestanding/sys/README.md | include/starkernel/freestanding/sys/ | CURRENT | |
|
||||||
|
| kernel/include/starkernel/hal/README.md | include/starkernel/hal/ | CURRENT | |
|
||||||
|
| kernel/include/starkernel/vm/README.md | include/starkernel/vm/ | CURRENT | |
|
||||||
|
| kernel/include/starkernel/vm/bootstrap/README.md | include/starkernel/vm/bootstrap/ | CURRENT | |
|
||||||
|
| kernel/linker/README.md | linker/ | CURRENT | |
|
||||||
|
| kernel/src/README.md | src/starkernel/ | CURRENT | |
|
||||||
|
| kernel/src/arch/aarch64/README.md | src/starkernel/arch/aarch64/ | CURRENT | |
|
||||||
|
| kernel/src/arch/amd64/README.md | src/starkernel/arch/amd64/ | CURRENT | |
|
||||||
|
| kernel/src/arch/riscv64/README.md | src/starkernel/arch/riscv64/ | CURRENT | |
|
||||||
|
| kernel/src/boot/README.md | src/starkernel/boot/ | CURRENT | |
|
||||||
|
| kernel/src/capsule/README.md | src/starkernel/capsule/ | CURRENT | |
|
||||||
|
| kernel/src/hal/README.md | src/starkernel/hal/ | CURRENT | |
|
||||||
|
| kernel/src/hash/README.md | src/starkernel/hash/ | CURRENT | |
|
||||||
|
| kernel/src/math/README.md | src/starkernel/math/ | CURRENT | |
|
||||||
|
| kernel/src/memory/README.md | src/starkernel/memory/ | CURRENT | |
|
||||||
|
| kernel/src/pci/README.md | src/starkernel/pci/ | CURRENT | |
|
||||||
|
| kernel/src/virtio/README.md | src/starkernel/virtio/ | CURRENT | |
|
||||||
|
| kernel/src/vm/README.md | src/starkernel/vm/ | CURRENT | |
|
||||||
|
| kernel/src/vm/bootstrap/README.md | src/starkernel/vm/bootstrap/ | CURRENT | |
|
||||||
|
| kernel/src/vm/host/README.md | src/starkernel/vm/host/ | CURRENT | |
|
||||||
|
|
||||||
|
## lfs
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| lfs/README.md | lfs/ | CURRENT | |
|
||||||
|
|
||||||
|
## mk
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| mk/README.md | mk/ | CURRENT | |
|
||||||
|
|
||||||
|
## proof
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| proof/COVERAGE.md | Isabelle/HOL Proof Suite — Coverage & Purpose | CURRENT | |
|
||||||
|
| proof/FINDINGS.md | Isabelle/HOL Word-Source Sweep — Aggregated Architectural Findings | CURRENT | |
|
||||||
|
| proof/README.md | proof/ | CURRENT | |
|
||||||
|
|
||||||
|
## scripts
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| scripts/README.md | scripts/ | CURRENT | |
|
||||||
|
| scripts/SCRIPT_REPAIR_LOG.md | Ablation Study Script Repair Log | CURRENT | |
|
||||||
|
|
||||||
|
## tools
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| tools/README.md | tools/ | CURRENT | |
|
||||||
|
| tools/capsule-reserved.txt | capsule-reserved.txt — human-authored, git-tracked block ranges NOT | CURRENT | |
|
||||||
|
| tools/kconfig/README.md | tools/kconfig — vendored Linux kernel Kconfig tooling | CURRENT | |
|
||||||
|
|
||||||
|
## v3
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| v3/include/README.md | include/ | CURRENT | |
|
||||||
|
| v3/src/README.md | src/ | CURRENT | |
|
||||||
|
| v3/src/platform/README.md | src/platform/ | CURRENT | |
|
||||||
|
| v3/src/platform/l4re/README.md | src/platform/l4re/ | HISTORICAL | Flagged in its own header. |
|
||||||
|
| v3/src/platform/linux/README.md | src/platform/linux/ | CURRENT | |
|
||||||
|
| v3/src/test_runner/README.md | src/test_runner/ | CURRENT | |
|
||||||
|
| v3/src/test_runner/include/README.md | src/test_runner/include/ | CURRENT | |
|
||||||
|
| v3/src/test_runner/modules/README.md | src/test_runner/modules/ | CURRENT | |
|
||||||
|
| v3/src/word_source/README.md | src/word_source/ | CURRENT | |
|
||||||
|
| v3/src/word_source/include/README.md | src/word_source/include/ | CURRENT | |
|
||||||
|
|
||||||
|
## v4
|
||||||
|
|
||||||
|
| Path | Title | Status | Notes |
|
||||||
|
|---|---|---|---|
|
||||||
|
| v4/README.md | v4/ | CURRENT | |
|
||||||
|
|||||||
+65
-44
@@ -1,50 +1,71 @@
|
|||||||
# StarForth / LithosAnanke Documentation
|
# StarForth / LithosAnanke documentation — the map
|
||||||
|
|
||||||
This is the `lithosananke` branch: the bare-metal StarKernel side of the project
|
Start here. This page says where each kind of document lives and which one to believe.
|
||||||
(contrast `master`, which is the hosted-VM-only side). Documentation follows the
|
Reorganised 2026-10-14 (the docs triage): one place for current reference, one archive for
|
||||||
two-tier model described in `docs/CLAUDE.md`: **`formal/`** is the polished,
|
everything kept as record, and every superseded or abandoned document labelled as such in
|
||||||
citable LaTeX tier; **`working/`** is living design notes and drafts that feed it.
|
its own header.
|
||||||
Everything else in this directory is branch- or subsystem-specific material that
|
|
||||||
doesn't fit either tier.
|
- **[INDEX.md](INDEX.md)** — every document in the repository, with its status.
|
||||||
|
- **[DEAD-AND-REVISED.md](DEAD-AND-REVISED.md)** — the ideas that were abandoned, and the claims
|
||||||
|
that were revised, each with the date and where the decision is recorded.
|
||||||
|
- **[DELETE-CANDIDATES.md](DELETE-CANDIDATES.md)** — what was deleted as duplicate, and why
|
||||||
|
(2026-10-14).
|
||||||
|
|
||||||
|
## What to believe
|
||||||
|
|
||||||
|
| For | Authoritative | Where |
|
||||||
|
|---|---|---|
|
||||||
|
| How to work in this repo, and current status | `.claude/CLAUDE.md` | repo root |
|
||||||
|
| What was decided, and why; work as it happened | the FABRIC record | [fabric/](fabric/) — `FABRIC-3.md` is the living one |
|
||||||
|
| StarForth v4 (the F18-derived engine) | the v4 design | [v4.0.0/](v4.0.0/) and `../v4/README.md` |
|
||||||
|
| Roadmap and release-versioning policy | `ROADMAP.md` | [reference/](reference/) |
|
||||||
|
| Getting onto the boards | the bring-up checklist | `../boards/BRINGUP.md` |
|
||||||
|
| A word, a primitive, a term | the dictionaries and the ontology | [reference/](reference/) |
|
||||||
|
| What the code does | the code, and its folder's `README.md` | `../kernel/`, `../v3/`, `../v4/` |
|
||||||
|
|
||||||
|
Where two documents disagree, the one higher in this table wins, and code wins over all.
|
||||||
|
|
||||||
## Layout
|
## Layout
|
||||||
|
|
||||||
- **[formal/](formal/)** — Three-volume LaTeX documentation set (research volumes,
|
- **[fabric/](fabric/)** — the design and work record, numbered in order. `FABRIC-3.md`
|
||||||
practitioner books, standalone reports) plus the `scraps/` fragment library it's
|
(bare-metal boot and everything since) is open; the others are closed:
|
||||||
assembled from. Audience: patent counsel, SSRN reviewers, licensees, hobbyists
|
- FABRIC-0, -1 and -2 are history;
|
||||||
with hardware in hand. See `formal/CLAUDE.md` for authoring conventions.
|
- FABRIC-3.5 and -3.6 are the Tripod/kernel reshuffle, still authoritative for what they ruled;
|
||||||
- **[working/](working/)** — Living documents: architecture design notes, DoE
|
- FABRIC-3.7 (elevation) is closed as not needed;
|
||||||
experiment logs, hardware/platform notes, draft specs, academic-paper source
|
- FABRIC-4 holds ideas caught early, not yet scoped.
|
||||||
material, and an archive of superseded docs. Source material for `formal/`.
|
- **[v4.0.0/](v4.0.0/)** — StarForth v4: justification, engine, decomposition, nucleus, mesh,
|
||||||
- **[03-architecture/](03-architecture/)** — Tripod VM architecture constraints
|
parity with v3. `plans/` holds the step plans, all executed.
|
||||||
(Hera/Hermes/Artemis) and the word-level ACL system design.
|
- **[reference/](reference/)** — current reference material:
|
||||||
- **[lithosananke/](lithosananke/)** — LithosAnanke kernel branch documentation:
|
- `ROADMAP.md` (roadmap and the ratified versioning policy);
|
||||||
milestone roadmap, system architecture, HAL reference, kernel command-line
|
- `M7.1.md` (init capsules and birth);
|
||||||
argument design, and the amd64 APIC-timer ISR postmortem.
|
- `word-acl/` (the word-level ACL design);
|
||||||
- **[birthing/](birthing/)** — VM birthing plan and status for the Hera-spawns-
|
- `kernel-args/` (the boot command line);
|
||||||
Hermes/Artemis constellation, plus three-architecture QEMU acceptance logs.
|
- `hosted-acceptance-test/`;
|
||||||
- **[patent/](patent/)** — Provisional patent application source. **Legal hold —
|
- `DICTIONARY.md` and `STARFORTH_PRIMITIVES.md` (the words);
|
||||||
ask Bob before touching anything in this directory.**
|
- `ONTOLOGY.md` (the lexicon);
|
||||||
- **[api/](api/)** — Generated Doxygen tag file and warnings log (gitignored;
|
- `L8_ADAPTIVE_CONFIG_TABLE.md`.
|
||||||
not part of the tracked doc tree).
|
- **[working/](working/)** — living material and the source for `formal/`:
|
||||||
- **[pptx/](pptx/)** — Elevator-pitch and deep-dive slide decks for different
|
- `architecture/` (design notes and HOWTOs);
|
||||||
audiences (technical, non-technical, academic, PhD-level).
|
- `experiments/` (DoE designs and campaign data);
|
||||||
|
- `papers/` (academic sources, the system narrative, proposals);
|
||||||
|
- `hardware/`, `specifications/` and `scratch/`;
|
||||||
|
- **`archive/`**, which has four parts:
|
||||||
|
- `historical/`: finished work, kept as record;
|
||||||
|
- `superseded/`: replaced, and each file's header names what replaced it;
|
||||||
|
- `dead/`: abandoned or never adopted;
|
||||||
|
- the older `legacy/`, `quality/`, `operations/`, `research/` and `session-logs/`.
|
||||||
|
- **[formal/](formal/)** — the press-ready LaTeX tier (three volumes, books, standalone
|
||||||
|
reports). Governed by `formal/CLAUDE.md`.
|
||||||
|
- **[book/](book/)** — the LithosAnanke and StarForth book build.
|
||||||
|
- **[pptx/](pptx/)** — slide decks for different audiences.
|
||||||
|
- **[patent/](patent/)** — provisional patent material. **Legal hold: ask Captain Bob before
|
||||||
|
touching anything here** (also `formal/patent/`, `formal/scraps/legal/`, `working/legal/`).
|
||||||
|
|
||||||
## Current Active Work
|
## Adding a document
|
||||||
|
|
||||||
- **LithosAnanke M7/M7.1** — VM parity validation and init capsule architecture.
|
- Draft in `working/`; promote to `formal/` when it is ready to be cited (`formal/CLAUDE.md`).
|
||||||
See `lithosananke/README.md` and `lithosananke/M7.1.md`.
|
Reference material that describes the system as it is goes in `reference/`.
|
||||||
- **Word-level ACL system** — Phase 6 complete on `master`; Phase 7 (LithosAnanke
|
- When a document is overtaken, do not delete it: `git mv` it into `working/archive/superseded/`
|
||||||
parity) is the next step. See `03-architecture/word-acl/README.md`.
|
or `dead/` with a header saying why and what replaces it, and add a line to
|
||||||
- **Tripod VMs** — Hera (governor), Hermes (messenger), Artemis (memory/block
|
`DEAD-AND-REVISED.md`.
|
||||||
storage). See `03-architecture/tripod/README.md` and `birthing/`.
|
- Rules for documentation work: [CLAUDE.md](CLAUDE.md).
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
- Place new material in `working/` first; promote to `formal/` only when it's
|
|
||||||
ready to be cited (see `formal/CLAUDE.md` for promotion criteria).
|
|
||||||
- Never touch `patent/`, `formal/patent/`, `formal/scraps/legal/`, or
|
|
||||||
`working/legal/` without Bob's explicit instruction.
|
|
||||||
- Add a `README.md` to any new category-level subdirectory, following the
|
|
||||||
format used throughout this tree: orientation paragraph + bullet list of
|
|
||||||
real files with one-line descriptions.
|
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
# docs/book/Makefile -- the single LithosAnanke book, built from LaTeX.
|
||||||
|
#
|
||||||
|
# Run from the repo root (the root Makefile does this):
|
||||||
|
# make docs -> build/docs/LithosAnanke.pdf
|
||||||
|
# make docs TARGET=<board> -> build/docs/LithosAnanke-<board>.pdf
|
||||||
|
# (same book + that board's appendix)
|
||||||
|
#
|
||||||
|
# docs/book/main.tex is the master. Markdown sources are converted by pandoc
|
||||||
|
# into LaTeX fragments under build/docs/gen/ and \input from main.tex; the
|
||||||
|
# Markdown stays the source of truth until a chapter is rewritten in LaTeX.
|
||||||
|
# Figures and tables that present data read the CSV directly at LaTeX time
|
||||||
|
# (pgfplots / pgfplotstable) and cite it with \datasource{path}; see
|
||||||
|
# docs/book/README.md.
|
||||||
|
|
||||||
|
BOOK_DIR := docs/book
|
||||||
|
OUT := build/docs
|
||||||
|
GEN := $(OUT)/gen
|
||||||
|
|
||||||
|
BOARD ?=
|
||||||
|
BOARD_NAME ?=
|
||||||
|
VARIANT := $(if $(BOARD),$(BOARD),book)
|
||||||
|
VAR_DIR := $(OUT)/$(VARIANT)
|
||||||
|
PDF := $(OUT)/LithosAnanke$(if $(BOARD),-$(BOARD)).pdf
|
||||||
|
|
||||||
|
PANDOC ?= pandoc
|
||||||
|
LATEXMK ?= latexmk
|
||||||
|
PANDOC_FILTERS := $(BOOK_DIR)/pandoc/table-widths.lua $(BOOK_DIR)/pandoc/code-breaks.lua
|
||||||
|
PANDOC_FLAGS := -f gfm -t latex --top-level-division=chapter --wrap=preserve \
|
||||||
|
$(foreach f,$(PANDOC_FILTERS),--lua-filter=$(f))
|
||||||
|
|
||||||
|
# fragment name : Markdown source. The order of \input lines is main.tex's.
|
||||||
|
CHAPTERS := \
|
||||||
|
ontology:docs/reference/ONTOLOGY.md \
|
||||||
|
roadmap:docs/working/archive/superseded/2025-12-14-starforth-roadmap.md \
|
||||||
|
boards:boards/README.md \
|
||||||
|
justification:docs/v4.0.0/JUSTIFICATION.md \
|
||||||
|
decomposition:docs/v4.0.0/DECOMPOSITION.md \
|
||||||
|
fabric-0:docs/fabric/FABRIC-0.md \
|
||||||
|
fabric-1:docs/fabric/FABRIC-1.md \
|
||||||
|
fabric-2:docs/fabric/FABRIC-2.md \
|
||||||
|
fabric-3:docs/fabric/FABRIC-3.md \
|
||||||
|
fabric-3-5:docs/fabric/FABRIC-3.5.md \
|
||||||
|
fabric-3-6:docs/fabric/FABRIC-3.6.md \
|
||||||
|
fabric-3-7:docs/fabric/FABRIC-3.7.md \
|
||||||
|
fabric-4:docs/fabric/FABRIC-4.md
|
||||||
|
|
||||||
|
ifneq ($(BOARD),)
|
||||||
|
ifeq ($(wildcard boards/$(BOARD)/README.md),)
|
||||||
|
$(error boards/$(BOARD)/README.md is missing: it is the board's appendix)
|
||||||
|
endif
|
||||||
|
CHAPTERS += board-$(BOARD):boards/$(BOARD)/README.md
|
||||||
|
endif
|
||||||
|
|
||||||
|
chapter_name = $(word 1,$(subst :, ,$(1)))
|
||||||
|
chapter_src = $(word 2,$(subst :, ,$(1)))
|
||||||
|
FRAGMENTS := $(foreach c,$(CHAPTERS),$(GEN)/$(call chapter_name,$(c)).tex)
|
||||||
|
|
||||||
|
.PHONY: all tools FORCE
|
||||||
|
all: $(PDF)
|
||||||
|
|
||||||
|
tools:
|
||||||
|
@missing=""; \
|
||||||
|
for t in $(PANDOC) $(LATEXMK) xelatex; do command -v $$t >/dev/null 2>&1 || missing="$$missing $$t"; done; \
|
||||||
|
if [ -n "$$missing" ]; then \
|
||||||
|
echo "Error: make docs needs:$$missing"; \
|
||||||
|
echo " sudo apt-get install -y pandoc latexmk texlive-xetex texlive-latex-extra texlive-pictures texlive-fonts-recommended fonts-dejavu fonts-dejavu-extra"; \
|
||||||
|
echo " (or a user-local TinyTeX + pandoc in ~/.local; see docs/book/README.md)"; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# --id-prefix keeps heading labels unique across documents that reuse
|
||||||
|
# section names ("Summary", "Open questions", ...).
|
||||||
|
define chapter_rule
|
||||||
|
$(GEN)/$(call chapter_name,$(1)).tex: $(call chapter_src,$(1)) $(PANDOC_FILTERS) | tools
|
||||||
|
@mkdir -p $(GEN)
|
||||||
|
@echo " PANDOC $$< -> $$@"
|
||||||
|
@$(PANDOC) $(PANDOC_FLAGS) --id-prefix=$(call chapter_name,$(1))- $$< -o $$@
|
||||||
|
endef
|
||||||
|
$(foreach c,$(CHAPTERS),$(eval $(call chapter_rule,$(c))))
|
||||||
|
|
||||||
|
# Pandoc's syntax-highlighting macros, taken from the installed pandoc so the
|
||||||
|
# fragments and their macros always come from the same version.
|
||||||
|
$(GEN)/pandoc-highlighting.tex: $(BOOK_DIR)/pandoc/highlighting.latex | tools
|
||||||
|
@mkdir -p $(GEN)
|
||||||
|
@printf '```c\nx\n```\n' | $(PANDOC) -f gfm -t latex -s --template=$< -o $@
|
||||||
|
|
||||||
|
# Per-build facts the book prints: the commit every \datasource refers to,
|
||||||
|
# and which board appendix (if any) is included.
|
||||||
|
$(VAR_DIR)/meta.tex: FORCE
|
||||||
|
@mkdir -p $(VAR_DIR)
|
||||||
|
@{ \
|
||||||
|
c=$$(git rev-parse --short=12 HEAD 2>/dev/null || echo unknown); \
|
||||||
|
git diff --quiet HEAD -- 2>/dev/null || c="$$c (+ uncommitted changes)"; \
|
||||||
|
printf '\\newcommand{\\bookcommit}{%s}\n' "$$c"; \
|
||||||
|
printf '\\newcommand{\\bookdate}{%s}\n' "$$(date -u +%Y-%m-%d)"; \
|
||||||
|
printf '\\def\\bookboard{%s}\n' "$(BOARD_NAME)"; \
|
||||||
|
$(if $(BOARD),printf '\\newcommand{\\bookboardappendix}{board-%s}\n' "$(BOARD)";) \
|
||||||
|
} > $@.tmp
|
||||||
|
@cmp -s $@.tmp $@ && rm -f $@.tmp || mv $@.tmp $@
|
||||||
|
|
||||||
|
FORCE:
|
||||||
|
|
||||||
|
TEXINPUTS_BOOK := $(abspath $(VAR_DIR)):$(abspath $(GEN)):$(abspath $(BOOK_DIR)):
|
||||||
|
|
||||||
|
$(PDF): $(BOOK_DIR)/main.tex $(FRAGMENTS) $(GEN)/pandoc-highlighting.tex $(VAR_DIR)/meta.tex | tools
|
||||||
|
@echo " LATEXMK $(BOOK_DIR)/main.tex -> $@"
|
||||||
|
@TEXINPUTS=$(TEXINPUTS_BOOK) $(LATEXMK) -xelatex -interaction=nonstopmode -halt-on-error \
|
||||||
|
-file-line-error -outdir=$(VAR_DIR) $(BOOK_DIR)/main.tex > $(VAR_DIR)/latexmk.log 2>&1 || { \
|
||||||
|
grep -A4 -E '^(.*:[0-9]+:|!)' $(VAR_DIR)/main.log | head -40; \
|
||||||
|
echo "Error: LaTeX failed; full log: $(VAR_DIR)/main.log"; exit 1; }
|
||||||
|
@cp $(VAR_DIR)/main.pdf $@
|
||||||
|
@echo " PDF $@"
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# docs/book/
|
||||||
|
|
||||||
|
`make docs` builds one PDF, `build/docs/LithosAnanke.pdf`, from `main.tex` with xelatex.
|
||||||
|
`make docs TARGET=<board>` builds `build/docs/LithosAnanke-<board>.pdf`: the same book with
|
||||||
|
`boards/<board>/README.md` added as an appendix.
|
||||||
|
|
||||||
|
Tools: `sudo apt-get install -y pandoc latexmk texlive-xetex texlive-latex-extra texlive-pictures texlive-fonts-recommended fonts-dejavu fonts-dejavu-extra`
|
||||||
|
|
||||||
|
Without root, a user-local TeX Live works too (this is how the book was first built):
|
||||||
|
TinyTeX (`curl -sL https://yihui.org/tinytex/install-bin-unix.sh | sh`) plus
|
||||||
|
`tlmgr install latexmk xetex fontspec pgf pgfplots booktabs multirow fancyvrb fvextra lineno upquote ulem enumitem newunicodechar bookmark hyperref geometry xcolor graphics tools etoolbox fancyhdr truncate amsfonts`,
|
||||||
|
and the pandoc release tarball unpacked into `~/.local`.
|
||||||
|
|
||||||
|
The installed DejaVu decides italics: `fonts-dejavu-core` alone has no serif italic, so
|
||||||
|
`main.tex` falls back to a slanted upright face; `fonts-dejavu-extra` gives real italics.
|
||||||
|
|
||||||
|
## How it fits together
|
||||||
|
|
||||||
|
- `main.tex` is the master file. It sets the parts and the chapter order.
|
||||||
|
- Chapters that are still Markdown are listed in `Makefile` (`CHAPTERS`, as `name:source.md`).
|
||||||
|
At build time pandoc converts each one into `build/docs/gen/<name>.tex`, and `main.tex`
|
||||||
|
includes it with `\input{<name>}`. The Markdown stays the source until the chapter is
|
||||||
|
rewritten in LaTeX. At that point the `.tex` moves into this directory and the `CHAPTERS`
|
||||||
|
entry is removed.
|
||||||
|
- `pandoc/highlighting.latex` extracts the code-highlighting macros from the installed pandoc,
|
||||||
|
so the macros and the fragments always come from the same pandoc version.
|
||||||
|
- Two Lua filters run on every chapter. `pandoc/table-widths.lua` gives wide tables
|
||||||
|
proportional wrapping columns, because pandoc's gfm reader leaves column widths unset.
|
||||||
|
`pandoc/code-breaks.lua` lets long inline identifiers and paths break after `_ / . - :`.
|
||||||
|
Code blocks wrap through fvextra (`breaklines`).
|
||||||
|
- `build/docs/<book|board>/meta.tex` is written on every build. It records the commit (and
|
||||||
|
whether there were uncommitted changes), the date, and the board.
|
||||||
|
|
||||||
|
## Rule for data
|
||||||
|
|
||||||
|
Any figure or table that shows measured numbers is generated from the CSV when the book is
|
||||||
|
built. Numbers are never typed in by hand:
|
||||||
|
|
||||||
|
```latex
|
||||||
|
\begin{tikzpicture}
|
||||||
|
\begin{axis}[xlabel=run, ylabel=K]
|
||||||
|
\addplot table[col sep=comma, x=run, y=K]{experiments/<campaign>/results.csv};
|
||||||
|
\end{axis}
|
||||||
|
\end{tikzpicture}
|
||||||
|
\datasource{experiments/<campaign>/results.csv}
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `\pgfplotstabletypeset[col sep=comma]{...}` for tables. `\datasource` prints the CSV path
|
||||||
|
and the commit, so a reader can find the exact file the figure was drawn from. CSV paths are
|
||||||
|
repo-relative, because xelatex runs from the repo root.
|
||||||
|
|
||||||
|
## Older pipelines to fold in or retire
|
||||||
|
|
||||||
|
These still exist and still have their own targets. Each one needs a decision during the
|
||||||
|
curation pass: move it into this book, or retire it.
|
||||||
|
|
||||||
|
| Source | Current target | Produces |
|
||||||
|
|---|---|---|
|
||||||
|
| `docs/formal/vol1-vm-physics`, `vol2-kernel`, `vol3-research` | `make -C docs/formal vols` | three volume PDFs |
|
||||||
|
| `docs/formal/dev-guide`, `user-guide`, `cookbook` | `make -C docs/formal books` | three practitioner PDFs |
|
||||||
|
| `docs/formal/experiments`, `proofs`, `ssrn`, `patent` | `make -C docs/formal standalone` | four standalone PDFs |
|
||||||
|
| Doxygen (`Doxyfile`) | `make -C docs/formal doxygen` | API reference PDF |
|
||||||
|
| `scripts/generate-doxygen-appendix.sh` | `make -f v3/Makefile api-docs` | AsciiDoc API appendix |
|
||||||
|
| `docs/src/internal/formal/*.thy` | `make -f v3/Makefile docs-isabelle` | Isabelle report |
|
||||||
|
| `scripts/asciidoc-to-latex.sh` | `make -f v3/Makefile docs-latex` | `docs/latex/` |
|
||||||
|
| `docs/SSRN_companion/Math_Companion_SSRN.tex` | `make -f v3/Makefile math-companion` | SSRN math companion |
|
||||||
@@ -0,0 +1,161 @@
|
|||||||
|
% docs/book/main.tex -- master file of the single LithosAnanke book.
|
||||||
|
%
|
||||||
|
% Built by `make docs [TARGET=<board>]` (docs/book/Makefile) with xelatex.
|
||||||
|
% Fragments named below (ontology, fabric-0, ...) are generated by pandoc
|
||||||
|
% from the Markdown listed in docs/book/Makefile's CHAPTERS into
|
||||||
|
% build/docs/gen/; meta.tex is generated per build. Neither is committed.
|
||||||
|
\documentclass[11pt,openany]{book}
|
||||||
|
|
||||||
|
\usepackage{amsmath,amssymb}
|
||||||
|
\usepackage{fontspec}
|
||||||
|
% fonts-dejavu-core has no serif/sans italics (fonts-dejavu-extra does); when a
|
||||||
|
% shape is missing, slant the upright one rather than silently drop emphasis.
|
||||||
|
\setmainfont{DejaVu Serif}[AutoFakeSlant=0.2]
|
||||||
|
\setsansfont{DejaVu Sans}[AutoFakeSlant=0.2]
|
||||||
|
\setmonofont{DejaVu Sans Mono}[Scale=0.85]
|
||||||
|
\newfontfamily\symbolfont{DejaVu Sans}
|
||||||
|
|
||||||
|
\usepackage[letterpaper,margin=1in]{geometry}
|
||||||
|
\usepackage{xcolor}
|
||||||
|
\usepackage{graphicx}
|
||||||
|
\usepackage{longtable,booktabs,array,calc,multirow}
|
||||||
|
\usepackage{fancyvrb}
|
||||||
|
\usepackage[normalem]{ulem}
|
||||||
|
\usepackage{enumitem}
|
||||||
|
\usepackage{newunicodechar}
|
||||||
|
\usepackage{pgfplots}
|
||||||
|
\usepackage{pgfplotstable}
|
||||||
|
\pgfplotsset{compat=1.18}
|
||||||
|
\usepackage[hidelinks]{hyperref}
|
||||||
|
\usepackage{bookmark}
|
||||||
|
|
||||||
|
% --- what pandoc's LaTeX fragments expect (normally from its own template)
|
||||||
|
\providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
||||||
|
\providecommand{\pandocbounded}[1]{#1}
|
||||||
|
\providecommand{\st}[1]{\sout{#1}}
|
||||||
|
\newcounter{none} % pandoc: {\def\LTcaptype{none} ...} marks unnumbered tables
|
||||||
|
\usepackage{etoolbox}
|
||||||
|
\makeatletter
|
||||||
|
\def\fnum@table{\tablename~\thetable}
|
||||||
|
\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{}
|
||||||
|
\makeatother
|
||||||
|
\usepackage{fvextra}
|
||||||
|
\input{pandoc-highlighting}
|
||||||
|
% Code and diagrams are wider than the page in places: wrap, never overflow.
|
||||||
|
\RecustomVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\},breaklines,breakanywhere,fontsize=\small}
|
||||||
|
\RecustomVerbatimEnvironment{verbatim}{Verbatim}{breaklines,breakanywhere,fontsize=\small}
|
||||||
|
\setlistdepth{9}
|
||||||
|
\renewlist{itemize}{itemize}{9}
|
||||||
|
\setlist[itemize]{label=\textbullet}
|
||||||
|
\renewlist{enumerate}{enumerate}{9}
|
||||||
|
\setlist[enumerate]{label=\arabic*.}
|
||||||
|
% Running heads: chapter on the left page, section on the right, both cut to
|
||||||
|
% the page width (several design-record titles are a full sentence long).
|
||||||
|
\usepackage{fancyhdr}
|
||||||
|
\usepackage[fit]{truncate}
|
||||||
|
\pagestyle{fancy}
|
||||||
|
\fancyhf{}
|
||||||
|
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
|
||||||
|
\renewcommand{\sectionmark}[1]{\markright{#1}}
|
||||||
|
\fancyhead[LE]{\small\truncate{\dimexpr\headwidth-3em}{\leftmark}}
|
||||||
|
\fancyhead[RO]{\small\truncate{\dimexpr\headwidth-3em}{\rightmark}}
|
||||||
|
\fancyhead[RE,LO]{\small\thepage}
|
||||||
|
\renewcommand{\headrulewidth}{0.4pt}
|
||||||
|
\setlength{\headheight}{14pt}
|
||||||
|
\fancypagestyle{plain}{\fancyhf{}\fancyfoot[C]{\small\thepage}\renewcommand{\headrulewidth}{0pt}}
|
||||||
|
\setlength{\emergencystretch}{3em}
|
||||||
|
\setlength{\parindent}{0pt}
|
||||||
|
\setlength{\parskip}{0.5em}
|
||||||
|
|
||||||
|
% --- glyphs DejaVu Serif lacks: the status marks used across the docs
|
||||||
|
\newunicodechar{✅}{{\symbolfont ✔}}
|
||||||
|
\newunicodechar{✓}{{\symbolfont ✓}}
|
||||||
|
\newunicodechar{❌}{{\symbolfont ✘}}
|
||||||
|
\newunicodechar{✗}{{\symbolfont ✗}}
|
||||||
|
\newunicodechar{⬜}{{\symbolfont ☐}}
|
||||||
|
\newunicodechar{⭐}{{\symbolfont ★}}
|
||||||
|
\newunicodechar{🔶}{{\symbolfont ◆}}
|
||||||
|
\newunicodechar{⚠}{{\symbolfont ⚠}}
|
||||||
|
\newunicodechar{📋}{}
|
||||||
|
\newunicodechar{🐛}{[bug]}
|
||||||
|
\newunicodechar{🎯}{[goal]}
|
||||||
|
\newunicodechar{🟡}{{\symbolfont ●}}
|
||||||
|
\newunicodechar{📍}{{\symbolfont ▸}}
|
||||||
|
\newunicodechar{🔓}{[unlocked]}
|
||||||
|
\newunicodechar{❓}{?}
|
||||||
|
\newunicodechar{⟺}{\ensuremath{\Longleftrightarrow}}
|
||||||
|
\newunicodechar{⋯}{\ensuremath{\cdots}}
|
||||||
|
\newunicodechar{^^^^fe0f}{}
|
||||||
|
|
||||||
|
% --- the documents number their own sections (§III.1, D-3, ...)
|
||||||
|
\setcounter{secnumdepth}{0}
|
||||||
|
\setcounter{tocdepth}{1}
|
||||||
|
|
||||||
|
\input{meta}
|
||||||
|
|
||||||
|
% \datasource{path/to/data.csv}: cite the data behind a figure or table.
|
||||||
|
% Every figure or table of measured numbers reads its CSV at build time
|
||||||
|
% (\addplot table / \pgfplotstabletypeset) and is followed by this line, so
|
||||||
|
% the reader can find the exact file at the exact commit.
|
||||||
|
\newcommand{\datasource}[1]{%
|
||||||
|
\par{\small Data: \texttt{\detokenize{#1}} at commit \texttt{\bookcommit}.}\par}
|
||||||
|
|
||||||
|
\title{LithosAnanke and StarForth}
|
||||||
|
\author{}
|
||||||
|
\date{Built \bookdate{} from commit \texttt{\bookcommit}%
|
||||||
|
\ifx\bookboard\empty\else\\Board appendix: \bookboard\fi}
|
||||||
|
|
||||||
|
\begin{document}
|
||||||
|
\frontmatter
|
||||||
|
\maketitle
|
||||||
|
\tableofcontents
|
||||||
|
|
||||||
|
\chapter{About this book}
|
||||||
|
This book is generated from the repository by \texttt{make docs}. Each
|
||||||
|
chapter below is still maintained as the Markdown file named in the table and
|
||||||
|
converted at build time; a chapter moves into LaTeX source when it is
|
||||||
|
rewritten. Part~III is the design record: those documents are archival and
|
||||||
|
are reproduced as written, including their struck-through corrections.
|
||||||
|
|
||||||
|
\begin{longtable}{@{}ll@{}}
|
||||||
|
\toprule
|
||||||
|
Chapter & Source \\
|
||||||
|
\midrule
|
||||||
|
\endhead
|
||||||
|
Ontology & \texttt{docs/reference/ONTOLOGY.md} \\
|
||||||
|
Roadmap & \texttt{docs/working/archive/superseded/2025-12-14-starforth-roadmap.md} \\
|
||||||
|
Boot targets & \texttt{boards/README.md} \\
|
||||||
|
v4 justification & \texttt{docs/v4.0.0/JUSTIFICATION.md} \\
|
||||||
|
v4 decomposition & \texttt{docs/v4.0.0/DECOMPOSITION.md} \\
|
||||||
|
FABRIC-0 \dots{} FABRIC-4 & \texttt{docs/fabric/FABRIC-*.md} \\
|
||||||
|
Board appendix (\texttt{TARGET=}) & \texttt{boards/<board>/README.md} \\
|
||||||
|
\bottomrule
|
||||||
|
\end{longtable}
|
||||||
|
|
||||||
|
\mainmatter
|
||||||
|
|
||||||
|
\part{The system}
|
||||||
|
\input{ontology}
|
||||||
|
\input{roadmap}
|
||||||
|
\input{boards}
|
||||||
|
|
||||||
|
\part{StarForth v4}
|
||||||
|
\input{justification}
|
||||||
|
\input{decomposition}
|
||||||
|
|
||||||
|
\part{Design record (FABRIC series)}
|
||||||
|
\input{fabric-0}
|
||||||
|
\input{fabric-1}
|
||||||
|
\input{fabric-2}
|
||||||
|
\input{fabric-3}
|
||||||
|
\input{fabric-3-5}
|
||||||
|
\input{fabric-3-6}
|
||||||
|
\input{fabric-3-7}
|
||||||
|
\input{fabric-4}
|
||||||
|
|
||||||
|
\ifdefined\bookboardappendix
|
||||||
|
\appendix
|
||||||
|
\input{\bookboardappendix}
|
||||||
|
\fi
|
||||||
|
|
||||||
|
\end{document}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
-- docs/book/pandoc/code-breaks.lua
|
||||||
|
--
|
||||||
|
-- Inline code in the design record is full of long identifiers and paths
|
||||||
|
-- (g_wirebind_attached_username, kernel/src/arch/riscv64/...), which LaTeX
|
||||||
|
-- cannot break, so they run into the margin. Emit inline code as \texttt
|
||||||
|
-- ourselves, escaped the same way pandoc does, with a break opportunity
|
||||||
|
-- after each separator character.
|
||||||
|
|
||||||
|
local BREAK_AFTER = { ["_"] = true, ["/"] = true, ["."] = true, ["-"] = true,
|
||||||
|
[":"] = true, [","] = true, ["("] = true, ["="] = true }
|
||||||
|
|
||||||
|
local ESCAPE = {
|
||||||
|
["\\"] = "\\textbackslash{}", ["{"] = "\\{", ["}"] = "\\}",
|
||||||
|
["$"] = "\\$", ["&"] = "\\&", ["#"] = "\\#", ["%"] = "\\%", ["_"] = "\\_",
|
||||||
|
["^"] = "\\textasciicircum{}", ["~"] = "\\textasciitilde{}",
|
||||||
|
["'"] = "\\textquotesingle{}", ["`"] = "\\textasciigrave{}",
|
||||||
|
[" "] = "\\ ",
|
||||||
|
}
|
||||||
|
|
||||||
|
function Code(el)
|
||||||
|
if not FORMAT:match("latex") then return nil end
|
||||||
|
local out = {}
|
||||||
|
for _, cp in utf8.codes(el.text) do
|
||||||
|
local ch = utf8.char(cp)
|
||||||
|
out[#out + 1] = ESCAPE[ch] or ch
|
||||||
|
if BREAK_AFTER[ch] then out[#out + 1] = "\\allowbreak{}" end
|
||||||
|
end
|
||||||
|
return pandoc.RawInline("latex", "\\texttt{" .. table.concat(out) .. "}")
|
||||||
|
end
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
$if(highlighting-macros)$
|
||||||
|
$highlighting-macros$
|
||||||
|
$endif$
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
-- docs/book/pandoc/table-widths.lua
|
||||||
|
--
|
||||||
|
-- pandoc's gfm reader leaves every column width unset, so the LaTeX writer
|
||||||
|
-- emits `l` columns and a table with long cells runs off the page. For any
|
||||||
|
-- table wider than WIDE characters, give each column a width proportional
|
||||||
|
-- to its longest cell (clamped to [MIN_COL, MAX_COL] characters); the
|
||||||
|
-- writer then emits wrapping p{} columns that together fill \linewidth.
|
||||||
|
|
||||||
|
local WIDE = 72
|
||||||
|
local MIN_COL = 6
|
||||||
|
local MAX_COL = 60
|
||||||
|
|
||||||
|
local stringify = pandoc.utils.stringify
|
||||||
|
|
||||||
|
local function measure(rows, widths)
|
||||||
|
for _, row in ipairs(rows) do
|
||||||
|
local col = 1
|
||||||
|
for _, cell in ipairs(row.cells) do
|
||||||
|
local span = cell.col_span or 1
|
||||||
|
local len = utf8.len(stringify(cell.contents)) or #stringify(cell.contents)
|
||||||
|
local per = len / span
|
||||||
|
for c = col, col + span - 1 do
|
||||||
|
if per > (widths[c] or 0) then widths[c] = per end
|
||||||
|
end
|
||||||
|
col = col + span
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function Table(tbl)
|
||||||
|
local n = #tbl.colspecs
|
||||||
|
local widths = {}
|
||||||
|
for i = 1, n do widths[i] = 0 end
|
||||||
|
|
||||||
|
measure(tbl.head.rows, widths)
|
||||||
|
for _, body in ipairs(tbl.bodies) do
|
||||||
|
measure(body.head, widths)
|
||||||
|
measure(body.body, widths)
|
||||||
|
end
|
||||||
|
measure(tbl.foot.rows, widths)
|
||||||
|
|
||||||
|
local total = 0
|
||||||
|
for i = 1, n do total = total + widths[i] end
|
||||||
|
if total <= WIDE then return nil end
|
||||||
|
|
||||||
|
local sum = 0
|
||||||
|
for i = 1, n do
|
||||||
|
widths[i] = math.max(MIN_COL, math.min(MAX_COL, widths[i]))
|
||||||
|
sum = sum + widths[i]
|
||||||
|
end
|
||||||
|
for i = 1, n do
|
||||||
|
tbl.colspecs[i] = { tbl.colspecs[i][1], widths[i] / sum }
|
||||||
|
end
|
||||||
|
return tbl
|
||||||
|
end
|
||||||
@@ -34,7 +34,7 @@ an unrelated structure. The document has been swept; "arena" now survives only i
|
|||||||
quotes that reproduce an earlier section verbatim, and in §12's preserved question list,
|
quotes that reproduce an earlier section verbatim, and in §12's preserved question list,
|
||||||
which several sections quote.
|
which several sections quote.
|
||||||
|
|
||||||
**On `docs/lithosananke/ROADMAP.md`.** As of 2026-08-11, Captain Bob stated this document
|
**On `docs/reference/ROADMAP.md`.** As of 2026-08-11, Captain Bob stated this document
|
||||||
superseded ROADMAP.md entirely. That still holds, transitively, through `FABRIC-1.md` now.
|
superseded ROADMAP.md entirely. That still holds, transitively, through `FABRIC-1.md` now.
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -4425,7 +4425,7 @@ document and committing that amendment as its own item.*
|
|||||||
> `#ifdef __STARKERNEL__`, or elsewhere is an open question for that later item, not
|
> `#ifdef __STARKERNEL__`, or elsewhere is an open question for that later item, not
|
||||||
> decided here.
|
> decided here.
|
||||||
>
|
>
|
||||||
> **Now scoped, 2026-08-11 — resolved in `docs/lithosananke/ROADMAP.md`'s M8 section,
|
> **Now scoped, 2026-08-11 — resolved in `docs/reference/ROADMAP.md`'s M8 section,
|
||||||
> not here.** M8 is "tracked outside Stadium" per §27.5, and its console-facing pieces
|
> not here.** M8 is "tracked outside Stadium" per §27.5, and its console-facing pieces
|
||||||
> don't change this document's own scope, so the resolution lives there rather than as
|
> don't change this document's own scope, so the resolution lives there rather than as
|
||||||
> new 4.3.x items. Short answer to the open question above: `io_words.c` under
|
> new 4.3.x items. Short answer to the open question above: `io_words.c` under
|
||||||
@@ -4999,7 +4999,7 @@ document and committing that amendment as its own item.*
|
|||||||
> decision #4 -- both text paths coexist. Per this item's own posture (matching 4.3.6g),
|
> decision #4 -- both text paths coexist. Per this item's own posture (matching 4.3.6g),
|
||||||
> stopping here before scoping REPL wiring (M8).
|
> stopping here before scoping REPL wiring (M8).
|
||||||
>
|
>
|
||||||
> **M8 scoped 2026-08-11 in `docs/lithosananke/ROADMAP.md`, not here** -- per §27.5, M8 is
|
> **M8 scoped 2026-08-11 in `docs/reference/ROADMAP.md`, not here** -- per §27.5, M8 is
|
||||||
> tracked outside Stadium, so its design decisions live in that roadmap's own M8 section
|
> tracked outside Stadium, so its design decisions live in that roadmap's own M8 section
|
||||||
> rather than as new 4.3.x items. Key finding from that scoping pass, worth recording in
|
> rather than as new 4.3.x items. Key finding from that scoping pass, worth recording in
|
||||||
> this document too since it bears on §27.6's CANVAS/REPL-strip framing: the REPL's
|
> this document too since it bears on §27.6's CANVAS/REPL-strip framing: the REPL's
|
||||||
@@ -5939,7 +5939,7 @@ document and committing that amendment as its own item.*
|
|||||||
exactly that — no scancode-to-ASCII translation table exists, and no code path connects the
|
exactly that — no scancode-to-ASCII translation table exists, and no code path connects the
|
||||||
keyboard ring buffer to the REPL's line-read loop. The hardware/interrupt layer is done; the
|
keyboard ring buffer to the REPL's line-read loop. The hardware/interrupt layer is done; the
|
||||||
bridge from that layer into text the REPL can act on is not. This is the same conclusion
|
bridge from that layer into text the REPL can act on is not. This is the same conclusion
|
||||||
`docs/lithosananke/ROADMAP.md`'s M8 section and this document's own 4.3.5-series entries
|
`docs/reference/ROADMAP.md`'s M8 section and this document's own 4.3.5-series entries
|
||||||
already recorded ("no keyboard path into the VM on any architecture, confirmed by reading
|
already recorded ("no keyboard path into the VM on any architecture, confirmed by reading
|
||||||
the code") — restated here specifically so 4.4u's TAB-toggle has an accurate prerequisite,
|
the code") — restated here specifically so 4.4u's TAB-toggle has an accurate prerequisite,
|
||||||
not because the earlier conclusion was in doubt.
|
not because the earlier conclusion was in doubt.
|
||||||
@@ -5957,7 +5957,7 @@ document and committing that amendment as its own item.*
|
|||||||
keyboard event injected via QEMU's own input-send-event monitor command (not socat/serial),
|
keyboard event injected via QEMU's own input-send-event monitor command (not socat/serial),
|
||||||
screendump showing the typed text landed in the REPL strip; three-arch QEMU boot + logs per
|
screendump showing the typed text landed in the REPL strip; three-arch QEMU boot + logs per
|
||||||
CLAUDE.md.
|
CLAUDE.md.
|
||||||
*Refs:* §27.8, 4.3.5 series, 4.4r, 4.4u, `docs/lithosananke/ROADMAP.md` M8 section.
|
*Refs:* §27.8, 4.3.5 series, 4.4r, 4.4u, `docs/reference/ROADMAP.md` M8 section.
|
||||||
|
|
||||||
> **DONE 2026-08-12.** Reused item 4.3.5f's `KEY-EVENT` convergence work rather than building
|
> **DONE 2026-08-12.** Reused item 4.3.5f's `KEY-EVENT` convergence work rather than building
|
||||||
> two per-arch tables from scratch (`kbw_key_event`'s FORTH-word logic was refactored into a
|
> two per-arch tables from scratch (`kbw_key_event`'s FORTH-word logic was refactored into a
|
||||||
@@ -7549,7 +7549,7 @@ direct-arena reference — 4.3.7b's own call) behind that lookup.
|
|||||||
|
|
||||||
### 27.8 REPL: prompt, text path, CANVAS geometry (4.4–4.4s)
|
### 27.8 REPL: prompt, text path, CANVAS geometry (4.4–4.4s)
|
||||||
|
|
||||||
Scoped 2026-08-11, in conversation with Captain Bob, replacing `docs/lithosananke/ROADMAP.md`'s
|
Scoped 2026-08-11, in conversation with Captain Bob, replacing `docs/reference/ROADMAP.md`'s
|
||||||
M8 section entirely (marked OBSOLETE there, kept for history only). Original visual reference:
|
M8 section entirely (marked OBSOLETE there, kept for history only). Original visual reference:
|
||||||
[`repl-mockup.png`](repl-mockup.png).
|
[`repl-mockup.png`](repl-mockup.png).
|
||||||
|
|
||||||
@@ -1425,14 +1425,14 @@ evidence nothing regressed.
|
|||||||
`docs/CLAUDE.md`'s own correction, made in the same pass, for the doc-toolchain findings —
|
`docs/CLAUDE.md`'s own correction, made in the same pass, for the doc-toolchain findings —
|
||||||
`doxygen` installed, `docs/Makefile` pointer corrected — and this section's own proof-count
|
`doxygen` installed, `docs/Makefile` pointer corrected — and this section's own proof-count
|
||||||
reconciliation above for the Isabelle/HOL findings):
|
reconciliation above for the Isabelle/HOL findings):
|
||||||
- [ ] `docs/lithosananke/ROADMAP.md` and `M7.1.md` — stale `Branch: lithosananke` (no such
|
- [ ] `docs/reference/ROADMAP.md` and `M7.1.md` — stale `Branch: lithosananke` (no such
|
||||||
branch exists post-split), `M7.1.md`'s "Status: Design Complete" (shipped and live, not
|
branch exists post-split), `M7.1.md`'s "Status: Design Complete" (shipped and live, not
|
||||||
just designed), `ROADMAP.md`'s self-contradiction (M8 marked OBSOLETE in one place,
|
just designed), `ROADMAP.md`'s self-contradiction (M8 marked OBSOLETE in one place,
|
||||||
still a live success criterion in another), and its stale "AHCI driver" claim for M9
|
still a live success criterion in another), and its stale "AHCI driver" claim for M9
|
||||||
(real implementation is `virtio_blk.c`) — not fixed this pass, flagged.
|
(real implementation is `virtio_blk.c`) — not fixed this pass, flagged.
|
||||||
- [ ] Top-level `ROADMAP.md` (StarForth-era, "Phase 0 Complete... Phase 1 Starting," dated
|
- [ ] Top-level `ROADMAP.md` (StarForth-era, "Phase 0 Complete... Phase 1 Starting," dated
|
||||||
2025-12-14) — badly stale, no historical/superseded banner to warn a reader. Not fixed.
|
2025-12-14) — badly stale, no historical/superseded banner to warn a reader. Not fixed.
|
||||||
- [ ] `docs/03-architecture/word-acl/DESIGN.md` says ACL Phase 7 (LithosAnanke kernel parity)
|
- [ ] `docs/reference/word-acl/DESIGN.md` says ACL Phase 7 (LithosAnanke kernel parity)
|
||||||
is still "remaining" — direct contradiction with `.claude/CLAUDE.md`, which states
|
is still "remaining" — direct contradiction with `.claude/CLAUDE.md`, which states
|
||||||
Phase 7 is independently verified complete. Not fixed.
|
Phase 7 is independently verified complete. Not fixed.
|
||||||
- [ ] `VM-FLEET-ATTRACTOR-DESIGN-20260705.md` claims `doe-campaign.4th` is "broken and being
|
- [ ] `VM-FLEET-ATTRACTOR-DESIGN-20260705.md` claims `doe-campaign.4th` is "broken and being
|
||||||
@@ -102,7 +102,7 @@ decisions get added here, not to `FABRIC-1.md`. Follow the same discipline `FABR
|
|||||||
### From FABRIC-1.md §J — Maintainability sweep (2026-08-18)
|
### From FABRIC-1.md §J — Maintainability sweep (2026-08-18)
|
||||||
|
|
||||||
- [x] **Fixed 2026-08-26 (commit `cbe7b49`), stale carry-forward closed 2026-08-28.**
|
- [x] **Fixed 2026-08-26 (commit `cbe7b49`), stale carry-forward closed 2026-08-28.**
|
||||||
`docs/lithosananke/ROADMAP.md` and `M7.1.md` — stale `Branch: lithosananke` (no such
|
`docs/reference/ROADMAP.md` and `M7.1.md` — stale `Branch: lithosananke` (no such
|
||||||
branch exists post-split), `M7.1.md`'s "Status: Design Complete" (shipped and live, not
|
branch exists post-split), `M7.1.md`'s "Status: Design Complete" (shipped and live, not
|
||||||
just designed), `ROADMAP.md`'s self-contradiction (M8 marked OBSOLETE in one place, still
|
just designed), `ROADMAP.md`'s self-contradiction (M8 marked OBSOLETE in one place, still
|
||||||
a live success criterion in another), and its stale "AHCI driver" claim for M9 (real
|
a live success criterion in another), and its stale "AHCI driver" claim for M9 (real
|
||||||
@@ -112,10 +112,10 @@ decisions get added here, not to `FABRIC-1.md`. Follow the same discipline `FABR
|
|||||||
- [x] **Fixed 2026-08-26 (commit `cbe7b49`), stale carry-forward closed 2026-08-28.** Top-level
|
- [x] **Fixed 2026-08-26 (commit `cbe7b49`), stale carry-forward closed 2026-08-28.** Top-level
|
||||||
`ROADMAP.md` (StarForth-era, "Phase 0 Complete... Phase 1 Starting," dated
|
`ROADMAP.md` (StarForth-era, "Phase 0 Complete... Phase 1 Starting," dated
|
||||||
2025-12-14) — marked OBSOLETE by `cbe7b49` (Captain Bob's call: more than stale), pointing
|
2025-12-14) — marked OBSOLETE by `cbe7b49` (Captain Bob's call: more than stale), pointing
|
||||||
to `docs/lithosananke/ROADMAP.md` and `FABRIC*.md` for current status.
|
to `docs/reference/ROADMAP.md` and `FABRIC*.md` for current status.
|
||||||
|
|
||||||
- [x] **Fixed 2026-08-26 (commit `cbe7b49`), stale carry-forward closed 2026-08-28.**
|
- [x] **Fixed 2026-08-26 (commit `cbe7b49`), stale carry-forward closed 2026-08-28.**
|
||||||
`docs/03-architecture/word-acl/DESIGN.md` says ACL Phase 7 (LithosAnanke kernel parity)
|
`docs/reference/word-acl/DESIGN.md` says ACL Phase 7 (LithosAnanke kernel parity)
|
||||||
is still "remaining" — direct contradiction with `.claude/CLAUDE.md`, which states Phase 7
|
is still "remaining" — direct contradiction with `.claude/CLAUDE.md`, which states Phase 7
|
||||||
is independently verified complete. Phase 7 restated as independently-verified complete and
|
is independently verified complete. Phase 7 restated as independently-verified complete and
|
||||||
the stale lithosananke-branch-parity framing removed by `cbe7b49`.
|
the stale lithosananke-branch-parity framing removed by `cbe7b49`.
|
||||||
@@ -3434,7 +3434,7 @@ hardware), the **release-gate recommendation**, and the **punch lists to complet
|
|||||||
each.
|
each.
|
||||||
|
|
||||||
**The versioning split, decided 2026-08-28 — now standing policy, see
|
**The versioning split, decided 2026-08-28 — now standing policy, see
|
||||||
`docs/lithosananke/ROADMAP.md` "Release Versioning Policy" for the authoritative form.**
|
`docs/reference/ROADMAP.md` "Release Versioning Policy" for the authoritative form.**
|
||||||
v2.0.0 is the **QEMU release** — the point
|
v2.0.0 is the **QEMU release** — the point
|
||||||
where the QEMU-only story is complete and defensible on its own terms. v2.5.0 is the
|
where the QEMU-only story is complete and defensible on its own terms. v2.5.0 is the
|
||||||
**real-hardware release** — the point where the same story transfers to bare metal on a real
|
**real-hardware release** — the point where the same story transfers to bare metal on a real
|
||||||
@@ -2489,13 +2489,13 @@ describe are stripped** (§XXII.5), so the manifest never describes a file that
|
|||||||
|
|
||||||
**Superseded subsystem docs** — `.claude/TRIPOD.md`, `HERMES.md`, `ARTEMIS.md`, `CONSOLE.md`
|
**Superseded subsystem docs** — `.claude/TRIPOD.md`, `HERMES.md`, `ARTEMIS.md`, `CONSOLE.md`
|
||||||
already carry superseded headers, but after this reshuffle they describe a fleet that no longer
|
already carry superseded headers, but after this reshuffle they describe a fleet that no longer
|
||||||
exists. Same for `docs/03-architecture/tripod/{TRIPOD,HERMES,ARTEMIS,README}.md`, which
|
exists. Same for `docs/working/archive/superseded/2026-08-tripod/{TRIPOD,HERMES,ARTEMIS,README}.md`, which
|
||||||
`.claude/CLAUDE.md` still lists as current for Tripod. **Decide deliberately: update, or mark
|
`.claude/CLAUDE.md` still lists as current for Tripod. **Decide deliberately: update, or mark
|
||||||
archival and point at `FABRIC-3.5.md`.** Not a silent edit either way.
|
archival and point at `FABRIC-3.5.md`.** Not a silent edit either way.
|
||||||
|
|
||||||
**Also in scope:** `capsules/README.md` (lists `hermes/init.4th` as a live personality),
|
**Also in scope:** `capsules/README.md` (lists `hermes/init.4th` as a live personality),
|
||||||
`ROADMAP.md` / `docs/lithosananke/ROADMAP.md`, `CHANGELOG.md`, `README.md`,
|
`ROADMAP.md` / `docs/reference/ROADMAP.md`, `CHANGELOG.md`, `README.md`,
|
||||||
`docs/lithosananke/SYSTEM_ARCHITECTURE.md` and `M7.1.md`, and `proof/COVERAGE.md` (after the
|
`docs/working/archive/historical/2026-01-27-system-architecture-draft.md` and `M7.1.md`, and `proof/COVERAGE.md` (after the
|
||||||
§XXV pass — and per §XXV.3 its *boundary* statement matters more than its file count).
|
§XXV pass — and per §XXV.3 its *boundary* statement matters more than its file count).
|
||||||
`capsules/BLOCK_MAP.md` is a generated artifact; regenerate, don't hand-edit.
|
`capsules/BLOCK_MAP.md` is a generated artifact; regenerate, don't hand-edit.
|
||||||
|
|
||||||
@@ -2705,7 +2705,7 @@ the version number (§XXVI.3).** No code is authorized.
|
|||||||
table in `Makefile.starkernel` itself (lines ~74–82), which is more specific:
|
table in `Makefile.starkernel` itself (lines ~74–82), which is more specific:
|
||||||
|
|
||||||
```
|
```
|
||||||
# Roadmap (per docs/lithosananke/ROADMAP.md "Release Versioning Policy" and
|
# Roadmap (per docs/reference/ROADMAP.md "Release Versioning Policy" and
|
||||||
# FABRIC-2.md §G — X.0.0 = QEMU release, X.5.0 = hardware bare-metal release):
|
# FABRIC-2.md §G — X.0.0 = QEMU release, X.5.0 = hardware bare-metal release):
|
||||||
# v1.0.x — serial-only production (released)
|
# v1.0.x — serial-only production (released)
|
||||||
# v1.5.x — framebuffer VT100 terminal/console milestone (released)
|
# v1.5.x — framebuffer VT100 terminal/console milestone (released)
|
||||||
@@ -2736,7 +2736,7 @@ will step 2.0.1 → 2.2.0 with a released `v2.1.0` tag sitting in a gap the tabl
|
|||||||
mention. **Add the line wherever the table lives:**
|
mention. **Add the line wherever the table lives:**
|
||||||
|
|
||||||
1. `Makefile.starkernel` (the copy above, beside the `LITHOS_VERSION` edit itself).
|
1. `Makefile.starkernel` (the copy above, beside the `LITHOS_VERSION` edit itself).
|
||||||
2. `docs/lithosananke/ROADMAP.md`, "Release Versioning Policy" — the comment names it as the
|
2. `docs/reference/ROADMAP.md`, "Release Versioning Policy" — the comment names it as the
|
||||||
upstream source.
|
upstream source.
|
||||||
3. `FABRIC-2.md` §G is the origin of the scheme but is **CLOSED/ARCHIVAL** — **cite it, do not
|
3. `FABRIC-2.md` §G is the origin of the scheme but is **CLOSED/ARCHIVAL** — **cite it, do not
|
||||||
edit it.** Amending a closed document to match a later decision is exactly what this series'
|
edit it.** Amending a closed document to match a later decision is exactly what this series'
|
||||||
@@ -3011,7 +3011,7 @@ removed 2026-08-15 as non-functional and must not be resurrected.
|
|||||||
- ✅ **Versioning policy — CLOSED** (§XXX). All three §XXIX.3 conflicts resolved; LTS criteria
|
- ✅ **Versioning policy — CLOSED** (§XXX). All three §XXIX.3 conflicts resolved; LTS criteria
|
||||||
ratified; engine `VERSION` closed as a rule.
|
ratified; engine `VERSION` closed as a rule.
|
||||||
- ✅ **This release is `2.1.0`** (§XXVIII), even major, working line.
|
- ✅ **This release is `2.1.0`** (§XXVIII), even major, working line.
|
||||||
- ⬜ **Carry §XXX.1–XXX.6 into `Makefile.starkernel` and `docs/lithosananke/ROADMAP.md`**
|
- ⬜ **Carry §XXX.1–XXX.6 into `Makefile.starkernel` and `docs/reference/ROADMAP.md`**
|
||||||
(§XXVIII.2), replacing the old roadmap table. `FABRIC-2.md` §G is cited, never edited.
|
(§XXVIII.2), replacing the old roadmap table. `FABRIC-2.md` §G is cited, never edited.
|
||||||
- ⬜ Engine `VERSION` applied at tag time per §XXX.6's rule.
|
- ⬜ Engine `VERSION` applied at tag time per §XXX.6's rule.
|
||||||
|
|
||||||
@@ -1484,7 +1484,7 @@ opposite of what per-task commits are for. Tasks 5.5–5.7 return to one-commit-
|
|||||||
`PLOT`/`FB-*` relocated to Hestia; no FORTH-79 word semantics changed). The stale
|
`PLOT`/`FB-*` relocated to Hestia; no FORTH-79 word semantics changed). The stale
|
||||||
version-comment block in `Makefile.starkernel` (which still said "even major = LTS" —
|
version-comment block in `Makefile.starkernel` (which still said "even major = LTS" —
|
||||||
backwards relative to the ratified §XXX.1 odd/even rule — and had no `v2.1.0` entry)
|
backwards relative to the ratified §XXX.1 odd/even rule — and had no `v2.1.0` entry)
|
||||||
replaced with the real ladder. `docs/lithosananke/ROADMAP.md`'s own "Release Versioning
|
replaced with the real ladder. `docs/reference/ROADMAP.md`'s own "Release Versioning
|
||||||
Policy" section (the second of the two live places) was still the full retired
|
Policy" section (the second of the two live places) was still the full retired
|
||||||
2026-08-28 policy, not just a stale table — replaced with the ratified §XXX policy text,
|
2026-08-28 policy, not just a stale table — replaced with the ratified §XXX policy text,
|
||||||
the old text kept struck-through in a `<details>` block for traceability, and the
|
the old text kept struck-through in a `<details>` block for traceability, and the
|
||||||
@@ -1,6 +1,18 @@
|
|||||||
# FABRIC-3.7.md — Phase 8 PKI: the elevation entrypoint
|
# FABRIC-3.7.md — Phase 8 PKI: the elevation entrypoint
|
||||||
|
|
||||||
**Status: OPEN — design only, no code written or authorized.**
|
**Status: CLOSED 2026-10-14 — not needed; elevation removed, not built.** Captain Bob, asked
|
||||||
|
"is it even a necessary capability?": privilege comes from the drive (Zuse's drive, or the
|
||||||
|
personality an identity is minted with), so a runtime request-and-grant channel only adds attack
|
||||||
|
surface — and the old one was a live hole: `KH-ELEVATE-SEND` let any identity have arbitrary
|
||||||
|
FORTH run as Zuse. `ELEVATE-GRANT` granted automatically on eligibility-list membership (no
|
||||||
|
human approves), into Hera's own dictionary (never the requester's), and could never reach a
|
||||||
|
FORTH-79-locked identity's words (pinned, and pins are one-way). Removed: `KH-ELEVATE-SEND`,
|
||||||
|
message type 8, `zuse-eligibility.4th`, `ZUSE-ELIGIBLE?`/`ZUSE-ELIGIBILITY-ADD`/
|
||||||
|
`ELEVATE-PUBKEY-UNPACK`, the eligibility list itself and Part B's gate in `zuse.4th`;
|
||||||
|
`devblock_from_top` 1–63 on Artemis's disk stay reserved, unused (his ruling). See
|
||||||
|
`FABRIC-3.md` §XXXVII. Everything below is kept as the record of the design.
|
||||||
|
|
||||||
|
**Former status: OPEN — design only, no code written or authorized.**
|
||||||
|
|
||||||
**CORRECTION (2026-09-22, before any code was written against this document): §2's central
|
**CORRECTION (2026-09-22, before any code was written against this document): §2's central
|
||||||
claim — that the old `SEND-ELEVATE-REQUEST` passed a raw cross-VM address into `ELEVATE-GRANT`'s
|
claim — that the old `SEND-ELEVATE-REQUEST` passed a raw cross-VM address into `ELEVATE-GRANT`'s
|
||||||
@@ -2461,6 +2461,29 @@ the existing xHCI multi-device history (§VII, and the 2026-09-05/06/07 fixes re
|
|||||||
-- possibly a recurrence or a related gap in the same per-slot attach-pending scan, given the
|
-- possibly a recurrence or a related gap in the same per-slot attach-pending scan, given the
|
||||||
similar shape ("several ports become pending at once, only some get serviced").
|
similar shape ("several ports become pending at once, only some get serviced").
|
||||||
|
|
||||||
|
**No longer reproduces, 2026-10-14 -- checked on all three ISAs, closed.** Both reproductions
|
||||||
|
above were rerun against a freshly minted, matched set: a scratch `artemis.img` and Zuse drive,
|
||||||
|
and five identity drives (`00`-`04`) minted at a live `zuse@Hera` prompt by `MINT`, one hot-plug
|
||||||
|
at a time (`logs/20261014-082526`). Not against the committed images: every image under
|
||||||
|
`disk/thumbdrives/`, and `disk/artemis.img`, is all zeros since `e56974e0` bleached them ahead of
|
||||||
|
§XXXV.6's re-mint, which has not been done. A blank drive is correctly passed over in silence
|
||||||
|
(its home-blocks check reads BLANK, logged at debug level only), so a first attempt today with
|
||||||
|
copies of the committed images (`logs/20261014-062249`) showed no WIREBIND lines and proved
|
||||||
|
nothing either way.
|
||||||
|
|
||||||
|
| ISA | five drives present at power-on | five drives hot-plugged ~1 s apart over QMP |
|
||||||
|
|---|---|---|
|
||||||
|
| amd64 | 5/5 attached (`logs/20261014-082755`) | 5/5 attached (`logs/20261014-083236`) |
|
||||||
|
| aarch64 | 5/5 attached (`logs/20261014-083415`) | 5/5 attached (`logs/20261014-083917`) |
|
||||||
|
| riscv64 | 5/5 attached (`logs/20261014-084134`) | 5/5 attached (`logs/20261014-084624`) |
|
||||||
|
|
||||||
|
Zuse's own drive was confirmed in every boot as well. No code changed for this. What closed the
|
||||||
|
gap is most likely the xHCI driver's per-port connect queue (`kernel/src/usb/xhci.c`,
|
||||||
|
`dev->pending_events[]`: a connect event that arrives while a command is in flight is held and
|
||||||
|
handled once the command ring is idle, not dropped); when that landed cannot be traced past the
|
||||||
|
source-tree reorganisation (`a8b70e88`), so this is inference, not proven. The one-at-a-time
|
||||||
|
attach rule of §XV and §XXXI is no longer needed.
|
||||||
|
|
||||||
## XV. 3(architecture) × 9(identity) × 3(replicate) randomized full-factorial DoE — self-contained
|
## XV. 3(architecture) × 9(identity) × 3(replicate) randomized full-factorial DoE — self-contained
|
||||||
FORTH capsule, replacing the ad hoc exerciser-feeding process (2026-09-11)
|
FORTH capsule, replacing the ad hoc exerciser-feeding process (2026-09-11)
|
||||||
|
|
||||||
@@ -3969,7 +3992,7 @@ are attached reliably in the first place, including under the "already plugged i
|
|||||||
case §XIV's own second reproduction showed failing.
|
case §XIV's own second reproduction showed failing.
|
||||||
|
|
||||||
**Bug 2 -- the MSG-TICK/Stage-3-switch dual-ownership rough edge (§XXVIII's own admission,
|
**Bug 2 -- the MSG-TICK/Stage-3-switch dual-ownership rough edge (§XXVIII's own admission,
|
||||||
never revisited).** Both MSG-TICK's idle-pump dispatch and the Stage 3 timer-driven switcher can
|
never revisited).** *Closed 2026-10-14: one delivery path, built -- §XXXVI.* Both MSG-TICK's idle-pump dispatch and the Stage 3 timer-driven switcher can
|
||||||
independently move control between the same VMs; not reconciled, not observed to interact badly
|
independently move control between the same VMs; not reconciled, not observed to interact badly
|
||||||
so far, but never proven safe under all interleavings either. Directly relevant to Stage 4 for
|
so far, but never proven safe under all interleavings either. Directly relevant to Stage 4 for
|
||||||
the same reason as Bug 1: WIREBIND VMs bring a second population of dynamically-birthed contexts
|
the same reason as Bug 1: WIREBIND VMs bring a second population of dynamically-birthed contexts
|
||||||
@@ -4579,7 +4602,7 @@ call sites (`repl.c` has 18); most are direct interactive replies already correc
|
|||||||
this rule -- reclassifying the specific sites that aren't is Stage D's job (the same files Stage
|
this rule -- reclassifying the specific sites that aren't is Stage D's job (the same files Stage
|
||||||
C's triage already walks), not repeated here.
|
C's triage already walks), not repeated here.
|
||||||
|
|
||||||
**Decision on the two §XXVII gaps: fix eviction now, defer `LOG-FLUSH` again.**
|
**Decision on the two §XXVII gaps: fix eviction now, defer `LOG-FLUSH` again.** *`LOG-FLUSH` built 2026-10-14 -- §XXXVIII.*
|
||||||
`LOG-FLUSH` needs real new machinery first -- the per-VM log buffer its own doc comment already
|
`LOG-FLUSH` needs real new machinery first -- the per-VM log buffer its own doc comment already
|
||||||
presumes (`vm_log_buffer.h`) does not exist anywhere in the tree, confirmed by grep; building it
|
presumes (`vm_log_buffer.h`) does not exist anywhere in the tree, confirmed by grep; building it
|
||||||
means designing that buffer format and the flush word together, genuine feature work deserving
|
means designing that buffer format and the flush word together, genuine feature work deserving
|
||||||
@@ -5197,6 +5220,19 @@ sequence at all until/unless this is fixed at the source -- the interactive two-
|
|||||||
(typed live over the serial socket) sidesteps the bug, it does not fix it. Flagged here as a
|
(typed live over the serial socket) sidesteps the bug, it does not fix it. Flagged here as a
|
||||||
real, reproducible defect worth its own fix later, out of scope for this section.
|
real, reproducible defect worth its own fix later, out of scope for this section.
|
||||||
|
|
||||||
|
**Fixed 2026-10-14.** The mechanism, traced: `vm_interpret()` (`kernel/src/vm/vm_core.c`, and
|
||||||
|
the hosted `v3/src/vm.c`) copies each text it runs into the VM's one `input_buffer` and resets
|
||||||
|
`input_pos`. `LOAD` runs its block by calling it, so the block took the place of the line `LOAD`
|
||||||
|
was on, and when the block was done the outer loop found nothing left to read. The same held
|
||||||
|
for every word that runs text from inside a line: `-->`, a capsule's `EXEC`, a message
|
||||||
|
kernel-Hermes delivers. `vm_interpret()` now keeps what the outer text had not yet read when it
|
||||||
|
is called from inside another, and puts it back afterwards, as FORTH-79's `LOAD` keeps the
|
||||||
|
input stream it interrupts. Two POST cases, `LOAD.rest_of_line` (`1 LOAD 0 0 /`) and
|
||||||
|
`THRU.rest_of_line` (`1 2 THRU 0 0 /`), fail without the fix (`logs/20261014-061222`) and pass
|
||||||
|
with it; three-ISA acceptance `logs/20261014-061508` (amd64), `-061624` (aarch64), `-061837`
|
||||||
|
(riscv64): 1052 tests, none failed, hash `0x08873e0f44b7cb2a` unchanged. So a `THRU`-then-call
|
||||||
|
line now works as one `SK_CMD`; that use itself was not re-run.
|
||||||
|
|
||||||
### XXXIV.2 -- A cross-session QEMU collision killed the first real relaunch at 0 trials
|
### XXXIV.2 -- A cross-session QEMU collision killed the first real relaunch at 0 trials
|
||||||
|
|
||||||
Once running for real (via the two-line workaround), the campaign was silently killed a fourth
|
Once running for real (via the two-line workaround), the campaign was silently killed a fourth
|
||||||
@@ -5463,7 +5499,7 @@ device it was minted on.
|
|||||||
- Build a **new, blank 1 GiB `disk/artemis.img`** from scratch -- not a resize of the current
|
- Build a **new, blank 1 GiB `disk/artemis.img`** from scratch -- not a resize of the current
|
||||||
file. No migration code written or needed.
|
file. No migration code written or needed.
|
||||||
- **Zuse re-minted fresh** on the new image (genesis marker, root CA placement, per
|
- **Zuse re-minted fresh** on the new image (genesis marker, root CA placement, per
|
||||||
`docs/03-architecture/word-acl/DESIGN.md`'s Phase 8 design and
|
`docs/reference/word-acl/DESIGN.md`'s Phase 8 design and
|
||||||
`project_phase8_milestone6_complete.md`'s already-verified entropy/signing/block-fence chain --
|
`project_phase8_milestone6_complete.md`'s already-verified entropy/signing/block-fence chain --
|
||||||
same mechanism, new device, not new code).
|
same mechanism, new device, not new code).
|
||||||
- **All 8 thumbdrive identities re-minted** (`project_thumbdrive_identities_minted_20260906.md`:
|
- **All 8 thumbdrive identities re-minted** (`project_thumbdrive_identities_minted_20260906.md`:
|
||||||
@@ -5476,8 +5512,8 @@ device it was minted on.
|
|||||||
### XXXV.7 -- Genuinely open, not decided here
|
### XXXV.7 -- Genuinely open, not decided here
|
||||||
|
|
||||||
- **Exact v2 decimation factor**, if/when v2 is built at all (§XXXV.4).
|
- **Exact v2 decimation factor**, if/when v2 is built at all (§XXXV.4).
|
||||||
- Whether `THRU`'s own line-swallowing defect (§XXXIV.1, still un-root-caused at the C level) gets
|
- ~~Whether `THRU`'s own line-swallowing defect (§XXXIV.1, still un-root-caused at the C level) gets
|
||||||
fixed before or after this work -- it blocks true single-command `SK_STARTUP_FORTH` autolaunch
|
fixed before or after this work~~ Fixed 2026-10-14, before it (§XXXIV.1) -- it blocks true single-command `SK_STARTUP_FORTH` autolaunch
|
||||||
of the campaign regardless of persistence format; the two-line interactive workaround still
|
of the campaign regardless of persistence format; the two-line interactive workaround still
|
||||||
applies either way.
|
applies either way.
|
||||||
- Disposal of the two stale partial amd64 runs' data (§XXXIV.5's own still-open item) is unrelated
|
- Disposal of the two stale partial amd64 runs' data (§XXXIV.5's own still-open item) is unrelated
|
||||||
@@ -5488,3 +5524,376 @@ device it was minted on.
|
|||||||
design/decision only, no capsule/C code, no new disk image, and no re-mint actually performed
|
design/decision only, no capsule/C code, no new disk image, and no re-mint actually performed
|
||||||
or committed for the drive resize, the persistence region, or the N=2 campaign shape.
|
or committed for the drive resize, the persistence region, or the N=2 campaign shape.
|
||||||
|
|
||||||
|
|
||||||
|
## XXXVI. One delivery path: a VM takes its own messages, on its own turn -- built (2026-10-14)
|
||||||
|
|
||||||
|
Closes the MSG-TICK/Stage-3 dual-ownership item (§XXVIII, §XXIX bug 2, §XXXI), as ruled in
|
||||||
|
`FABRIC-3.5.md` §XXXII ("one mover"); Captain Bob, 2026-10-14: collapse it before the bare-metal
|
||||||
|
builds. **The state before:** the MSG-TICK pump was gone (FABRIC-3.6 Stage E), but two paths
|
||||||
|
still ran a VM's kernel-Hermes messages -- the VM's own outermost colon-word checkpoint, and
|
||||||
|
Hera's idle beat, which walked every live VM and ran each one's messages *for* it, on Hera's
|
||||||
|
stack. The second was the only path for a VM nothing else drives (a WIREBIND identity's `~user`
|
||||||
|
VM, FABRIC-3.6 task 3.9). It was guarded (parked VMs are not LIVE and were skipped) but it was
|
||||||
|
two paths.
|
||||||
|
|
||||||
|
**What changed.**
|
||||||
|
- `sk_hermes_send_one()` marks the receiver as having work for the switch signal.
|
||||||
|
- What a VM runs on its own native stack (`sk_vm_switch_entry()`, until now a placeholder that
|
||||||
|
only yielded) now takes its own messages, then yields. Not while its interpreter is mid-line on
|
||||||
|
some other, parked, stack (new per-VM `interpret_depth`, counted in `vm_interpret()`): then
|
||||||
|
they wait and it asks for another turn.
|
||||||
|
- Hera's idle beat no longer runs anyone's messages but her own; it makes the switch the switch
|
||||||
|
signal has pending (`sk_vm_switch_service_pending()`, shared with the colon-word checkpoint),
|
||||||
|
so a message still arrives while she sits at her prompt.
|
||||||
|
- Every VM is registered with the switch signal at its birth (idempotent; the Tripod and
|
||||||
|
WIREBIND registrations stay) and unregistered when killed or reaped.
|
||||||
|
- `sk_hermes_drain_checkpoint()` refuses, with "Kernel-Hermes: message held -- its VM is not the
|
||||||
|
one running", any call not in the VM's own context: its interpreter running at the outermost
|
||||||
|
text, or it is the VM switched in and not mid-line elsewhere. This is the test: it failed
|
||||||
|
first, holding every relayed line (`logs/20261014-092558`), and never fires now.
|
||||||
|
- A VM yielding from the top of its own loop stays LIVE; only a VM switched out mid-line is
|
||||||
|
SWITCHED_OUT. Found by the test: with every yield SWITCHED_OUT, the console stopped relaying
|
||||||
|
to an identity after its first message (it relays only to a LIVE one) and KILL would have
|
||||||
|
refused every VM that had ever taken a message (`logs/20261014-095904`).
|
||||||
|
|
||||||
|
**A real defect found on the way, amd64 only:** `sk_vm_switch_prime()` (`arch/amd64/switch.S`)
|
||||||
|
built a first-entry frame that left `rsp` a multiple of 16 at `sk_vm_switch_entry()`'s entry; the
|
||||||
|
SysV ABI wants `rsp + 8` to be. Harmless while that function only switched back; a #GP (an
|
||||||
|
aligned SSE store to the stack) the first time it ran the interpreter there
|
||||||
|
(`logs/20261014-093823`). The frame is now 64 bytes with a null return address above the entry
|
||||||
|
address. aarch64 (160) and riscv64 (208) frames were already 16-aligned. This may also be what
|
||||||
|
stopped the 2026-09-14 attempt (`vm_interpret(self, "MSG-TICK")` in the same function, reverted
|
||||||
|
after a stall never root-caused) -- not proven.
|
||||||
|
|
||||||
|
**`FABRIC-3.5.md` §XXXII.5's three build questions, as answered here:** (1) the payload waits in
|
||||||
|
the receiver's kernel-Hermes queue and is run by the receiver on its own stack on its turn; (2)
|
||||||
|
Hera's special case stays only in this sense -- her messages run at her own idle beat, which is
|
||||||
|
her own context; (3) `g_mama_interpreting` and `g_idle_pump_active` stay, still guarding Hera's
|
||||||
|
own drain.
|
||||||
|
|
||||||
|
**Verified.** A WIREBIND identity (`S" 00" USE`, then four plain lines: `1 2 + .`, an unknown
|
||||||
|
word, `5 6 * .`, `7 8 + .`) receives and runs all four on its own stack -- `3`, the unknown-word
|
||||||
|
error, `30`, `15` -- with nothing held and no fault, on amd64 (`logs/20261014-101933`), aarch64
|
||||||
|
(`logs/20261014-102701`) and riscv64 (`logs/20261014-100948`). Five identity drives hot-plugged a
|
||||||
|
second apart at the prompt all attach (their attach acknowledgements are messages to Hera)
|
||||||
|
(`logs/20261014-102525`). Standard acceptance, committed disks: all three ISAs to `zuse@Hera`,
|
||||||
|
POST 1052 tests passed, `PARITY:M7.1a ... hash=0x08873e0f44b7cb2a` unchanged, no unknown word
|
||||||
|
(`logs/20261014-103248`, `-103409`, `-103616`). Superseded attempts, kept: `-092406` (wrong `USE`
|
||||||
|
syntax), `-094908` (before the LIVE-on-yield fix, one line only).
|
||||||
|
|
||||||
|
## XXXVII. Any identity could run FORTH as Zuse; a message could run twice; elevation removed (2026-10-14)
|
||||||
|
|
||||||
|
Found while building FABRIC-3.7's elevation entrypoint, proven live, fixed test first.
|
||||||
|
|
||||||
|
**1. Two words let any VM have Hera run any text, in her own dictionary -- Zuse's.**
|
||||||
|
`KH-ELEVATE-SEND ( paddr plen -- ok? )` and `KH-BLK-ATTACH-SEND ( paddr plen -- ok? )`
|
||||||
|
(`repl.c`) are registered in every VM (`word_registry.c`), and each sent whatever text it was
|
||||||
|
handed to Hera as a kernel-Hermes message, which Hera interprets. From a WIREBIND identity's
|
||||||
|
console: `S" 777 ." KH-ELEVATE-SEND .` and `S" 778 ." KH-BLK-ATTACH-SEND .` -- Hera printed
|
||||||
|
`777` and `778` (`logs/20261014-105930`, `-110937`). A line holding `"` is run on the identity's
|
||||||
|
console VM instead of relayed (`repl.c`'s own v1 limitation), which is what reached them.
|
||||||
|
|
||||||
|
**2. One message could run twice.** `sk_hermes_drain_checkpoint()` popped a message only after
|
||||||
|
running it; a payload that runs a colon word reaches the checkpoint in `execute_colon_word()`,
|
||||||
|
which drains the same VM again -- and found the same message at the head. A relayed `T3`
|
||||||
|
(`: T3 333 . ;`) printed `333 333`; `778` above printed twice (`logs/20261014-110937`).
|
||||||
|
|
||||||
|
**3. Elevation itself: not needed (Captain Bob, 2026-10-14).** Asked whether it was even a
|
||||||
|
necessary capability, given (1): privilege comes from the drive -- Zuse's, or the personality an
|
||||||
|
identity is minted with -- and a runtime request-and-grant channel only adds attack surface.
|
||||||
|
`ELEVATE-GRANT` granted on eligibility-list membership alone (no human approves), into Hera's own
|
||||||
|
dictionary (never the requester's), and could never reach a FORTH-79-locked identity's words (all
|
||||||
|
pinned; pins are one-way). Its only caller had been gone since 2026-09-22 and nothing missed it.
|
||||||
|
`FABRIC-3.7.md` is closed as not needed.
|
||||||
|
|
||||||
|
**Fixes.**
|
||||||
|
- Removed: `KH-ELEVATE-SEND`; message type 8 (retired, not reused); `capsules/zuse-eligibility.4th`
|
||||||
|
(`ELEVATE-GRANT`, blocks 4021-4022) and its `EXEC` in `init.4th`; the C words `ZUSE-ELIGIBLE?`,
|
||||||
|
`ZUSE-ELIGIBILITY-ADD`, `ELEVATE-PUBKEY-UNPACK`; the eligibility list (`zuse_eligibility.c`,
|
||||||
|
`zuse_eligibility.h`, `zuse_eligibility_list.h`); FABRIC-3.7 Part B's gate on
|
||||||
|
`ZUSE-ELIGIBILITY-ADD` in `zuse.4th`. `devblock_from_top` 1-63 on Artemis's disk stay reserved,
|
||||||
|
unused (his ruling). `NAME>XT` stays: general-purpose.
|
||||||
|
- `KH-BLK-ATTACH-SEND` is now `( dev-addr ok? -- sent? )`, refused unless Artemis calls it; the
|
||||||
|
kernel writes `<dev-addr> <0|1> BLK-ATTACH-ACK` itself. Artemis's `HERA-BLK-ATTACH-REQ` is now
|
||||||
|
`DUP BLK-ATTACH KH-BLK-ATTACH-SEND DROP` (its text builder is gone, and with it Artemis's one
|
||||||
|
"Unterminated comment" warning, a nested-paren comment).
|
||||||
|
- `BLK-ATTACH-ACK` is refused unless Hera runs it.
|
||||||
|
- The drain pops a message before running it; the message, and so its payload, is still held
|
||||||
|
until released after.
|
||||||
|
|
||||||
|
**Verified.** The same session after the fix (`logs/20261014-112514`): `333` once,
|
||||||
|
`KH-BLK-ATTACH-SEND: refused -- only Artemis replies to a storage attach`, `UNKNOWN WORD:
|
||||||
|
'KH-ELEVATE-SEND'`, identity `00` attaches. Five identities hot-plugged at the prompt all attach
|
||||||
|
(`logs/20261014-113615`). Standard acceptance, all three ISAs: `zuse@Hera`, POST 1052 passed, no
|
||||||
|
unknown word, **`PARITY:M7.1a word_count=523 ... hash=0xb73b58052d591638` -- a deliberate new
|
||||||
|
baseline** (was 530 / `0x08873e0f44b7cb2a`: the four C words and `zuse-eligibility.4th`'s
|
||||||
|
definitions are gone from Hera's dictionary) (`logs/20261014-113112`, `-113232`, `-113450`). A first attempt (`-111859`) broke
|
||||||
|
attach two ways, both mine: nested parens in the new capsule comment, and `%lld`, which the
|
||||||
|
kernel's freestanding `snprintf` does not do.
|
||||||
|
|
||||||
|
**Found, not fixed (pre-existing, unrelated):** Hera prints two and Hestia three `( Unterminated
|
||||||
|
comment` warnings at every boot, in logs from before this work too.
|
||||||
|
|
||||||
|
## XXXVIII. `LOG-FLUSH` built: a VM's log records reach Artemis's log ring (2026-10-14)
|
||||||
|
|
||||||
|
Deferred in §XXXII.4 as its own initiative; Captain Bob, 2026-10-14: build it before the
|
||||||
|
bare-metal builds. His rulings: **everything the VM logs** goes in its buffer (at or above the
|
||||||
|
log level -- the one, global `LOG-LEVEL!` setting, the same filter `log_message()` applies);
|
||||||
|
it goes to disk **on `LOG-FLUSH`, when the buffer fills, and at once on an ERROR record**.
|
||||||
|
|
||||||
|
**Built.**
|
||||||
|
- Each VM has a buffer of its own (`VM.log_buf`, 900 bytes, packed records: level, timestamp,
|
||||||
|
length, text; `vm_log_buffer.c`/`.h`). `log_message()` (`shim.c`) adds every record it prints
|
||||||
|
to the buffer of the VM it is attributed to (`vm_log_attributed_vm()`); a record made outside
|
||||||
|
any VM's text -- the kernel's own -- belongs to none and is not kept.
|
||||||
|
- A flush is one kernel-Hermes message to Artemis, type `SK_HERMES_MSG_TYPE_LOG_BATCH` (10), the
|
||||||
|
one message type that is not FORTH text: `sk_hermes_drain_checkpoint()` hands it to
|
||||||
|
`vm_log_batch_deliver()`, which writes each record with `log_region_append()` -- in Artemis's
|
||||||
|
own context, on her turn (§XXXVI). The record's source is the sender the kernel stamped on the
|
||||||
|
message, never a name the sender gives: a VM cannot write under another's name.
|
||||||
|
- Nothing is lost silently: records that cannot go (Artemis not yet live -- all of Hera's POST --
|
||||||
|
or the send refused) are counted, and the next flush that can be sent leads with "N log
|
||||||
|
records not sent: Artemis not ready" (175 at a normal boot).
|
||||||
|
- `LOG-FLUSH ( -- )`, every VM. `LOG-SHOW ( n -- )`, Hera only: the newest n records, oldest of
|
||||||
|
them first, as source, level, text -- added because the ring had no reader at all, so nothing
|
||||||
|
written there could be read or checked (`log_region_read_recent()`). Hera only because it shows
|
||||||
|
every VM's records, and Hera's console is Zuse's.
|
||||||
|
|
||||||
|
**A real defect in the ring, found by the first test that filled it:** growth
|
||||||
|
(`log_region_append()`) claimed to be "safe regardless of wrap state" and was not. The ring is
|
||||||
|
full when it grows, so head == tail; nothing moved and tail stayed put, so the next write
|
||||||
|
overwrote the oldest record and the new, blank slots read back as records inside the live
|
||||||
|
range. 30 records written to a fresh ring read back as 28 of them and 12 blank
|
||||||
|
(`logs/20261014-115648`; also `-115434` on a ring already damaged by an earlier test). Fixed:
|
||||||
|
the records from head on move up by the slots added, and the next write goes into the gap (with
|
||||||
|
head at 0 -- the only case growth meets, since nothing is evicted before the ring is at its full
|
||||||
|
size -- simply at the old end). §XXXII.4 had flagged eviction as never live-exercised.
|
||||||
|
|
||||||
|
**Verified.** Test first: `LOG-FLUSH` and `LOG-SHOW` unknown (`logs/20261014-114028`). Then:
|
||||||
|
Hera's WARN probe and her boot warnings, under source `Hera`, after `LOG-FLUSH`; identity `00`'s
|
||||||
|
ERROR probe, sent by itself at once, under source `00` (`-114847`); the lost-records notice
|
||||||
|
(`-115434`); 30 records through a growth, in order, no blank, on amd64 (`-115841`), aarch64
|
||||||
|
(`-120526`) and riscv64 (`-120746`). Standard acceptance, all three ISAs: `zuse@Hera`, POST 1052
|
||||||
|
passed, no unknown word, **new baseline `word_count=526 ... hash=0x82f4ae7cb2e2d424`**
|
||||||
|
(deliberate: Hera's new words) (`logs/20261014-120027`, `-120148`, `-120356`).
|
||||||
|
|
||||||
|
## XXXIX. The Pi 5's native path: MMU and caches on before any C, bounded mailbox, framebuffer address from the devicetree -- and a rehearsal on QEMU that found three more (2026-10-14)
|
||||||
|
|
||||||
|
Captain Bob, 2026-10-14: "fix the pi 5 problems" -- the three from the Friday review (`boards/BRINGUP.md`
|
||||||
|
R2, R3).
|
||||||
|
|
||||||
|
**1. MMU and caches off (R2).** The firmware enters at EL2 with the MMU off: every access is
|
||||||
|
Device memory, where an unaligned access or an exclusive faults and nothing is cached. The
|
||||||
|
aarch64 kernel had never needed to turn the MMU on -- under UEFI it runs on the firmware's map
|
||||||
|
(`arch_mmu_init()` is a stub; `vmm.c` builds x86-shaped tables it never loads on aarch64).
|
||||||
|
`native_rpi5_entry.S` now: cleans and invalidates the data cache over the whole image first
|
||||||
|
(so nothing the firmware left there lands on top of what follows); builds an identity map, the
|
||||||
|
image's GiB Normal write-back in 2 MiB blocks, every other GiB Device-nGnRE and never executable;
|
||||||
|
sets MAIR, TCR and TTBR0 and turns on M, C and I at whichever EL it was entered at (EL2 on the
|
||||||
|
Pi 5, EL1 handled too), with WXN and alignment checking off. In C, `rpi5_mmu.c` then makes every
|
||||||
|
further GiB the devicetree's `/memory` covers entirely Normal, and makes the framebuffer Normal
|
||||||
|
non-cacheable (the display reads it straight from RAM), each change break-before-make.
|
||||||
|
|
||||||
|
**2. Unbounded mailbox waits (R3).** Every wait now gives up after one second by the
|
||||||
|
architectural counter (`-5`); before any console exists a silent VideoCore must cost a missing
|
||||||
|
framebuffer, not a hang. With the caches on, the request buffer is cleaned to RAM before it is
|
||||||
|
sent and invalidated before the answer is read: the VideoCore does not see the ARM's caches.
|
||||||
|
|
||||||
|
**3. The framebuffer address (R3).** `& 0x3FFFFFFF` was the Pi 4's rule. The address the firmware
|
||||||
|
returns is now carried through the devicetree's `dma-ranges` from the firmware node up: on the
|
||||||
|
Pi 5 (the real `bcm2712-rpi-5-b.dtb`) the firmware node's is empty and `/soc` has none, so it is
|
||||||
|
already physical; on a Pi 4 `/soc` maps bus `0xC0000000` onto 0, and that is handled too. An
|
||||||
|
address no entry holds is refused (`-6`). Still unverified: the allocate tag's size field.
|
||||||
|
|
||||||
|
**The rehearsal.** There is no QEMU model of the Pi 5, but QEMU's virt machine with
|
||||||
|
`virtualization=on` enters a raw image exactly as the Pi 5's firmware does: at EL2, MMU off,
|
||||||
|
devicetree in x0. New `make -f kernel/Makefile ARCH=aarch64 RPI5_NATIVE_BASE=0x40080000
|
||||||
|
rpi5-rehearsal` links the same native image at virt's address (the linker script's base is now
|
||||||
|
`RPI5_NATIVE_BASE`, 0x80000 by default) and boots it, Cortex-A76, one QEMU, foreground. It found
|
||||||
|
three more, each of which would have stopped the Pi 5:
|
||||||
|
- **The PL011's register shift**, mine (`c9519173`): `fdt_uart.c` gave a devicetree PL011 a shift
|
||||||
|
of 0, but `console.c` numbers its registers by word -- the flag register was read at +6, not
|
||||||
|
+0x18: an alignment fault on Device memory at the first character. The UEFI path never met it
|
||||||
|
(it uses a built-in default with the right shift), and the host test asserted the wrong value.
|
||||||
|
Shift 2 now; the test expects it.
|
||||||
|
- **The GIC's address**: `apic.c` read the GIC's `reg` as two 64-bit cells with no translation --
|
||||||
|
right only where the GIC is a child of the root. On the Pi 5 it is on `/soc` (one cell,
|
||||||
|
`0x7fff9000`), `0x107fff9000` to the CPU. New `fdt_reg_address()` (`fdt.c`) reads a node's `reg`
|
||||||
|
entry in its parent's cells and carries it up through every bus's `ranges`; the GIC lookup uses
|
||||||
|
it, and accepts virt's `arm,cortex-a15-gic` too. Checked against the real Pi 5 devicetree:
|
||||||
|
`tools/fdt_uart_test.c <dtb> pl011 0x107d001000 2 4 arm,gic-400 0x107fff9000 0x107fffa000`.
|
||||||
|
- **No timer interrupt at EL2**: with `HCR_EL2.IMO/FMO/AMO` clear an IRQ targets EL1 and is never
|
||||||
|
taken while the CPU runs at EL2 -- "Heartbeat: 0 ticks". The entry stub sets them at EL2. The
|
||||||
|
UEFI path runs at EL1 and never met it.
|
||||||
|
|
||||||
|
**Verified.** Rehearsal, final: POST 1052 passed, `PARITY:M7.1a word_count=526 ...
|
||||||
|
hash=0x82f4ae7cb2e2d424` -- the same as the UEFI build -- the Tripod born, the heartbeat ticking,
|
||||||
|
no exception (`logs/20261014-124530/aarch64-rpi5/`). Earlier rehearsal and the hand-run QEMU
|
||||||
|
sessions that found the three are not logged (`-d int` to a scratch file); `logs/20261014-123129`
|
||||||
|
is the first, silent, run. Not rehearsed: the mailbox and framebuffer (virt has neither), the Pi
|
||||||
|
5's own UART and GIC addresses (the host test checks them against its devicetree), PCI (virt's
|
||||||
|
needs ACPI; the Pi 5's is R4). The board image (`make boot_image TARGET=RASPI`) links at 0x80000
|
||||||
|
and ends at 0x834000. Standard acceptance, all three ISAs: POST 1052 passed, same hash
|
||||||
|
(`logs/20261014-125305`, `-125427`, `-125635`).
|
||||||
|
|
||||||
|
## XL. The USB controller found as real hardware has it (`boards/BRINGUP.md` A1, 2026-10-14)
|
||||||
|
|
||||||
|
Captain Bob, 2026-10-14: "start on A1". The xHCI driver matched QEMU's own controller only --
|
||||||
|
vendor and device `1B36:000D`, on PCI bus 0, function 0 -- so no real board's controller was ever
|
||||||
|
found, and with it no thumbdrive, no login, no keyboard to come.
|
||||||
|
|
||||||
|
**What a real controller needs, done:**
|
||||||
|
- **Found by class**, `0x0C/0x03/0x30`, from any vendor: new `pci_find_class()` (`pci.c`) reads
|
||||||
|
every bus, slot and function the configuration space reaches (port I/O on amd64, all 256 buses;
|
||||||
|
through ECAM, the MCFG entry's bus range, now recorded). Real controllers sit behind bridges.
|
||||||
|
- **Mapped at its real size**: new `pci_bar_size()` (the standard all-ones probe, decoding off
|
||||||
|
meanwhile); never less than the old fixed 64 KiB.
|
||||||
|
- **Taken from the firmware** (xHCI 1.2 section 4.22.1): through the USB Legacy Support extended
|
||||||
|
capability, OS-owned set and BIOS-owned waited out for a second (taken regardless after, as
|
||||||
|
Linux does), every SMI enable off and SMI status cleared. QEMU's controller has no such
|
||||||
|
capability; a PC's BIOS, driving USB for its own setup screen, does.
|
||||||
|
- **64-byte contexts** (`HCCPARAMS1.CSZ=1`) laid out, not refused: every context is 32 or 64 bytes
|
||||||
|
apart (`xhci_ctx_bytes()`); a 64-byte context holds the same fields in its first 32 bytes, so the
|
||||||
|
existing structs stand.
|
||||||
|
- `XHCI_QEMU_ARGS` (`kernel/Makefile`) replaces the QEMU controller, to rehearse one placed as real
|
||||||
|
hardware places it.
|
||||||
|
|
||||||
|
**Verified.** Test first: QEMU's NEC controller (`nec-usb-xhci`, vendor 1033) behind a PCIe root
|
||||||
|
port on bus 1, Zuse's drive on it -- before, nothing attached and no `zuse@Hera` prompt
|
||||||
|
(`logs/20261014-131238`); after, the drive attaches and Zuse is minted, on amd64 (`-131934`),
|
||||||
|
aarch64 (`-132056`) and riscv64 (`-132257`). Standard acceptance with the usual controller, all
|
||||||
|
three: POST 1052 passed, hash `0x82f4ae7cb2e2d424` unchanged (`-132431`, `-132548`, `-132746`);
|
||||||
|
five identities hot-plugged, all attached (`-132912`).
|
||||||
|
|
||||||
|
**Not rehearsable, so unproven until the SER5:** the firmware handoff and 64-byte contexts --
|
||||||
|
QEMU's controller has neither. **Still open:** one controller only -- the first found. A PC with
|
||||||
|
several (the SER5 has more than one) drives that one's ports alone; the stick and keyboard must be
|
||||||
|
in them until the driver runs several (`xhci_get_dev()` is a single controller throughout).
|
||||||
|
|
||||||
|
## XLI. A USB keyboard, a full one (`boards/BRINGUP.md` A3) -- and a hang on any PC without PS/2 (S3) (2026-10-14)
|
||||||
|
|
||||||
|
Captain Bob, 2026-10-14: "start on A3", then, mid-way: "use this keyboard as a target. for example
|
||||||
|
include caps lock, numlock, keypad and arrow ... Note for `later`, let's build keyboard VM's"
|
||||||
|
(recorded as a concept, nothing built).
|
||||||
|
|
||||||
|
**Built.**
|
||||||
|
- **The device** (`xhci.c`): a configuration whose interface is HID / boot / keyboard (3/1/1) is
|
||||||
|
taken as a keyboard, not refused as "not a drive": its first interrupt IN endpoint is configured
|
||||||
|
(`xhci_cmd_configure_hid_endpoint()` -- interval converted from bInterval for full/low and high
|
||||||
|
speed), `SET_CONFIGURATION`, then `SET_PROTOCOL(boot)` (a keyboard starts in report protocol),
|
||||||
|
then one Normal TRB at a time on its ring; each report is read and the next queued, deferred like
|
||||||
|
every doorbell in this driver. Unplugging forgets it. "USB keyboard ready" on the console.
|
||||||
|
- **The keys** (`usb_kbd.c`): a boot report says which keys are held; the difference from the one
|
||||||
|
before is the presses and releases, modifiers included, ErrorRollOver ignored. HID usage IDs
|
||||||
|
become Linux keycodes -- the namespace the PS/2 and virtio keyboards already use -- for a full
|
||||||
|
keyboard: the main block, F1-F12, Print Screen/Scroll Lock/Pause, the navigation block, arrows,
|
||||||
|
Num Lock and the whole keypad. `sk_key_event_poll()` (`keyboard_words.c`) reads them first, on
|
||||||
|
every ISA.
|
||||||
|
- **What a key means** (`repl.c`, every keyboard alike): Caps Lock and Num Lock are toggles (Num
|
||||||
|
Lock on at start); Caps Lock acts on letters, Shift reverses it; the keypad types `/ * - +` and
|
||||||
|
Enter always, digits and `.` with Num Lock on, nothing with it off (navigation -- this REPL's
|
||||||
|
line editor appends and backspaces only, so arrows and Home/End type nothing either); the 102nd
|
||||||
|
key types `\` `|`. The lock state goes to a USB keyboard's lights by `SET_REPORT` on its next
|
||||||
|
report.
|
||||||
|
- **Speed**: one report at a time, serviced only on the once-a-second idle beat, lost keys -- the
|
||||||
|
keyboard's own queue overflowed at typing speed (found by the test: of a typed line, only `1`
|
||||||
|
arrived). While a USB keyboard runs, the console now services the event ring on every timer
|
||||||
|
tick as it waits for a key.
|
||||||
|
|
||||||
|
**S3, found on the way -- a hang.** To have the USB keyboard be QEMU's only keyboard on amd64 the
|
||||||
|
test turned the PS/2 controller off (`-machine i8042=off`), and the kernel hung at boot just after
|
||||||
|
the I/O APIC: with no controller port 0x64 reads 0xFF, "output full" for ever, and `i8042_init()`'s
|
||||||
|
drain never ended (nor would `i8042_drain_stale()`'s). A legacy-free PC -- quite possibly the SER5 --
|
||||||
|
would have stopped there. Now: 0xFF means no controller, "i8042: no PS/2 controller -- keyboard by
|
||||||
|
USB only", nothing more done to it; every drain bounded. With a controller, unchanged.
|
||||||
|
|
||||||
|
**Verified.** amd64 with the USB keyboard the only keyboard, typed over QMP (`logs/20261014-135243`):
|
||||||
|
`1 2 + .` on the main keys and again on the keypad with keypad Enter -- `3` both times; Caps Lock,
|
||||||
|
then `s" ab" type` typed in lower case -- the line reads `S" AB" TYPE` and prints `AB`; Num Lock
|
||||||
|
off, keypad 7, Enter -- nothing typed. aarch64 and riscv64 (`-135420`, `-135629`): "USB keyboard
|
||||||
|
ready" and the same three results -- there QEMU also has a virtio keyboard, so those runs show the
|
||||||
|
USB keyboard configured, not which keyboard each key came through. The hang and its fix:
|
||||||
|
`-134410` (stops after the I/O APIC), `-135022` (boots). Standard acceptance, all three ISAs: POST
|
||||||
|
1052 passed, hash unchanged, PS/2 initialised as before on amd64 (`-135808`, `-135918`, `-140123`);
|
||||||
|
five identities hot-plugged, all attached (`-140240`). Test first? No: this time the test was
|
||||||
|
written after the code, its "before" being no keyboard support at all (`-134213`, where QMP could
|
||||||
|
not reach the device, records the enumeration working).
|
||||||
|
|
||||||
|
**Limits, not hidden:** the first xHCI controller only (§XL); a keyboard whose first interface is
|
||||||
|
not its keyboard is not used; no key repeat (a boot keyboard does not repeat, and nothing here
|
||||||
|
does it for it); the lights are sent on the next report after a lock key, not at once.
|
||||||
|
|
||||||
|
## XLII. Every USB controller, not the first (`boards/BRINGUP.md` A1, the rest) (2026-10-14)
|
||||||
|
|
||||||
|
Captain Bob, 2026-10-14: "do multiple controllers" -- §XL's open item. A PC has several xHCI
|
||||||
|
controllers, each with its own ports; only the first found was driven, so a stick or keyboard in
|
||||||
|
another's ports was never seen.
|
||||||
|
|
||||||
|
**What assumed one controller, and now does not:**
|
||||||
|
- `xhci.c`: one latched `g_xhci_dev` → a table of up to `XHCI_MAX_CONTROLLERS` (8);
|
||||||
|
`xhci_poll_events()` services each in turn; `xhci_get_dev()` → `xhci_dev_count()` /
|
||||||
|
`xhci_dev_at(i)`; `xhci_find_and_map(dev, index)` finds the index-th controller (1 when there is
|
||||||
|
none). Everything per device was already per controller (`msc_slots`, the rings, the connect
|
||||||
|
state machine, the BOT state).
|
||||||
|
- `kernel_main.c`: brings up controller 0, 1, ... until there is none; one that fails is skipped.
|
||||||
|
- `repl.c` and `blkio_usb.c`: their per-slot arrays were indexed by slot ID alone -- but a slot ID is
|
||||||
|
a controller's own, so slot 1 on two controllers would have been one entry. Now one set per
|
||||||
|
controller (`g_usb_ctrl[]`; `blkio_usb.c` finds its set by the controller's pointer); the attach
|
||||||
|
acknowledgement looks the device up across all of them.
|
||||||
|
- `usb_kbd.c`: one "previous report" and one "lights sent" for every keyboard would have diffed two
|
||||||
|
keyboards against each other. Both are each keyboard's own now (in its slot); a keyboard that
|
||||||
|
goes releases whatever it still held (no Shift stuck down after unplugging).
|
||||||
|
|
||||||
|
**Verified.** Test first: amd64, no PS/2, Zuse's drive on the usual controller, a second (NEC,
|
||||||
|
behind a root port) with the USB keyboard and identity `00` -- before, only Zuse attached
|
||||||
|
(`logs/20261014-140826`); after, the keyboard types (`3`, `3`, `AB`), `00` attaches, Zuse is confirmed
|
||||||
|
(`-141442`) -- both controllers with a device in slot 1, the collision case. Four identities
|
||||||
|
hot-plugged onto the second controller all attach, and unplugging one detaches that one
|
||||||
|
(`-141621`). aarch64 and riscv64, the same two-controller boot: all the same results (`-141756`,
|
||||||
|
`-141953`). Standard acceptance, all three: POST 1052, hash unchanged (`-142120`, `-142237`,
|
||||||
|
`-142449`); five identities hot-plugged on the first controller, all attached (`-142606`).
|
||||||
|
|
||||||
|
## XLIII. Both systems on every board image, chosen at boot (`boards/BRINGUP.md` A6) (2026-10-14)
|
||||||
|
|
||||||
|
Captain Bob, 2026-10-13, ruled the boards carry "both, switchable"; asked 2026-10-14 where the
|
||||||
|
switch is: **at boot, one image** -- a word in the boot configuration, v3 as built.
|
||||||
|
|
||||||
|
**Built.**
|
||||||
|
- `STARFORTH_V4=1` already compiled the v4 engine in; `kernel_main` then ran v4 unconditionally.
|
||||||
|
Now it runs v4 only if the boot arguments say `system=v4`, or say nothing and the build's
|
||||||
|
default is v4 (`SK_V4_DEFAULT`, from `kernel/Makefile`'s `V4_DEFAULT`: 1 for a plain
|
||||||
|
`STARFORTH_V4=1` build, as before, so every v4 QEMU boot and test is unchanged). Otherwise v3,
|
||||||
|
which is compiled in alongside, runs. A kernel without v4 asked for it says so and runs v3. The
|
||||||
|
boot prints the choice and why: "System: StarForth v4 (system=v4)", "... (this build's
|
||||||
|
default)", ...
|
||||||
|
- `cmdline.c`: `system=v3` / `system=v4` (also `--system=`), a later one winning; anything else is
|
||||||
|
ignored, as every unknown argument is.
|
||||||
|
- `make boot_image`: `STARFORTH_V4=1 V4_DEFAULT=0` -- both systems, v3 unless asked -- and the
|
||||||
|
boot arguments file always written, `system=v3` first: `starforth.cfg` on the ESP (SER5, Mars),
|
||||||
|
`cmdline.txt` on the Pi 5's card (the firmware hands it over as the devicetree's `bootargs`).
|
||||||
|
- `make boot_image` also cleans its ISA's kernel objects first: they are shared with `make qemu`
|
||||||
|
and make does not see changed compile flags. Found doing it: the clean was handed the root's
|
||||||
|
`TARGET=SER5` and removed `build/amd64/SER5`, nothing -- the first SER5 image carried the v4
|
||||||
|
engine but a `kernel_main` compiled without it. Now `TARGET=kernel`; all three images checked to
|
||||||
|
carry both.
|
||||||
|
|
||||||
|
**Verified.** Board-style build (both, v3 default), each ISA: no argument -- v3, POST 1052, hash
|
||||||
|
unchanged; `system=v4` -- v4, `PARITY:V4_POST tests=538 pass=538`, `dict_hash=0xe5a57f3eb72ff94a`
|
||||||
|
(amd64 `logs/20261014-144027`, `-144141`; aarch64 `-144411`, `-144604`; riscv64 `-144934`,
|
||||||
|
`-145108`). A plain `STARFORTH_V4=1` build still boots v4 by default (`-145331`); a v3-only kernel
|
||||||
|
asked for v4 says so and runs v3 (`-145550`). The SER5 image itself, booted from its own disk under
|
||||||
|
OVMF (`logs/20261014-ser5-image/`): v3 as built; after changing the one word in `starforth.cfg` on
|
||||||
|
it, v4. The Pi 5 and Mars images: built, their `cmdline.txt` / `starforth.cfg` read back from the
|
||||||
|
image, both systems found in their kernels; not booted (no QEMU model for either). Standard
|
||||||
|
acceptance, all three ISAs: unchanged (`-150651`, `-150801`, `-151007`).
|
||||||
|
|
||||||
|
**XLIII, revised the same day -- v4 is the default build.** Captain Bob, 2026-10-14: "v4 is the
|
||||||
|
default build", then "no, qemu to v4 too ... we are effectively trying to retire v3". Every kernel
|
||||||
|
build now carries v4 and v3 and boots **v4**: `STARFORTH_V4` defaults on (Kconfig `default y`),
|
||||||
|
`V4_DEFAULT=1` everywhere, and the board images write `system=v4` into `starforth.cfg` /
|
||||||
|
`cmdline.txt`. `system=v3` is the one word that boots v3; `STARFORTH_V4=0` builds v3 alone. The
|
||||||
|
acceptance rule (`.claude/CLAUDE.md`) became: the three ISAs as built (v4), and the 32-bit build,
|
||||||
|
`make -C v4 test-32` ("the 32 bit build needs to go into the acceptance test too"). v3 is not part
|
||||||
|
of it ("i don't care about v3"); it stays in the tree, `system=v3` still boots it. Verified: the three images rebuilt with `system=v4` in their boot files; the
|
||||||
|
SER5 image under OVMF as built boots v4, and after changing the word, v3 (`logs/20261014-ser5-image/`).
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
\part{Security and ACL Recipes}
|
\part{Security and ACL Recipes}
|
||||||
|
|
||||||
\chapter{Word-Level ACL Basics}
|
\chapter{Word-Level ACL Basics}
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/word-acl/DESIGN.md
|
%% SOURCE: docs/reference/word-acl/DESIGN.md
|
||||||
%% TODO(bob): promote ACL recipe: loading ACL.4th, granting/revoking modes,
|
%% TODO(bob): promote ACL recipe: loading ACL.4th, granting/revoking modes,
|
||||||
%% TTL-based expiry. Do NOT draft independent claim language.
|
%% TTL-based expiry. Do NOT draft independent claim language.
|
||||||
\input{../scraps/architecture/03-architecture/word-acl/DESIGN}
|
\input{../scraps/architecture/03-architecture/word-acl/DESIGN}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
\part{$2^7$ Factorial Campaign}
|
\part{$2^7$ Factorial Campaign}
|
||||||
|
|
||||||
\chapter{Campaign Design}
|
\chapter{Campaign Design}
|
||||||
%% SOURCE: docs/working/experiments/02-experiments/factorial-doe/guide.md
|
%% SOURCE: docs/working/archive/superseded/factorial-doe/guide.md
|
||||||
%% docs/working/experiments/campaigns/doe_2x7/README.md
|
%% docs/working/experiments/campaigns/doe_2x7/README.md
|
||||||
\input{../scraps/experiments/02-experiments/factorial-doe/guide}
|
\input{../scraps/experiments/02-experiments/factorial-doe/guide}
|
||||||
\input{../scraps/experiments/02-experiments/factorial-doe/workflow}
|
\input{../scraps/experiments/02-experiments/factorial-doe/workflow}
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
\input{../scraps/experiments/campaigns/shape_validation/README}
|
\input{../scraps/experiments/campaigns/shape_validation/README}
|
||||||
|
|
||||||
\chapter{Incompatible Configurations}
|
\chapter{Incompatible Configurations}
|
||||||
%% SOURCE: docs/working/experiments/02-experiments/factorial-doe/incompatible-configs.md
|
%% SOURCE: docs/working/archive/superseded/factorial-doe/incompatible-configs.md
|
||||||
\input{../scraps/experiments/02-experiments/factorial-doe/incompatible-configs}
|
\input{../scraps/experiments/02-experiments/factorial-doe/incompatible-configs}
|
||||||
|
|
||||||
\chapter{Campaign Results — 90 Runs}
|
\chapter{Campaign Results — 90 Runs}
|
||||||
@@ -146,8 +146,8 @@
|
|||||||
\part{Supplementary Campaigns}
|
\part{Supplementary Campaigns}
|
||||||
|
|
||||||
\chapter{Heartbeat DoE}
|
\chapter{Heartbeat DoE}
|
||||||
%% SOURCE: docs/working/experiments/02-experiments/heartbeat-doe/design.md
|
%% SOURCE: docs/working/archive/superseded/heartbeat-doe-design.md
|
||||||
%% docs/working/experiments/02-experiments/heartbeat-doe/corrected-design.md
|
%% docs/working/archive/superseded/heartbeat-doe-corrected-design.md
|
||||||
\input{../scraps/experiments/02-experiments/heartbeat-doe/design}
|
\input{../scraps/experiments/02-experiments/heartbeat-doe/design}
|
||||||
\input{../scraps/experiments/02-experiments/heartbeat-doe/corrected-design}
|
\input{../scraps/experiments/02-experiments/heartbeat-doe/corrected-design}
|
||||||
\input{../scraps/experiments/02-experiments/heartbeat-doe/implementation-summary}
|
\input{../scraps/experiments/02-experiments/heartbeat-doe/implementation-summary}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/adaptive-systems/loop-5-sketch
|
%% SCRAP: architecture/03-architecture/adaptive-systems/loop-5-sketch
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/adaptive-systems/loop-5-sketch.md
|
%% SOURCE: docs/working/archive/superseded/loop-5-sketch.md
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-physics
|
%% FITS: dev-guide/ch-physics
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/hal/README
|
%% SCRAP: architecture/03-architecture/hal/README
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/hal/README.md
|
%% SOURCE: docs/working/archive/dead/hal-target-contract/README.md
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-platform
|
%% FITS: dev-guide/ch-platform
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/hal/interfaces
|
%% SCRAP: architecture/03-architecture/hal/interfaces
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/hal/interfaces.md
|
%% SOURCE: docs/working/archive/dead/hal-target-contract/interfaces.md
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-platform
|
%% FITS: dev-guide/ch-platform
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/hal/migration-plan
|
%% SCRAP: architecture/03-architecture/hal/migration-plan
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/hal/migration-plan.md
|
%% SOURCE: docs/working/archive/dead/hal-target-contract/migration-plan.md
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-platform
|
%% FITS: dev-guide/ch-platform
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/hal/overview
|
%% SCRAP: architecture/03-architecture/hal/overview
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/hal/overview.md
|
%% SOURCE: docs/working/archive/dead/hal-target-contract/overview.md
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-platform
|
%% FITS: dev-guide/ch-platform
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/hal/platform-implementations
|
%% SCRAP: architecture/03-architecture/hal/platform-implementations
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/hal/platform-implementations.md
|
%% SOURCE: docs/working/archive/dead/hal-target-contract/platform-implementations.md
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-platform
|
%% FITS: dev-guide/ch-platform
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/hal/starkernel-integration
|
%% SCRAP: architecture/03-architecture/hal/starkernel-integration
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/hal/starkernel-integration.md
|
%% SOURCE: docs/working/archive/dead/hal-target-contract/starkernel-integration.md
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-platform
|
%% FITS: dev-guide/ch-platform
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/heartbeat-system/implementation-plan
|
%% SCRAP: architecture/03-architecture/heartbeat-system/implementation-plan
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/heartbeat-system/implementation-plan.md
|
%% SOURCE: docs/working/archive/superseded/heartbeat-rate-logging-plan.md
|
||||||
%% STATUS: HISTORICAL
|
%% STATUS: HISTORICAL
|
||||||
%% FITS: dev-guide/ch-heartbeat
|
%% FITS: dev-guide/ch-heartbeat
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/physics-engine/feedback-loops-analysis
|
%% SCRAP: architecture/03-architecture/physics-engine/feedback-loops-analysis
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/physics-engine/feedback-loops-analysis.md
|
%% SOURCE: docs/working/archive/superseded/feedback-loops-analysis.md
|
||||||
%% STATUS: HISTORICAL
|
%% STATUS: HISTORICAL
|
||||||
%% FITS: dev-guide/ch-physics
|
%% FITS: dev-guide/ch-physics
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/physics-engine/metrics-and-knobs
|
%% SCRAP: architecture/03-architecture/physics-engine/metrics-and-knobs
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/physics-engine/metrics-and-knobs.md
|
%% SOURCE: docs/working/archive/dead/metrics-and-knobs.md
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-physics, cookbook/ch-physics
|
%% FITS: dev-guide/ch-physics, cookbook/ch-physics
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/physics-engine/steady-state-machine
|
%% SCRAP: architecture/03-architecture/physics-engine/steady-state-machine
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/physics-engine/steady-state-machine.md
|
%% SOURCE: docs/working/archive/superseded/steady-state-machine.md
|
||||||
%% STATUS: CURRENT
|
%% STATUS: CURRENT
|
||||||
%% FITS: dev-guide/ch-physics
|
%% FITS: dev-guide/ch-physics
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/03-architecture/word-acl/DESIGN
|
%% SCRAP: architecture/03-architecture/word-acl/DESIGN
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/word-acl/DESIGN.md
|
%% SOURCE: docs/reference/word-acl/DESIGN.md
|
||||||
%% STATUS: CURRENT
|
%% STATUS: CURRENT
|
||||||
%% FITS: dev-guide/ch-acl, cookbook/ch-acl
|
%% FITS: dev-guide/ch-acl, cookbook/ch-acl
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: architecture/getting-started/quick-start/factorial-doe
|
%% SCRAP: architecture/getting-started/quick-start/factorial-doe
|
||||||
%% SOURCE: docs/working/architecture/getting-started/quick-start/factorial-doe.md
|
%% SOURCE: docs/working/archive/superseded/factorial-doe/quick-start.md
|
||||||
%% STATUS: CURRENT
|
%% STATUS: CURRENT
|
||||||
%% FITS: cookbook/ch-doe
|
%% FITS: cookbook/ch-doe
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ The audit assigned priority as follows.
|
|||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
\item Add missing \texttt{README} files to all numbered directories.
|
\item Add missing \texttt{README} files to all numbered directories.
|
||||||
\item Update \texttt{CLAUDE.md} to reflect HAL and StarKernel vision.
|
\item Update \texttt{CLAUDE.md} to reflect HAL and StarKernel vision.
|
||||||
\item Create \texttt{docs/03-architecture/README.md} as a system overview.
|
\item Create \texttt{docs/working/archive/superseded/2026-08-tripod/03-architecture-README.md} as a system overview.
|
||||||
\end{itemize}
|
\end{itemize}
|
||||||
|
|
||||||
\textbf{Medium priority:}
|
\textbf{Medium priority:}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: experiments/02-experiments/L8_WIRING_PLAN
|
%% SCRAP: experiments/02-experiments/L8_WIRING_PLAN
|
||||||
%% SOURCE: docs/working/experiments/02-experiments/L8_WIRING_PLAN.md
|
%% SOURCE: docs/working/archive/superseded/L8_WIRING_PLAN.md
|
||||||
%% STATUS: HISTORICAL
|
%% STATUS: HISTORICAL
|
||||||
%% FITS: experiments/ch-l8
|
%% FITS: experiments/ch-l8
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: experiments/02-experiments/factorial-doe/guide
|
%% SCRAP: experiments/02-experiments/factorial-doe/guide
|
||||||
%% SOURCE: docs/working/experiments/02-experiments/factorial-doe/guide.md
|
%% SOURCE: docs/working/archive/superseded/factorial-doe/guide.md
|
||||||
%% STATUS: CURRENT
|
%% STATUS: CURRENT
|
||||||
%% FITS: experiments/ch-factorial, cookbook/ch-doe
|
%% FITS: experiments/ch-factorial, cookbook/ch-doe
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: experiments/02-experiments/factorial-doe/incompatible-configs
|
%% SCRAP: experiments/02-experiments/factorial-doe/incompatible-configs
|
||||||
%% SOURCE: docs/working/experiments/02-experiments/factorial-doe/incompatible-configs.md
|
%% SOURCE: docs/working/archive/superseded/factorial-doe/incompatible-configs.md
|
||||||
%% STATUS: CURRENT
|
%% STATUS: CURRENT
|
||||||
%% FITS: experiments/ch-factorial
|
%% FITS: experiments/ch-factorial
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: experiments/02-experiments/factorial-doe/index
|
%% SCRAP: experiments/02-experiments/factorial-doe/index
|
||||||
%% SOURCE: docs/working/experiments/02-experiments/factorial-doe/index.md
|
%% SOURCE: docs/working/archive/superseded/factorial-doe/index.md
|
||||||
%% STATUS: CURRENT
|
%% STATUS: CURRENT
|
||||||
%% FITS: experiments/ch-factorial
|
%% FITS: experiments/ch-factorial
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: experiments/02-experiments/factorial-doe/workflow
|
%% SCRAP: experiments/02-experiments/factorial-doe/workflow
|
||||||
%% SOURCE: docs/working/experiments/02-experiments/factorial-doe/workflow.md
|
%% SOURCE: docs/working/archive/superseded/factorial-doe/workflow.md
|
||||||
%% STATUS: CURRENT
|
%% STATUS: CURRENT
|
||||||
%% FITS: experiments/ch-factorial, cookbook/ch-doe
|
%% FITS: experiments/ch-factorial, cookbook/ch-doe
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: experiments/02-experiments/heartbeat-doe/corrected-design
|
%% SCRAP: experiments/02-experiments/heartbeat-doe/corrected-design
|
||||||
%% SOURCE: docs/working/experiments/02-experiments/heartbeat-doe/corrected-design.md
|
%% SOURCE: docs/working/archive/superseded/heartbeat-doe-corrected-design.md
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: experiments/ch-heartbeat
|
%% FITS: experiments/ch-heartbeat
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: experiments/02-experiments/heartbeat-doe/design
|
%% SCRAP: experiments/02-experiments/heartbeat-doe/design
|
||||||
%% SOURCE: docs/working/experiments/02-experiments/heartbeat-doe/design.md
|
%% SOURCE: docs/working/archive/superseded/heartbeat-doe-design.md
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: experiments/ch-heartbeat
|
%% FITS: experiments/ch-heartbeat
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: hardware/platform-integration/L4RE_DICTIONARY_ALLOCATION
|
%% SCRAP: hardware/platform-integration/L4RE_DICTIONARY_ALLOCATION
|
||||||
%% SOURCE: docs/working/hardware/platform-integration/L4RE_DICTIONARY_ALLOCATION.adoc
|
%% SOURCE: docs/working/archive/dead/l4re/L4RE_DICTIONARY_ALLOCATION.adoc
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-l4re
|
%% FITS: dev-guide/ch-l4re
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: hardware/platform-integration/L4RE_INTEGRATION
|
%% SCRAP: hardware/platform-integration/L4RE_INTEGRATION
|
||||||
%% SOURCE: docs/working/hardware/platform-integration/L4RE_INTEGRATION.adoc
|
%% SOURCE: docs/working/archive/dead/l4re/L4RE_INTEGRATION.adoc
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-l4re
|
%% FITS: dev-guide/ch-l4re
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: hardware/platform-integration/l_4_re_blkio_endpoints
|
%% SCRAP: hardware/platform-integration/l_4_re_blkio_endpoints
|
||||||
%% SOURCE: docs/working/hardware/platform-integration/l_4_re_blkio_endpoints.adoc
|
%% SOURCE: docs/working/archive/dead/l4re/l_4_re_blkio_endpoints.adoc
|
||||||
%% STATUS: WORKING
|
%% STATUS: WORKING
|
||||||
%% FITS: dev-guide/ch-l4re
|
%% FITS: dev-guide/ch-l4re
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ They are deferred to a later, build-verified pass.
|
|||||||
\toprule
|
\toprule
|
||||||
Path & Description \\
|
Path & Description \\
|
||||||
\midrule
|
\midrule
|
||||||
\texttt{docs/ontology.tex} / \texttt{.pdf} & Formal ontology source and compiled PDF; candidate for \texttt{formal/}. \\
|
\texttt{docs/working/papers/ontology.tex} / \texttt{.pdf} & Formal ontology source and compiled PDF; candidate for \texttt{formal/}. \\
|
||||||
\texttt{docs/ontology\_diagrams.dot} & Graphviz source for ontology diagrams. \\
|
\texttt{docs/ontology\_diagrams.dot} & Graphviz source for ontology diagrams. \\
|
||||||
\texttt{docs/fig\_*.png} / \texttt{.svg} & Shared figure assets referenced by ontology and system narrative LaTeX. \\
|
\texttt{docs/fig\_*.png} / \texttt{.svg} & Shared figure assets referenced by ontology and system narrative LaTeX. \\
|
||||||
\bottomrule
|
\bottomrule
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: papers/ONTOLOGY
|
%% SCRAP: papers/ONTOLOGY
|
||||||
%% SOURCE: docs/working/papers/ONTOLOGY.md
|
%% SOURCE: docs/reference/ONTOLOGY.md
|
||||||
%% STATUS: CURRENT
|
%% STATUS: CURRENT
|
||||||
%% FITS: ssrn/ch-ontology, vol3-research/ch-ontology
|
%% FITS: ssrn/ch-ontology, vol3-research/ch-ontology
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice; thermodynamic-as-metaphor framing preserved throughout
|
%% EDITORIAL: lifted — prose rewritten to press voice; thermodynamic-as-metaphor framing preserved throughout
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% SCRAP: scratch/src/L4RE_INTEGRATION_TODO
|
%% SCRAP: scratch/src/L4RE_INTEGRATION_TODO
|
||||||
%% SOURCE: docs/working/scratch/src/L4RE_INTEGRATION_TODO.adoc
|
%% SOURCE: docs/working/archive/dead/l4re/L4RE_INTEGRATION_TODO.adoc
|
||||||
%% STATUS: HISTORICAL
|
%% STATUS: HISTORICAL
|
||||||
%% FITS: dev-guide/ch-l4re
|
%% FITS: dev-guide/ch-l4re
|
||||||
%% EDITORIAL: lifted — prose rewritten to press voice
|
%% EDITORIAL: lifted — prose rewritten to press voice
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
%% SOURCE: docs/working/papers/published/James_Steady-State_Convergence_Adaptive_Runtime.pdf
|
%% SOURCE: docs/working/papers/published/James_Steady-State_Convergence_Adaptive_Runtime.pdf
|
||||||
%% docs/working/papers/SSRN_companion/Math_Companion_SSRN.tex
|
%% docs/working/papers/SSRN_companion/Math_Companion_SSRN.tex
|
||||||
%% docs/working/papers/FORMAL_CLAIM_TABLE.md
|
%% docs/working/papers/FORMAL_CLAIM_TABLE.md
|
||||||
%% docs/working/papers/ONTOLOGY.md
|
%% docs/reference/ONTOLOGY.md
|
||||||
%% NOTE: The SSRN paper itself is a published PDF — it is NOT re-typeset here.
|
%% NOTE: The SSRN paper itself is a published PDF — it is NOT re-typeset here.
|
||||||
%% This volume collects the companion material: Math Companion (full LaTeX),
|
%% This volume collects the companion material: Math Companion (full LaTeX),
|
||||||
%% formal claim tables, ontology, and academic wording guidelines.
|
%% formal claim tables, ontology, and academic wording guidelines.
|
||||||
@@ -84,7 +84,7 @@ The canonical paper PDF is at:
|
|||||||
\part{Ontology of Terms}
|
\part{Ontology of Terms}
|
||||||
|
|
||||||
\chapter{Thermodynamic Metaphor Ontology}
|
\chapter{Thermodynamic Metaphor Ontology}
|
||||||
%% SOURCE: docs/working/papers/ONTOLOGY.md
|
%% SOURCE: docs/reference/ONTOLOGY.md
|
||||||
%% NOTE: Thermodynamic terms are modeling tools, not physics claims.
|
%% NOTE: Thermodynamic terms are modeling tools, not physics claims.
|
||||||
%% Always introduce with domain qualifier: "using X as a proxy for Y, …"
|
%% Always introduce with domain qualifier: "using X as a proxy for Y, …"
|
||||||
\input{../scraps/papers/ONTOLOGY}
|
\input{../scraps/papers/ONTOLOGY}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Built via `make -C docs/formal vol2`; output lands at
|
|||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
- [`docs/lithosananke/README.md`](../../lithosananke/README.md) — the
|
- [`docs/working/archive/historical/2026-10-lithosananke-orientation.md`](../../lithosananke/README.md) — the
|
||||||
living kernel-branch documentation this volume draws from.
|
living kernel-branch documentation this volume draws from.
|
||||||
- [`docs/formal/README.md`](../README.md) — the three research volumes
|
- [`docs/formal/README.md`](../README.md) — the three research volumes
|
||||||
this belongs to (with `vol1-vm-physics/` and `vol3-research/`).
|
this belongs to (with `vol1-vm-physics/` and `vol3-research/`).
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% Vol II, Chapter 3 — ACL and Security Model
|
%% Vol II, Chapter 3 — ACL and Security Model
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/word-acl/DESIGN.md
|
%% SOURCE: docs/reference/word-acl/DESIGN.md
|
||||||
%% .claude/CLAUDE.md (Word-Level ACL System section)
|
%% .claude/CLAUDE.md (Word-Level ACL System section)
|
||||||
%% capsules/ACL.4th, capsules/zuse.4th
|
%% capsules/ACL.4th, capsules/zuse.4th
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
\section{Two-Console Model}
|
\section{Two-Console Model}
|
||||||
\label{vol2:sec:acl:consoles}
|
\label{vol2:sec:acl:consoles}
|
||||||
|
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/word-acl/DESIGN.md
|
%% SOURCE: docs/reference/word-acl/DESIGN.md
|
||||||
%% TODO(bob): describe the two permanent console layers:
|
%% TODO(bob): describe the two permanent console layers:
|
||||||
%% - emergency console (ok>) — fault handler active
|
%% - emergency console (ok>) — fault handler active
|
||||||
%% - zuse console (zuse)ok>) — superuser authenticated
|
%% - zuse console (zuse)ok>) — superuser authenticated
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
%% Vol II, Chapter 4 — Platform Support
|
%% Vol II, Chapter 4 — Platform Support
|
||||||
%% SOURCE: docs/working/scratch/src/platform-integration/ (multiple .adoc files)
|
%% SOURCE: docs/working/scratch/src/platform-integration/ (multiple .adoc files)
|
||||||
%% docs/working/architecture/03-architecture/hal/ (HAL design — aspirational)
|
%% docs/working/archive/dead/hal-target-contract/ (HAL design — aspirational)
|
||||||
%% .claude/CLAUDE.md (Platform abstraction, build targets)
|
%% .claude/CLAUDE.md (Platform abstraction, build targets)
|
||||||
|
|
||||||
\chapter{Platform Support}
|
\chapter{Platform Support}
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
\section{Platform Abstraction Layer (HAL Target)}
|
\section{Platform Abstraction Layer (HAL Target)}
|
||||||
\label{vol2:sec:platforms:hal}
|
\label{vol2:sec:platforms:hal}
|
||||||
|
|
||||||
%% SOURCE: docs/working/architecture/03-architecture/hal/overview.md
|
%% SOURCE: docs/working/archive/dead/hal-target-contract/overview.md
|
||||||
%% IMPORTANT: the hal_* API described in the hal/ doc family is the TARGET
|
%% IMPORTANT: the hal_* API described in the hal/ doc family is the TARGET
|
||||||
%% design, not the current codebase. Current code uses sf_time_backend_t-style
|
%% design, not the current codebase. Current code uses sf_time_backend_t-style
|
||||||
%% naming. This section describes the planned migration.
|
%% naming. This section describes the planned migration.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
%% Vol III, Chapter 6 — Ontology of Thermodynamic Terms
|
%% Vol III, Chapter 6 — Ontology of Thermodynamic Terms
|
||||||
%% SOURCE: docs/working/papers/ONTOLOGY.md
|
%% SOURCE: docs/reference/ONTOLOGY.md
|
||||||
%% docs/working/papers/ONTOLOGY_README.md
|
%% docs/working/papers/ONTOLOGY_README.md
|
||||||
|
|
||||||
\chapter{Ontology of Thermodynamic Terms}
|
\chapter{Ontology of Thermodynamic Terms}
|
||||||
|
|||||||
@@ -1,84 +0,0 @@
|
|||||||
# LithosAnanke Hardware Abstraction Layer (HAL)
|
|
||||||
|
|
||||||
This directory contains HAL documentation for the LithosAnanke kernel branch.
|
|
||||||
|
|
||||||
> **HISTORICAL — L4Re/Fiasco.OC**: L4Re references throughout this directory's docs describe a target that was a supported platform through mid-2026. L4Re support has since been removed as an active target — `src/platform/l4re/time.c` and related `#ifdef __l4__` code are retained for reference but no longer wired into any build.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Document Overview
|
|
||||||
|
|
||||||
| Document | Purpose |
|
|
||||||
|----------|---------|
|
|
||||||
| [overview.md](overview.md) | HAL architecture and design principles |
|
|
||||||
| [interfaces.md](interfaces.md) | HAL function specifications and contracts |
|
|
||||||
| [lithosananke-integration.md](lithosananke-integration.md) | Kernel-specific HAL implementation |
|
|
||||||
| [platform-implementations.md](platform-implementations.md) | How to implement HAL for a platform |
|
|
||||||
| [migration-plan.md](migration-plan.md) | Migration from hosted to kernel |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Reading Order
|
|
||||||
|
|
||||||
1. **overview.md** — Understand why HAL exists
|
|
||||||
2. **interfaces.md** — Learn the contracts
|
|
||||||
3. **lithosananke-integration.md** — See kernel implementation
|
|
||||||
4. **platform-implementations.md** — Reference implementations
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## HAL Subsystems
|
|
||||||
|
|
||||||
```
|
|
||||||
hal_time.h — Monotonic time, timers
|
|
||||||
hal_interrupt.h — IRQ management, ISR registration
|
|
||||||
hal_memory.h — Allocation, page mapping
|
|
||||||
hal_console.h — Character I/O (UART, framebuffer)
|
|
||||||
hal_cpu.h — CPU ID, relax/halt, SMP
|
|
||||||
hal_panic.h — Fatal error handling
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Current State (lithosananke branch)
|
|
||||||
|
|
||||||
The HAL is **partially implemented** in LithosAnanke:
|
|
||||||
|
|
||||||
| Subsystem | Status | Location |
|
|
||||||
|-----------|--------|----------|
|
|
||||||
| Time | Implemented | `src/starkernel/arch/amd64/timer.c` |
|
|
||||||
| Interrupts | Implemented | `src/starkernel/arch/amd64/interrupts.c` |
|
|
||||||
| Memory | Implemented | `src/starkernel/memory/` |
|
|
||||||
| Console | Implemented | `src/starkernel/hal/console.c` |
|
|
||||||
| CPU | Partial | `src/starkernel/arch/amd64/apic.c` |
|
|
||||||
| Panic | Implemented | `src/starkernel/hal/hal.c` |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Relationship to Hosted StarForth
|
|
||||||
|
|
||||||
The HAL enables the same VM code to run on:
|
|
||||||
|
|
||||||
- **Linux** (hosted, POSIX)
|
|
||||||
- **LithosAnanke** (freestanding, bare metal)
|
|
||||||
- **L4Re** (microkernel, optional)
|
|
||||||
|
|
||||||
```
|
|
||||||
┌─────────────────────────────────────┐
|
|
||||||
│ StarForth VM + Physics Subsystems │
|
|
||||||
│ (platform-agnostic) │
|
|
||||||
├─────────────────────────────────────┤
|
|
||||||
│ HAL Layer │
|
|
||||||
├──────────┬──────────┬───────────────┤
|
|
||||||
│ Linux │ L4Re │ LithosAnanke │
|
|
||||||
│ (POSIX) │ (micro) │ (kernel) │
|
|
||||||
└──────────┴──────────┴───────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## See Also
|
|
||||||
|
|
||||||
- [../README.md](../README.md) — LithosAnanke overview
|
|
||||||
- [../ROADMAP.md](../ROADMAP.md) — Milestone roadmap
|
|
||||||
- [../M7.1.md](../M7.1.md) — Init Capsule Architecture
|
|
||||||
@@ -1,703 +0,0 @@
|
|||||||
# HAL Interface Specifications
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
This document defines the **contract** for each HAL subsystem. These interfaces are platform-agnostic and must be implemented identically (semantically) on all platforms.
|
|
||||||
|
|
||||||
> **HISTORICAL — L4Re/Fiasco.OC**: L4Re references below describe a target that was a supported platform through mid-2026. L4Re support has since been removed as an active target — `src/platform/l4re/time.c` and related `#ifdef __l4__` code are retained for reference but no longer wired into any build.
|
|
||||||
|
|
||||||
**Critical:** These are not optional "convenience wrappers"—they are the **only** way VM and physics code access platform resources.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 1. Time & Timers (`include/hal/hal_time.h`)
|
|
||||||
|
|
||||||
### Purpose
|
|
||||||
Provide monotonic time, periodic/oneshot timers, and calibration for physics subsystems.
|
|
||||||
|
|
||||||
### Interface
|
|
||||||
|
|
||||||
```c
|
|
||||||
#ifndef HAL_TIME_H
|
|
||||||
#define HAL_TIME_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize time subsystem.
|
|
||||||
* Must be called before any other hal_time_* functions.
|
|
||||||
*
|
|
||||||
* Responsibilities:
|
|
||||||
* - Calibrate high-resolution timer (TSC, HPET, etc.)
|
|
||||||
* - Validate monotonicity
|
|
||||||
* - Set up timer interrupt sources (if needed)
|
|
||||||
*
|
|
||||||
* Error handling:
|
|
||||||
* - hal_panic() if no suitable time source available
|
|
||||||
* - hal_panic() if calibration fails
|
|
||||||
*/
|
|
||||||
void hal_time_init(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get current monotonic time in nanoseconds.
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - MUST be monotonic (never goes backward)
|
|
||||||
* - SHOULD have sub-microsecond resolution
|
|
||||||
* - MUST be callable from interrupt context (ISR-safe)
|
|
||||||
* - MUST be callable concurrently (thread-safe)
|
|
||||||
*
|
|
||||||
* Performance:
|
|
||||||
* - Target: < 50 cycles on x86_64
|
|
||||||
* - Acceptable: < 200 cycles
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - Nanoseconds since arbitrary epoch (typically boot time)
|
|
||||||
*/
|
|
||||||
uint64_t hal_time_now_ns(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Busy-wait delay for specified nanoseconds.
|
|
||||||
* Used for calibration and short delays.
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - MUST delay for at least `ns` nanoseconds
|
|
||||||
* - MAY delay longer (but not by more than 10%)
|
|
||||||
* - MUST be callable from interrupt context
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - ns: Nanoseconds to delay (0 = no delay)
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - This is a busy-wait, not a sleep
|
|
||||||
* - For delays > 1ms, prefer hal_timer_oneshot()
|
|
||||||
*/
|
|
||||||
void hal_time_delay_ns(uint64_t ns);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Timer callback function type.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - ctx: User-provided context pointer
|
|
||||||
*
|
|
||||||
* Context:
|
|
||||||
* - MAY be called from interrupt context (ISR)
|
|
||||||
* - MUST NOT block or sleep
|
|
||||||
* - MUST complete quickly (< 10µs target)
|
|
||||||
*/
|
|
||||||
typedef void (*hal_timer_callback_t)(void *ctx);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Schedule a oneshot timer to fire after specified nanoseconds.
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Callback will fire at least `ns` nanoseconds in the future
|
|
||||||
* - MAY fire up to 10% late (jitter allowed)
|
|
||||||
* - Callback runs in interrupt context (ISR)
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - ns: Nanoseconds until callback fires (0 = ASAP)
|
|
||||||
* - callback: Function to call when timer fires
|
|
||||||
* - ctx: User context passed to callback
|
|
||||||
*
|
|
||||||
* Error handling:
|
|
||||||
* - Returns 0 on success
|
|
||||||
* - Returns -1 if timer resources exhausted
|
|
||||||
*
|
|
||||||
* Concurrency:
|
|
||||||
* - Thread-safe (can be called from multiple threads)
|
|
||||||
* - NOT reentrant from same timer callback
|
|
||||||
*/
|
|
||||||
int hal_timer_oneshot(uint64_t ns, hal_timer_callback_t callback, void *ctx);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Schedule a periodic timer to fire every `period_ns` nanoseconds.
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Callback will fire repeatedly at ~period_ns intervals
|
|
||||||
* - Jitter: < 10% of period (target: < 1%)
|
|
||||||
* - Callback runs in interrupt context (ISR)
|
|
||||||
* - Timer continues until hal_timer_cancel() called
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - period_ns: Period in nanoseconds (minimum: 1000ns = 1µs)
|
|
||||||
* - callback: Function to call on each period
|
|
||||||
* - ctx: User context passed to callback
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - Timer ID (> 0) on success
|
|
||||||
* - -1 if timer resources exhausted
|
|
||||||
* - -2 if period_ns < minimum
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - This is the PRIMARY mechanism for heartbeat ISR
|
|
||||||
* - Platform MUST minimize jitter for experimental validity
|
|
||||||
*/
|
|
||||||
int hal_timer_periodic(uint64_t period_ns, hal_timer_callback_t callback, void *ctx);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Cancel a periodic timer.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - timer_id: ID returned from hal_timer_periodic()
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Callback will not fire after this call returns
|
|
||||||
* - Safe to call even if timer already fired or was cancelled
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - 0 on success
|
|
||||||
* - -1 if timer_id invalid
|
|
||||||
*/
|
|
||||||
int hal_timer_cancel(int timer_id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get timer frequency in Hz.
|
|
||||||
* Used for diagnostics and experiment metadata.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - Frequency of underlying time source (e.g., TSC frequency)
|
|
||||||
* - 0 if frequency is variable or unknown
|
|
||||||
*/
|
|
||||||
uint64_t hal_time_frequency_hz(void);
|
|
||||||
|
|
||||||
#endif /* HAL_TIME_H */
|
|
||||||
```
|
|
||||||
|
|
||||||
### Platform Implementation Notes
|
|
||||||
|
|
||||||
**Linux (`platform/linux/hal_time.c`):**
|
|
||||||
- `hal_time_now_ns()` → `clock_gettime(CLOCK_MONOTONIC)`
|
|
||||||
- `hal_timer_periodic()` → `timer_create()` with `SIGRTMIN` + signal handler
|
|
||||||
- Challenge: Signal-based timers have ~1-10µs latency jitter
|
|
||||||
|
|
||||||
**L4Re (`platform/l4re/hal_time.c`):**
|
|
||||||
- `hal_time_now_ns()` → `l4re_kip_clock()`
|
|
||||||
- `hal_timer_periodic()` → L4Re IPC-based timer + IRQ object
|
|
||||||
- Challenge: IPC overhead, but lower jitter than Linux
|
|
||||||
|
|
||||||
**Kernel (`platform/kernel/hal_time.c`):**
|
|
||||||
- `hal_time_now_ns()` → `rdtsc()` calibrated against HPET
|
|
||||||
- `hal_timer_periodic()` → APIC timer interrupt
|
|
||||||
- Challenge: TSC drift on old hardware, calibration complexity
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 2. Interrupts (`include/hal/hal_interrupt.h`)
|
|
||||||
|
|
||||||
### Purpose
|
|
||||||
Enable/disable interrupts, register ISRs, query interrupt context.
|
|
||||||
|
|
||||||
### Interface
|
|
||||||
|
|
||||||
```c
|
|
||||||
#ifndef HAL_INTERRUPT_H
|
|
||||||
#define HAL_INTERRUPT_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize interrupt subsystem.
|
|
||||||
* Must be called before any other hal_interrupt_* functions.
|
|
||||||
*
|
|
||||||
* Responsibilities:
|
|
||||||
* - Set up interrupt controller (PIC/APIC on x86_64)
|
|
||||||
* - Initialize IDT (on kernel platforms)
|
|
||||||
* - Prepare for ISR registration
|
|
||||||
*
|
|
||||||
* Error handling:
|
|
||||||
* - hal_panic() if interrupt controller unavailable
|
|
||||||
*/
|
|
||||||
void hal_interrupt_init(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Enable interrupts globally.
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Interrupts will be delivered after this call
|
|
||||||
* - Safe to call multiple times (idempotent)
|
|
||||||
* - NOT callable from interrupt context
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - On x86_64 kernel: sti
|
|
||||||
* - On Linux: no-op (interrupts always enabled)
|
|
||||||
*/
|
|
||||||
void hal_irq_enable(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Disable interrupts globally.
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Interrupts will NOT be delivered after this call
|
|
||||||
* - Safe to call multiple times (idempotent)
|
|
||||||
* - Callable from interrupt context
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - Previous interrupt state (for hal_irq_restore)
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - On x86_64 kernel: cli
|
|
||||||
* - On Linux: no-op (interrupts always enabled)
|
|
||||||
*/
|
|
||||||
unsigned long hal_irq_disable(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Restore previous interrupt state.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - state: Value returned from hal_irq_disable()
|
|
||||||
*
|
|
||||||
* Use case:
|
|
||||||
* unsigned long flags = hal_irq_disable();
|
|
||||||
* // critical section
|
|
||||||
* hal_irq_restore(flags);
|
|
||||||
*/
|
|
||||||
void hal_irq_restore(unsigned long state);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Interrupt service routine function type.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - irq: IRQ number that triggered
|
|
||||||
* - ctx: User-provided context pointer
|
|
||||||
*
|
|
||||||
* Context:
|
|
||||||
* - ALWAYS called from interrupt context
|
|
||||||
* - MUST NOT block or sleep
|
|
||||||
* - MUST complete quickly (< 10µs target, < 100µs acceptable)
|
|
||||||
* - MUST NOT call non-ISR-safe HAL functions
|
|
||||||
*/
|
|
||||||
typedef void (*hal_isr_t)(unsigned int irq, void *ctx);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Register an interrupt service routine.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - irq: IRQ number to register (platform-specific numbering)
|
|
||||||
* - isr: Function to call when IRQ fires
|
|
||||||
* - ctx: User context passed to ISR
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - ISR will be called when IRQ fires
|
|
||||||
* - Only one ISR per IRQ (replaces previous if registered)
|
|
||||||
* - ISR runs with interrupts disabled (not reentrant)
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - 0 on success
|
|
||||||
* - -1 if IRQ number invalid
|
|
||||||
* - -2 if ISR registration failed
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - Used by hal_timer_periodic() internally
|
|
||||||
* - Used by device drivers for hardware IRQs
|
|
||||||
*/
|
|
||||||
int hal_irq_register(unsigned int irq, hal_isr_t isr, void *ctx);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unregister an interrupt service routine.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - irq: IRQ number to unregister
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - 0 on success
|
|
||||||
* - -1 if IRQ was not registered
|
|
||||||
*/
|
|
||||||
int hal_irq_unregister(unsigned int irq);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if currently executing in interrupt context.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - 1 if in interrupt context (ISR)
|
|
||||||
* - 0 if in normal execution context
|
|
||||||
*
|
|
||||||
* Use case:
|
|
||||||
* - Validate ISR-only functions (e.g., heartbeat sampling)
|
|
||||||
* - Conditional behavior (ISR vs. normal path)
|
|
||||||
*
|
|
||||||
* Performance:
|
|
||||||
* - MUST be fast (< 10 cycles)
|
|
||||||
* - Often implemented as checking a per-CPU flag
|
|
||||||
*/
|
|
||||||
int hal_in_interrupt_context(void);
|
|
||||||
|
|
||||||
#endif /* HAL_INTERRUPT_H */
|
|
||||||
```
|
|
||||||
|
|
||||||
### Platform Implementation Notes
|
|
||||||
|
|
||||||
**Linux:**
|
|
||||||
- `hal_irq_enable/disable()` → no-op (can't disable signals)
|
|
||||||
- `hal_irq_register()` → `sigaction()` + signal handler
|
|
||||||
- `hal_in_interrupt_context()` → thread-local flag set by signal handler
|
|
||||||
|
|
||||||
**Kernel:**
|
|
||||||
- `hal_irq_enable/disable()` → `sti`/`cli` (x86_64)
|
|
||||||
- `hal_irq_register()` → IDT entry + APIC configuration
|
|
||||||
- `hal_in_interrupt_context()` → check per-CPU interrupt nesting count
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 3. Memory (`include/hal/hal_memory.h`)
|
|
||||||
|
|
||||||
### Purpose
|
|
||||||
Allocate/free memory, map pages, manage heap.
|
|
||||||
|
|
||||||
### Interface
|
|
||||||
|
|
||||||
```c
|
|
||||||
#ifndef HAL_MEMORY_H
|
|
||||||
#define HAL_MEMORY_H
|
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize memory subsystem.
|
|
||||||
* Must be called before any other hal_mem_* functions.
|
|
||||||
*
|
|
||||||
* Responsibilities:
|
|
||||||
* - Set up heap allocator
|
|
||||||
* - Initialize page tables (kernel platforms)
|
|
||||||
* - Parse memory map (kernel platforms)
|
|
||||||
*
|
|
||||||
* Error handling:
|
|
||||||
* - hal_panic() if insufficient memory
|
|
||||||
*/
|
|
||||||
void hal_mem_init(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allocate memory from heap.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - size: Bytes to allocate (0 = returns NULL)
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Returns aligned pointer (at least 8-byte aligned)
|
|
||||||
* - Memory is zero-initialized
|
|
||||||
* - Thread-safe (can be called concurrently)
|
|
||||||
* - NOT callable from interrupt context
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - Pointer to allocated memory
|
|
||||||
* - NULL if allocation failed
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - On Linux: wrapper around malloc()
|
|
||||||
* - On kernel: custom heap allocator (kmalloc)
|
|
||||||
*/
|
|
||||||
void *hal_mem_alloc(size_t size);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Free memory allocated by hal_mem_alloc().
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - ptr: Pointer returned from hal_mem_alloc() (NULL = no-op)
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Thread-safe
|
|
||||||
* - NOT callable from interrupt context
|
|
||||||
* - Safe to call with NULL
|
|
||||||
*/
|
|
||||||
void hal_mem_free(void *ptr);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allocate contiguous physical pages.
|
|
||||||
* Used for DMA buffers, page tables, large allocations.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - count: Number of pages to allocate (page size is platform-specific)
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - Physical address of first page
|
|
||||||
* - 0 if allocation failed
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - Pages are NOT mapped into virtual address space
|
|
||||||
* - Caller must call hal_mem_map() to access
|
|
||||||
* - On Linux: may use mmap() with MAP_ANONYMOUS
|
|
||||||
* - On kernel: physical memory manager (PMM)
|
|
||||||
*/
|
|
||||||
uint64_t hal_mem_alloc_pages(size_t count);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Free physical pages allocated by hal_mem_alloc_pages().
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - paddr: Physical address returned from hal_mem_alloc_pages()
|
|
||||||
* - count: Number of pages to free
|
|
||||||
*/
|
|
||||||
void hal_mem_free_pages(uint64_t paddr, size_t count);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Map physical memory into virtual address space.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - vaddr: Virtual address to map (must be page-aligned)
|
|
||||||
* - paddr: Physical address to map (must be page-aligned)
|
|
||||||
* - size: Size in bytes (must be page-multiple)
|
|
||||||
* - flags: Mapping flags (HAL_MEM_*)
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - 0 on success
|
|
||||||
* - -1 if mapping failed
|
|
||||||
*
|
|
||||||
* Flags:
|
|
||||||
* - HAL_MEM_READ: Readable
|
|
||||||
* - HAL_MEM_WRITE: Writable
|
|
||||||
* - HAL_MEM_EXEC: Executable
|
|
||||||
* - HAL_MEM_NOCACHE: Uncached (for MMIO)
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - On Linux: no-op (identity mapping assumed)
|
|
||||||
* - On kernel: update page tables, flush TLB
|
|
||||||
*/
|
|
||||||
int hal_mem_map(uint64_t vaddr, uint64_t paddr, size_t size, unsigned int flags);
|
|
||||||
|
|
||||||
/* Mapping flags */
|
|
||||||
#define HAL_MEM_READ (1 << 0)
|
|
||||||
#define HAL_MEM_WRITE (1 << 1)
|
|
||||||
#define HAL_MEM_EXEC (1 << 2)
|
|
||||||
#define HAL_MEM_NOCACHE (1 << 3)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get page size in bytes.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - Page size (typically 4096 on x86_64)
|
|
||||||
*/
|
|
||||||
size_t hal_mem_page_size(void);
|
|
||||||
|
|
||||||
#endif /* HAL_MEMORY_H */
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 4. Console (`include/hal/hal_console.h`)
|
|
||||||
|
|
||||||
### Purpose
|
|
||||||
Character I/O for REPL and diagnostics.
|
|
||||||
|
|
||||||
### Interface
|
|
||||||
|
|
||||||
```c
|
|
||||||
#ifndef HAL_CONSOLE_H
|
|
||||||
#define HAL_CONSOLE_H
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize console subsystem.
|
|
||||||
* Must be called before any other hal_console_* functions.
|
|
||||||
*
|
|
||||||
* Responsibilities:
|
|
||||||
* - Initialize UART (kernel platforms)
|
|
||||||
* - Set up framebuffer (if available)
|
|
||||||
* - Configure terminal settings (Linux)
|
|
||||||
*
|
|
||||||
* Error handling:
|
|
||||||
* - hal_panic() if no console available
|
|
||||||
*/
|
|
||||||
void hal_console_init(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Write a single character to console.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - c: Character to write
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Character will be visible on console
|
|
||||||
* - Blocking (waits if output buffer full)
|
|
||||||
* - Callable from interrupt context (for panic messages)
|
|
||||||
*
|
|
||||||
* Performance:
|
|
||||||
* - May be slow (UART is ~1µs per char)
|
|
||||||
* - Buffering recommended for bulk output
|
|
||||||
*/
|
|
||||||
void hal_console_putc(char c);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Write a null-terminated string to console.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - s: String to write (NULL = no-op)
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - Convenience wrapper around hal_console_putc()
|
|
||||||
*/
|
|
||||||
void hal_console_puts(const char *s);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Read a single character from console.
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Blocking (waits until character available)
|
|
||||||
* - NOT callable from interrupt context
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - Character read (0-255)
|
|
||||||
* - -1 on error or EOF
|
|
||||||
*/
|
|
||||||
int hal_console_getc(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Check if input is available (non-blocking).
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - 1 if character available (hal_console_getc() will not block)
|
|
||||||
* - 0 if no character available
|
|
||||||
*/
|
|
||||||
int hal_console_has_input(void);
|
|
||||||
|
|
||||||
#endif /* HAL_CONSOLE_H */
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 5. CPU (`include/hal/hal_cpu.h`)
|
|
||||||
|
|
||||||
### Purpose
|
|
||||||
CPU identification, relax/halt, SMP coordination.
|
|
||||||
|
|
||||||
### Interface
|
|
||||||
|
|
||||||
```c
|
|
||||||
#ifndef HAL_CPU_H
|
|
||||||
#define HAL_CPU_H
|
|
||||||
|
|
||||||
#include <stdint.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Initialize CPU subsystem.
|
|
||||||
* Must be called before any other hal_cpu_* functions.
|
|
||||||
*
|
|
||||||
* Responsibilities:
|
|
||||||
* - Detect CPU features (SSE, AVX, etc.)
|
|
||||||
* - Set up per-CPU storage
|
|
||||||
* - Bring up secondary CPUs (SMP)
|
|
||||||
*
|
|
||||||
* Error handling:
|
|
||||||
* - hal_panic() if CPU unsupported
|
|
||||||
*/
|
|
||||||
void hal_cpu_init(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get current CPU ID.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - CPU ID (0 = boot processor, 1+ = application processors)
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Callable from interrupt context
|
|
||||||
* - Fast (< 10 cycles)
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - On x86_64 kernel: APIC ID
|
|
||||||
* - On Linux: thread ID (not true CPU ID)
|
|
||||||
*/
|
|
||||||
unsigned int hal_cpu_id(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Hint to CPU to relax (pause in spin-wait loop).
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - Callable from interrupt context
|
|
||||||
* - No functional effect (pure performance hint)
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - On x86_64: pause instruction
|
|
||||||
* - On ARM: yield instruction
|
|
||||||
* - On Linux: sched_yield()
|
|
||||||
*/
|
|
||||||
void hal_cpu_relax(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Halt CPU until next interrupt.
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - CPU enters low-power state
|
|
||||||
* - Wakes on next interrupt
|
|
||||||
* - NOT callable from interrupt context
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - On x86_64 kernel: hlt instruction
|
|
||||||
* - On Linux: select() or nanosleep()
|
|
||||||
*/
|
|
||||||
void hal_cpu_halt(void);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get number of CPUs in system.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* - Number of CPUs (1 = single-core, 2+ = multi-core)
|
|
||||||
*/
|
|
||||||
unsigned int hal_cpu_count(void);
|
|
||||||
|
|
||||||
#endif /* HAL_CPU_H */
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 6. Panic/Error Handling (`include/hal/hal_panic.h`)
|
|
||||||
|
|
||||||
### Purpose
|
|
||||||
Fatal error handling (system halt or abort).
|
|
||||||
|
|
||||||
### Interface
|
|
||||||
|
|
||||||
```c
|
|
||||||
#ifndef HAL_PANIC_H
|
|
||||||
#define HAL_PANIC_H
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fatal error: print message and halt system.
|
|
||||||
*
|
|
||||||
* Parameters:
|
|
||||||
* - msg: Error message (NULL = "panic")
|
|
||||||
*
|
|
||||||
* Guarantees:
|
|
||||||
* - NEVER returns
|
|
||||||
* - Message printed to console (if available)
|
|
||||||
* - System halted (kernel) or abort() (hosted)
|
|
||||||
* - Callable from interrupt context
|
|
||||||
*
|
|
||||||
* Notes:
|
|
||||||
* - Use for unrecoverable errors only
|
|
||||||
* - On kernel: disable interrupts + hlt loop
|
|
||||||
* - On Linux: fprintf(stderr) + abort()
|
|
||||||
*/
|
|
||||||
void hal_panic(const char *msg) __attribute__((noreturn));
|
|
||||||
|
|
||||||
#endif /* HAL_PANIC_H */
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Interface Summary
|
|
||||||
|
|
||||||
| Subsystem | Key Functions | ISR-Safe | Thread-Safe |
|
|
||||||
|-----------|---------------|----------|-------------|
|
|
||||||
| **Time** | `hal_time_now_ns()` | ✅ | ✅ |
|
|
||||||
| | `hal_timer_periodic()` | ❌ | ✅ |
|
|
||||||
| **Interrupt** | `hal_in_interrupt_context()` | ✅ | ✅ |
|
|
||||||
| | `hal_irq_disable()` | ✅ | ✅ |
|
|
||||||
| **Memory** | `hal_mem_alloc()` | ❌ | ✅ |
|
|
||||||
| | `hal_mem_map()` | ❌ | ⚠️ |
|
|
||||||
| **Console** | `hal_console_putc()` | ✅ | ⚠️ |
|
|
||||||
| | `hal_console_getc()` | ❌ | ❌ |
|
|
||||||
| **CPU** | `hal_cpu_id()` | ✅ | ✅ |
|
|
||||||
| | `hal_cpu_relax()` | ✅ | ✅ |
|
|
||||||
|
|
||||||
**Legend:**
|
|
||||||
- ✅ = Safe
|
|
||||||
- ❌ = Unsafe
|
|
||||||
- ⚠️ = Platform-dependent
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Next Steps
|
|
||||||
|
|
||||||
See companion documentation:
|
|
||||||
- `platform-implementations.md` - How to implement HAL for a platform
|
|
||||||
- `migration-plan.md` - Refactoring existing code to use HAL
|
|
||||||
- `lithosananke-integration.md` - LithosAnanke-specific HAL implementation
|
|
||||||
@@ -1,763 +0,0 @@
|
|||||||
# LithosAnanke HAL Integration Guide
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
This document provides **kernel-specific implementation details** for the HAL platform layer that becomes LithosAnanke. It covers UEFI boot, freestanding C environment, hardware initialization, and the path to a working `ok` prompt.
|
|
||||||
|
|
||||||
**Audience:** Kernel developers implementing `src/platform/kernel/`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## LithosAnanke Architecture
|
|
||||||
|
|
||||||
```
|
|
||||||
┌─────────────────────────────────────────────────────────────┐
|
|
||||||
│ UEFI Firmware │
|
|
||||||
│ • Initializes hardware │
|
|
||||||
│ • Provides boot services (memory map, ACPI, GOP) │
|
|
||||||
│ • Loads BOOTX64.EFI │
|
|
||||||
└─────────────────────┬───────────────────────────────────────┘
|
|
||||||
│
|
|
||||||
↓ ExitBootServices()
|
|
||||||
┌─────────────────────────────────────────────────────────────┐
|
|
||||||
│ LithosAnanke Boot Loader (stage 0) │
|
|
||||||
│ • Collects BootInfo (memory map, ACPI tables, framebuffer) │
|
|
||||||
│ • Sets up initial page tables │
|
|
||||||
│ • Exits UEFI boot services │
|
|
||||||
│ • Jumps to LithosAnanke proper │
|
|
||||||
└─────────────────────┬───────────────────────────────────────┘
|
|
||||||
│
|
|
||||||
↓
|
|
||||||
┌─────────────────────────────────────────────────────────────┐
|
|
||||||
│ LithosAnanke HAL (stage 1) │
|
|
||||||
│ • CPU initialization (GDT, IDT, interrupts) │
|
|
||||||
│ • Memory subsystem (PMM, VMM, heap) │
|
|
||||||
│ • Time subsystem (TSC, HPET, APIC timer) │
|
|
||||||
│ • Console (UART + framebuffer) │
|
|
||||||
└─────────────────────┬───────────────────────────────────────┘
|
|
||||||
│
|
|
||||||
↓
|
|
||||||
┌─────────────────────────────────────────────────────────────┐
|
|
||||||
│ StarForth VM │
|
|
||||||
│ • vm_create() │
|
|
||||||
│ • Initialize physics subsystems │
|
|
||||||
│ • Start REPL │
|
|
||||||
│ • Print "ok" prompt │
|
|
||||||
└─────────────────────────────────────────────────────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Directory Structure
|
|
||||||
|
|
||||||
```
|
|
||||||
src/platform/kernel/
|
|
||||||
├── boot/
|
|
||||||
│ ├── uefi_loader.c # UEFI entry point (BOOTX64.EFI)
|
|
||||||
│ ├── bootinfo.h # BootInfo struct definition
|
|
||||||
│ └── handoff.S # ASM trampoline (UEFI → LithosAnanke)
|
|
||||||
│
|
|
||||||
├── cpu/
|
|
||||||
│ ├── gdt.c # Global Descriptor Table
|
|
||||||
│ ├── idt.c # Interrupt Descriptor Table
|
|
||||||
│ ├── isr.S # Interrupt service routine stubs
|
|
||||||
│ └── smp.c # SMP bring-up (future)
|
|
||||||
│
|
|
||||||
├── mm/
|
|
||||||
│ ├── pmm.c # Physical Memory Manager
|
|
||||||
│ ├── vmm.c # Virtual Memory Manager
|
|
||||||
│ ├── kmalloc.c # Kernel heap allocator
|
|
||||||
│ └── paging.S # Page table manipulation ASM
|
|
||||||
│
|
|
||||||
├── time/
|
|
||||||
│ ├── tsc.c # Time Stamp Counter
|
|
||||||
│ ├── hpet.c # High Precision Event Timer
|
|
||||||
│ ├── apic_timer.c # Local APIC timer
|
|
||||||
│ └── pit.c # Programmable Interval Timer (fallback)
|
|
||||||
│
|
|
||||||
├── drivers/
|
|
||||||
│ ├── uart.c # UART 16550 serial console
|
|
||||||
│ ├── framebuffer.c # UEFI GOP framebuffer
|
|
||||||
│ ├── apic.c # Local APIC + IOAPIC
|
|
||||||
│ ├── acpi.c # ACPI table parsing
|
|
||||||
│ └── pci.c # PCI enumeration (future)
|
|
||||||
│
|
|
||||||
├── hal_time.c # HAL time implementation
|
|
||||||
├── hal_interrupt.c # HAL interrupt implementation
|
|
||||||
├── hal_memory.c # HAL memory implementation
|
|
||||||
├── hal_console.c # HAL console implementation
|
|
||||||
├── hal_cpu.c # HAL CPU implementation
|
|
||||||
├── hal_panic.c # HAL panic implementation
|
|
||||||
│
|
|
||||||
└── kernel_main.c # LithosAnanke entry point (after UEFI)
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Boot Sequence Detail
|
|
||||||
|
|
||||||
### 1. UEFI Loader (`boot/uefi_loader.c`)
|
|
||||||
|
|
||||||
**Responsibilities:**
|
|
||||||
- Collect system information from UEFI
|
|
||||||
- Allocate kernel memory
|
|
||||||
- Exit UEFI boot services
|
|
||||||
- Jump to LithosAnanke
|
|
||||||
|
|
||||||
**Implementation:**
|
|
||||||
|
|
||||||
```c
|
|
||||||
/* boot/uefi_loader.c */
|
|
||||||
#include <efi.h>
|
|
||||||
#include <efilib.h>
|
|
||||||
#include "bootinfo.h"
|
|
||||||
|
|
||||||
/* BootInfo passed to LithosAnanke */
|
|
||||||
typedef struct {
|
|
||||||
uint64_t memory_map_addr;
|
|
||||||
uint64_t memory_map_size;
|
|
||||||
uint64_t memory_map_descriptor_size;
|
|
||||||
uint64_t acpi_rsdp_addr;
|
|
||||||
uint64_t framebuffer_addr;
|
|
||||||
uint32_t framebuffer_width;
|
|
||||||
uint32_t framebuffer_height;
|
|
||||||
uint32_t framebuffer_pitch;
|
|
||||||
} BootInfo;
|
|
||||||
|
|
||||||
EFI_STATUS EFIAPI efi_main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
|
|
||||||
InitializeLib(ImageHandle, SystemTable);
|
|
||||||
|
|
||||||
BootInfo *boot_info = (BootInfo *)AllocatePool(sizeof(BootInfo));
|
|
||||||
|
|
||||||
/* 1. Get memory map */
|
|
||||||
UINTN map_size = 0, map_key, descriptor_size;
|
|
||||||
UINT32 descriptor_version;
|
|
||||||
EFI_MEMORY_DESCRIPTOR *memory_map = NULL;
|
|
||||||
|
|
||||||
uefi_call_wrapper(BS->GetMemoryMap, 5, &map_size, memory_map, &map_key,
|
|
||||||
&descriptor_size, &descriptor_version);
|
|
||||||
|
|
||||||
map_size += 2 * descriptor_size; /* Extra space for ExitBootServices */
|
|
||||||
memory_map = (EFI_MEMORY_DESCRIPTOR *)AllocatePool(map_size);
|
|
||||||
|
|
||||||
uefi_call_wrapper(BS->GetMemoryMap, 5, &map_size, memory_map, &map_key,
|
|
||||||
&descriptor_size, &descriptor_version);
|
|
||||||
|
|
||||||
boot_info->memory_map_addr = (uint64_t)memory_map;
|
|
||||||
boot_info->memory_map_size = map_size;
|
|
||||||
boot_info->memory_map_descriptor_size = descriptor_size;
|
|
||||||
|
|
||||||
/* 2. Get ACPI RSDP */
|
|
||||||
EFI_GUID acpi_20_guid = ACPI_20_TABLE_GUID;
|
|
||||||
void *rsdp = NULL;
|
|
||||||
for (UINTN i = 0; i < ST->NumberOfTableEntries; i++) {
|
|
||||||
if (CompareGuid(&ST->ConfigurationTable[i].VendorGuid, &acpi_20_guid) == 0) {
|
|
||||||
rsdp = ST->ConfigurationTable[i].VendorTable;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
boot_info->acpi_rsdp_addr = (uint64_t)rsdp;
|
|
||||||
|
|
||||||
/* 3. Get framebuffer from GOP (Graphics Output Protocol) */
|
|
||||||
EFI_GUID gop_guid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
|
|
||||||
EFI_GRAPHICS_OUTPUT_PROTOCOL *gop = NULL;
|
|
||||||
uefi_call_wrapper(BS->LocateProtocol, 3, &gop_guid, NULL, (void **)&gop);
|
|
||||||
|
|
||||||
if (gop) {
|
|
||||||
boot_info->framebuffer_addr = gop->Mode->FrameBufferBase;
|
|
||||||
boot_info->framebuffer_width = gop->Mode->Info->HorizontalResolution;
|
|
||||||
boot_info->framebuffer_height = gop->Mode->Info->VerticalResolution;
|
|
||||||
boot_info->framebuffer_pitch = gop->Mode->Info->PixelsPerScanLine * 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 4. Exit boot services */
|
|
||||||
uefi_call_wrapper(BS->ExitBootServices, 2, ImageHandle, map_key);
|
|
||||||
|
|
||||||
/* 5. Jump to LithosAnanke */
|
|
||||||
extern void kernel_main(BootInfo *boot_info);
|
|
||||||
kernel_main(boot_info);
|
|
||||||
|
|
||||||
/* Never returns */
|
|
||||||
while (1) __asm__ volatile("hlt");
|
|
||||||
return EFI_SUCCESS;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. LithosAnanke Entry Point (`kernel_main.c`)
|
|
||||||
|
|
||||||
**Responsibilities:**
|
|
||||||
- Parse BootInfo
|
|
||||||
- Initialize CPU (GDT, IDT)
|
|
||||||
- Initialize memory subsystem
|
|
||||||
- Initialize HAL
|
|
||||||
- Call `main()` to start VM
|
|
||||||
|
|
||||||
**Implementation:**
|
|
||||||
|
|
||||||
```c
|
|
||||||
/* kernel_main.c */
|
|
||||||
#include "bootinfo.h"
|
|
||||||
#include "cpu/gdt.h"
|
|
||||||
#include "cpu/idt.h"
|
|
||||||
#include "mm/pmm.h"
|
|
||||||
#include "mm/vmm.h"
|
|
||||||
#include "drivers/uart.h"
|
|
||||||
#include "drivers/framebuffer.h"
|
|
||||||
|
|
||||||
/* Global BootInfo (available to all kernel code) */
|
|
||||||
BootInfo *g_boot_info = NULL;
|
|
||||||
|
|
||||||
void kernel_main(BootInfo *boot_info) {
|
|
||||||
g_boot_info = boot_info;
|
|
||||||
|
|
||||||
/* 1. Initialize serial console ASAP (for debug output) */
|
|
||||||
uart_early_init(0x3F8, 115200); /* COM1 */
|
|
||||||
uart_puts("LithosAnanke booting...\r\n");
|
|
||||||
|
|
||||||
/* 2. Initialize CPU structures */
|
|
||||||
gdt_init();
|
|
||||||
idt_init();
|
|
||||||
|
|
||||||
/* 3. Initialize physical memory manager */
|
|
||||||
pmm_init(boot_info);
|
|
||||||
uart_puts("PMM initialized\r\n");
|
|
||||||
|
|
||||||
/* 4. Initialize virtual memory manager */
|
|
||||||
vmm_init();
|
|
||||||
uart_puts("VMM initialized\r\n");
|
|
||||||
|
|
||||||
/* 5. Initialize kernel heap */
|
|
||||||
kmalloc_init();
|
|
||||||
uart_puts("Heap initialized\r\n");
|
|
||||||
|
|
||||||
/* 6. Initialize framebuffer */
|
|
||||||
fb_init(boot_info);
|
|
||||||
|
|
||||||
/* 7. Initialize HAL */
|
|
||||||
hal_time_init();
|
|
||||||
hal_interrupt_init();
|
|
||||||
hal_mem_init();
|
|
||||||
hal_console_init();
|
|
||||||
hal_cpu_init();
|
|
||||||
|
|
||||||
uart_puts("HAL initialized\r\n");
|
|
||||||
|
|
||||||
/* 8. Call standard main() to start VM */
|
|
||||||
extern int main(int argc, char **argv);
|
|
||||||
char *argv[] = {"starforth", NULL};
|
|
||||||
main(1, argv);
|
|
||||||
|
|
||||||
/* Never returns, but halt if it does */
|
|
||||||
hal_panic("main() returned unexpectedly");
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## HAL Implementation Details
|
|
||||||
|
|
||||||
### 1. HAL Time (`hal_time.c`)
|
|
||||||
|
|
||||||
**Hardware:** TSC (Time Stamp Counter), HPET (High Precision Event Timer), APIC timer
|
|
||||||
|
|
||||||
**Key challenges:**
|
|
||||||
- TSC calibration against HPET
|
|
||||||
- TSC frequency varies on old CPUs (need invariant TSC check)
|
|
||||||
- APIC timer setup for periodic interrupts
|
|
||||||
|
|
||||||
**Implementation outline:**
|
|
||||||
|
|
||||||
```c
|
|
||||||
/* hal_time.c */
|
|
||||||
#include "hal/hal_time.h"
|
|
||||||
#include "time/tsc.h"
|
|
||||||
#include "time/hpet.h"
|
|
||||||
#include "time/apic_timer.h"
|
|
||||||
|
|
||||||
static uint64_t tsc_hz = 0;
|
|
||||||
static uint64_t boot_tsc = 0;
|
|
||||||
|
|
||||||
void hal_time_init(void) {
|
|
||||||
/* Check for invariant TSC */
|
|
||||||
if (!tsc_is_invariant()) {
|
|
||||||
hal_panic("hal_time: TSC not invariant, falling back to HPET");
|
|
||||||
/* TODO: Use HPET directly if TSC unreliable */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Calibrate TSC frequency using HPET */
|
|
||||||
tsc_hz = tsc_calibrate_hpet();
|
|
||||||
if (tsc_hz == 0) {
|
|
||||||
hal_panic("hal_time: TSC calibration failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
boot_tsc = rdtsc();
|
|
||||||
|
|
||||||
/* Initialize APIC timer for periodic interrupts */
|
|
||||||
apic_timer_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t hal_time_now_ns(void) {
|
|
||||||
uint64_t tsc = rdtsc() - boot_tsc;
|
|
||||||
return (tsc * 1000000000ULL) / tsc_hz;
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_timer_periodic(uint64_t period_ns, hal_timer_callback_t callback, void *ctx) {
|
|
||||||
return apic_timer_periodic(period_ns, callback, ctx);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**See:** `time/tsc.c`, `time/hpet.c`, `time/apic_timer.c` for low-level implementations.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 2. HAL Interrupt (`hal_interrupt.c`)
|
|
||||||
|
|
||||||
**Hardware:** IDT (Interrupt Descriptor Table), Local APIC, IOAPIC
|
|
||||||
|
|
||||||
**Key challenges:**
|
|
||||||
- Setting up 256 IDT entries
|
|
||||||
- Routing hardware IRQs through IOAPIC
|
|
||||||
- Tracking interrupt nesting depth (for `hal_in_interrupt_context()`)
|
|
||||||
|
|
||||||
**Implementation outline:**
|
|
||||||
|
|
||||||
```c
|
|
||||||
/* hal_interrupt.c */
|
|
||||||
#include "hal/hal_interrupt.h"
|
|
||||||
#include "cpu/idt.h"
|
|
||||||
#include "drivers/apic.h"
|
|
||||||
|
|
||||||
/* Per-CPU interrupt depth (thread-local on SMP) */
|
|
||||||
static __thread unsigned int irq_depth = 0;
|
|
||||||
|
|
||||||
void hal_interrupt_init(void) {
|
|
||||||
/* Set up IDT with 256 entries */
|
|
||||||
idt_init();
|
|
||||||
|
|
||||||
/* Disable legacy PIC (use APIC instead) */
|
|
||||||
outb(0x21, 0xFF); /* Mask all PIC1 IRQs */
|
|
||||||
outb(0xA1, 0xFF); /* Mask all PIC2 IRQs */
|
|
||||||
|
|
||||||
/* Initialize Local APIC */
|
|
||||||
apic_init();
|
|
||||||
|
|
||||||
/* Initialize IOAPIC */
|
|
||||||
ioapic_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_irq_enable(void) {
|
|
||||||
__asm__ volatile("sti");
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long hal_irq_disable(void) {
|
|
||||||
unsigned long flags;
|
|
||||||
__asm__ volatile("pushfq; popq %0; cli" : "=r"(flags));
|
|
||||||
return flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_irq_restore(unsigned long flags) {
|
|
||||||
__asm__ volatile("pushq %0; popfq" :: "r"(flags));
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_in_interrupt_context(void) {
|
|
||||||
return irq_depth > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Common ISR entry (called from IDT stubs) */
|
|
||||||
void isr_common_handler(uint64_t vector, uint64_t error_code) {
|
|
||||||
irq_depth++;
|
|
||||||
|
|
||||||
/* Dispatch to registered handler */
|
|
||||||
extern void isr_dispatch(uint64_t vector, uint64_t error_code);
|
|
||||||
isr_dispatch(vector, error_code);
|
|
||||||
|
|
||||||
irq_depth--;
|
|
||||||
|
|
||||||
/* Send EOI to APIC */
|
|
||||||
apic_eoi();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**See:** `cpu/idt.c`, `cpu/isr.S`, `drivers/apic.c` for low-level implementations.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 3. HAL Memory (`hal_memory.c`)
|
|
||||||
|
|
||||||
**Components:**
|
|
||||||
- **PMM (Physical Memory Manager):** Tracks free/used physical page frames
|
|
||||||
- **VMM (Virtual Memory Manager):** Manages page tables (4-level paging on x86_64)
|
|
||||||
- **kmalloc:** Kernel heap allocator (slab or buddy allocator)
|
|
||||||
|
|
||||||
**Implementation outline:**
|
|
||||||
|
|
||||||
```c
|
|
||||||
/* hal_memory.c */
|
|
||||||
#include "hal/hal_memory.h"
|
|
||||||
#include "mm/pmm.h"
|
|
||||||
#include "mm/vmm.h"
|
|
||||||
#include "mm/kmalloc.h"
|
|
||||||
|
|
||||||
void hal_mem_init(void) {
|
|
||||||
/* PMM and VMM initialized in kernel_main() before HAL */
|
|
||||||
/* Just verify they're ready */
|
|
||||||
if (!pmm_is_initialized()) {
|
|
||||||
hal_panic("hal_mem_init: PMM not initialized");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void *hal_mem_alloc(size_t size) {
|
|
||||||
return kmalloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_mem_free(void *ptr) {
|
|
||||||
kfree(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t hal_mem_alloc_pages(size_t count) {
|
|
||||||
return pmm_alloc_pages(count);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_mem_free_pages(uint64_t paddr, size_t count) {
|
|
||||||
pmm_free_pages(paddr, count);
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_mem_map(uint64_t vaddr, uint64_t paddr, size_t size, unsigned int flags) {
|
|
||||||
return vmm_map_range(vaddr, paddr, size, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t hal_mem_page_size(void) {
|
|
||||||
return 4096;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**PMM details** (`mm/pmm.c`):
|
|
||||||
- Bitmap allocator (1 bit per 4KB page)
|
|
||||||
- Parse UEFI memory map to mark usable vs. reserved regions
|
|
||||||
- Reserve kernel image, ACPI tables, framebuffer
|
|
||||||
|
|
||||||
**VMM details** (`mm/vmm.c`):
|
|
||||||
- 4-level page tables (PML4 → PDPT → PD → PT)
|
|
||||||
- Recursive mapping trick for page table access
|
|
||||||
- Identity-map kernel, higher-half kernel optional
|
|
||||||
|
|
||||||
**kmalloc details** (`mm/kmalloc.c`):
|
|
||||||
- Slab allocator for common sizes (16, 32, 64, ..., 4096 bytes)
|
|
||||||
- Buddy allocator for large allocations
|
|
||||||
- Zero-initialization required by HAL contract
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 4. HAL Console (`hal_console.c`)
|
|
||||||
|
|
||||||
**Hardware:** UART 16550 (serial), UEFI GOP framebuffer (video)
|
|
||||||
|
|
||||||
**Implementation outline:**
|
|
||||||
|
|
||||||
```c
|
|
||||||
/* hal_console.c */
|
|
||||||
#include "hal/hal_console.h"
|
|
||||||
#include "drivers/uart.h"
|
|
||||||
#include "drivers/framebuffer.h"
|
|
||||||
|
|
||||||
void hal_console_init(void) {
|
|
||||||
/* UART already initialized in kernel_main() for early debug */
|
|
||||||
/* Framebuffer initialized from BootInfo */
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_console_putc(char c) {
|
|
||||||
uart_putc(c); /* Always output to serial */
|
|
||||||
fb_putc(c); /* Also output to framebuffer if available */
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_console_puts(const char *s) {
|
|
||||||
while (*s) {
|
|
||||||
hal_console_putc(*s++);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_console_getc(void) {
|
|
||||||
/* Block until UART has data */
|
|
||||||
return uart_getc();
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_console_has_input(void) {
|
|
||||||
return uart_has_data();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**UART details** (`drivers/uart.c`):
|
|
||||||
- 16550 compatible (COM1 = 0x3F8, COM2 = 0x2F8)
|
|
||||||
- 115200 baud default
|
|
||||||
- Polling mode (no interrupts for simplicity)
|
|
||||||
|
|
||||||
**Framebuffer details** (`drivers/framebuffer.c`):
|
|
||||||
- Linear framebuffer from UEFI GOP
|
|
||||||
- 32-bit RGB pixels
|
|
||||||
- Software text rendering (8x16 font)
|
|
||||||
- Scrolling, cursor, ANSI escape codes (optional)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 5. HAL CPU (`hal_cpu.c`)
|
|
||||||
|
|
||||||
**Implementation outline:**
|
|
||||||
|
|
||||||
```c
|
|
||||||
/* hal_cpu.c */
|
|
||||||
#include "hal/hal_cpu.h"
|
|
||||||
#include "drivers/apic.h"
|
|
||||||
|
|
||||||
static unsigned int num_cpus = 1;
|
|
||||||
|
|
||||||
void hal_cpu_init(void) {
|
|
||||||
/* Detect CPU features (CPUID) */
|
|
||||||
/* TODO: Bring up secondary CPUs (SMP) */
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int hal_cpu_id(void) {
|
|
||||||
return apic_get_id(); /* Local APIC ID */
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_cpu_relax(void) {
|
|
||||||
__asm__ volatile("pause");
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_cpu_halt(void) {
|
|
||||||
__asm__ volatile("hlt");
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int hal_cpu_count(void) {
|
|
||||||
return num_cpus;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Build System
|
|
||||||
|
|
||||||
### Toolchain Requirements
|
|
||||||
|
|
||||||
**Freestanding C environment:**
|
|
||||||
- `gcc` or `clang` with `-ffreestanding`
|
|
||||||
- `ld` with custom linker script
|
|
||||||
- `objcopy` to create PE32+ executable (for UEFI)
|
|
||||||
|
|
||||||
### Makefile Additions
|
|
||||||
|
|
||||||
```makefile
|
|
||||||
# Platform: kernel
|
|
||||||
ifeq ($(PLATFORM),kernel)
|
|
||||||
CC = gcc
|
|
||||||
LD = ld
|
|
||||||
OBJCOPY = objcopy
|
|
||||||
|
|
||||||
CFLAGS += -ffreestanding -nostdlib -mno-red-zone -mcmodel=large
|
|
||||||
CFLAGS += -mno-mmx -mno-sse -mno-sse2 # No FP in kernel
|
|
||||||
CFLAGS += -I/usr/include/efi -I/usr/include/efi/x86_64
|
|
||||||
|
|
||||||
LDFLAGS += -nostdlib -static -T src/platform/kernel/linker.ld
|
|
||||||
|
|
||||||
# Platform sources
|
|
||||||
PLATFORM_SOURCES = \
|
|
||||||
src/platform/kernel/boot/uefi_loader.c \
|
|
||||||
src/platform/kernel/kernel_main.c \
|
|
||||||
src/platform/kernel/cpu/gdt.c \
|
|
||||||
src/platform/kernel/cpu/idt.c \
|
|
||||||
src/platform/kernel/cpu/isr.S \
|
|
||||||
src/platform/kernel/mm/pmm.c \
|
|
||||||
src/platform/kernel/mm/vmm.c \
|
|
||||||
src/platform/kernel/mm/kmalloc.c \
|
|
||||||
src/platform/kernel/drivers/uart.c \
|
|
||||||
src/platform/kernel/drivers/framebuffer.c \
|
|
||||||
src/platform/kernel/drivers/apic.c \
|
|
||||||
src/platform/kernel/hal_time.c \
|
|
||||||
src/platform/kernel/hal_interrupt.c \
|
|
||||||
src/platform/kernel/hal_memory.c \
|
|
||||||
src/platform/kernel/hal_console.c \
|
|
||||||
src/platform/kernel/hal_cpu.c \
|
|
||||||
src/platform/kernel/hal_panic.c
|
|
||||||
|
|
||||||
# Build UEFI PE32+ executable
|
|
||||||
starforth.efi: $(OBJECTS)
|
|
||||||
$(LD) $(LDFLAGS) -o starforth.so $(OBJECTS)
|
|
||||||
$(OBJCOPY) -j .text -j .data -j .rodata -j .reloc \
|
|
||||||
--target=efi-app-x86_64 starforth.so $@
|
|
||||||
endif
|
|
||||||
```
|
|
||||||
|
|
||||||
### Linker Script (`src/platform/kernel/linker.ld`)
|
|
||||||
|
|
||||||
```ld
|
|
||||||
OUTPUT_FORMAT("elf64-x86-64")
|
|
||||||
ENTRY(efi_main)
|
|
||||||
|
|
||||||
SECTIONS {
|
|
||||||
. = 0x100000; /* Load at 1MB (standard kernel load address) */
|
|
||||||
|
|
||||||
.text : {
|
|
||||||
*(.text .text.*)
|
|
||||||
}
|
|
||||||
|
|
||||||
.rodata : {
|
|
||||||
*(.rodata .rodata.*)
|
|
||||||
}
|
|
||||||
|
|
||||||
.data : {
|
|
||||||
*(.data .data.*)
|
|
||||||
}
|
|
||||||
|
|
||||||
.bss : {
|
|
||||||
*(COMMON)
|
|
||||||
*(.bss .bss.*)
|
|
||||||
}
|
|
||||||
|
|
||||||
/DISCARD/ : {
|
|
||||||
*(.eh_frame)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Testing on QEMU
|
|
||||||
|
|
||||||
### QEMU + OVMF Setup
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Install OVMF (UEFI firmware for QEMU)
|
|
||||||
sudo apt install ovmf
|
|
||||||
|
|
||||||
# Create ESP (EFI System Partition)
|
|
||||||
mkdir -p esp/EFI/BOOT
|
|
||||||
cp starforth.efi esp/EFI/BOOT/BOOTX64.EFI
|
|
||||||
|
|
||||||
# Run QEMU
|
|
||||||
qemu-system-x86_64 \
|
|
||||||
-bios /usr/share/ovmf/OVMF.fd \
|
|
||||||
-drive file=fat:rw:esp/,format=raw \
|
|
||||||
-serial stdio \
|
|
||||||
-m 512M \
|
|
||||||
-enable-kvm
|
|
||||||
```
|
|
||||||
|
|
||||||
### Expected Output
|
|
||||||
|
|
||||||
```
|
|
||||||
LithosAnanke booting...
|
|
||||||
PMM initialized
|
|
||||||
VMM initialized
|
|
||||||
Heap initialized
|
|
||||||
HAL initialized
|
|
||||||
StarForth VM v1.0
|
|
||||||
ok
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Debugging
|
|
||||||
|
|
||||||
### Serial Debugging
|
|
||||||
|
|
||||||
```c
|
|
||||||
/* Early debug output via UART */
|
|
||||||
void debug_puts(const char *s) {
|
|
||||||
while (*s) {
|
|
||||||
while (!(inb(0x3FD) & 0x20)); /* Wait for UART ready */
|
|
||||||
outb(0x3F8, *s++); /* Write character */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### GDB Remote Debugging
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Start QEMU with GDB server
|
|
||||||
qemu-system-x86_64 ... -s -S
|
|
||||||
|
|
||||||
# In another terminal
|
|
||||||
gdb starforth.elf
|
|
||||||
(gdb) target remote :1234
|
|
||||||
(gdb) break kernel_main
|
|
||||||
(gdb) continue
|
|
||||||
```
|
|
||||||
|
|
||||||
### Panic Handler
|
|
||||||
|
|
||||||
```c
|
|
||||||
/* hal_panic.c */
|
|
||||||
void hal_panic(const char *msg) {
|
|
||||||
hal_irq_disable();
|
|
||||||
|
|
||||||
hal_console_puts("\n*** KERNEL PANIC ***\n");
|
|
||||||
hal_console_puts(msg ? msg : "unknown error");
|
|
||||||
hal_console_puts("\nSystem halted.\n");
|
|
||||||
|
|
||||||
/* Halt all CPUs */
|
|
||||||
while (1) {
|
|
||||||
hal_cpu_halt();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Roadmap to `ok` Prompt
|
|
||||||
|
|
||||||
### Milestone 1: Boot + Serial Output
|
|
||||||
- UEFI loader runs
|
|
||||||
- Kernel prints "LithosAnanke booting..." to serial
|
|
||||||
- System doesn't triple-fault
|
|
||||||
|
|
||||||
### Milestone 2: Memory Works
|
|
||||||
- PMM tracks physical pages
|
|
||||||
- VMM maps kernel
|
|
||||||
- kmalloc/kfree work
|
|
||||||
|
|
||||||
### Milestone 3: HAL Initialized
|
|
||||||
- All `hal_*_init()` functions complete
|
|
||||||
- HAL functions callable (even if not fully functional)
|
|
||||||
|
|
||||||
### Milestone 4: VM Starts
|
|
||||||
- `vm_create()` succeeds
|
|
||||||
- Dictionary allocated
|
|
||||||
- No crashes in VM init
|
|
||||||
|
|
||||||
### Milestone 5: REPL Runs
|
|
||||||
- REPL prints "`ok`" prompt
|
|
||||||
- Can type characters (echoed to serial)
|
|
||||||
- Can execute simple words (`1 2 + .` → `3`)
|
|
||||||
|
|
||||||
### Milestone 6: Physics Subsystems Work
|
|
||||||
- Execution heat tracking operational
|
|
||||||
- Heartbeat timer fires
|
|
||||||
- Rolling window captures execution history
|
|
||||||
|
|
||||||
### Milestone 7: Full Test Suite
|
|
||||||
- All 936+ tests pass on kernel
|
|
||||||
- DoE mode works
|
|
||||||
- 0% algorithmic variance on bare metal
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Future Work (StarshipOS)
|
|
||||||
|
|
||||||
After achieving `ok` prompt on LithosAnanke:
|
|
||||||
|
|
||||||
1. **Storage:** AHCI/NVMe drivers, FAT32 filesystem
|
|
||||||
2. **Networking:** VirtIO-net driver, TCP/IP stack
|
|
||||||
3. **Process model:** Forth tasks, scheduling, IPC
|
|
||||||
4. **Device model:** Unified block/net/char subsystem
|
|
||||||
5. **Security:** Capabilities, ACL, Forth-based access control
|
|
||||||
|
|
||||||
**The HAL remains the foundation throughout.**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## References
|
|
||||||
|
|
||||||
- UEFI Specification: https://uefi.org/specifications
|
|
||||||
- GNU-EFI: https://sourceforge.net/projects/gnu-efi/
|
|
||||||
- OSDev Wiki: https://wiki.osdev.org/
|
|
||||||
- Intel SDM: https://www.intel.com/sdm
|
|
||||||
- ACPI Specification: https://uefi.org/acpi
|
|
||||||
@@ -1,650 +0,0 @@
|
|||||||
# HAL Migration Plan
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
This document provides a **step-by-step plan** for refactoring StarForth to use the Hardware Abstraction Layer (HAL). The migration preserves all existing functionality while preparing the codebase for LithosAnanke.
|
|
||||||
|
|
||||||
> **HISTORICAL — L4Re/Fiasco.OC**: L4Re references below (including large sections of this migration plan) describe a target that was a supported platform through mid-2026. L4Re support has since been removed as an active target — `src/platform/l4re/time.c` and related `#ifdef __l4__` code are retained for reference but no longer wired into any build.
|
|
||||||
|
|
||||||
**Goal:** Zero functional regressions, all 936+ tests pass, 0% algorithmic variance maintained.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Migration Strategy
|
|
||||||
|
|
||||||
### Principles
|
|
||||||
|
|
||||||
1. **Incremental refactoring** - One subsystem at a time
|
|
||||||
2. **Test after each step** - Build + test suite must pass
|
|
||||||
3. **Platform parity** - Linux and L4Re work throughout migration
|
|
||||||
4. **No big bang** - HAL interfaces defined first, then adopted gradually
|
|
||||||
|
|
||||||
### Phases
|
|
||||||
|
|
||||||
```
|
|
||||||
Phase 1: Define HAL Interfaces (headers only)
|
|
||||||
↓
|
|
||||||
Phase 2: Implement HAL for Linux (refactor existing code)
|
|
||||||
↓
|
|
||||||
Phase 3: Migrate VM Core to use HAL
|
|
||||||
↓
|
|
||||||
Phase 4: Migrate Physics Subsystems to use HAL
|
|
||||||
↓
|
|
||||||
Phase 5: Migrate REPL and Word Implementations
|
|
||||||
↓
|
|
||||||
Phase 6: Implement HAL for L4Re (optional validation)
|
|
||||||
↓
|
|
||||||
Phase 7: Validate Deterministic Behavior
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Phase 1: Define HAL Interfaces
|
|
||||||
|
|
||||||
**Duration:** 1-2 days
|
|
||||||
**Risk:** Low (no code changes, only headers)
|
|
||||||
|
|
||||||
### Tasks
|
|
||||||
|
|
||||||
1. **Create HAL header directory**
|
|
||||||
```bash
|
|
||||||
mkdir -p include/hal
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Write HAL interface headers**
|
|
||||||
- `include/hal/hal_time.h`
|
|
||||||
- `include/hal/hal_interrupt.h`
|
|
||||||
- `include/hal/hal_memory.h`
|
|
||||||
- `include/hal/hal_console.h`
|
|
||||||
- `include/hal/hal_cpu.h`
|
|
||||||
- `include/hal/hal_panic.h`
|
|
||||||
|
|
||||||
See `interfaces.md` for full specifications.
|
|
||||||
|
|
||||||
3. **Update Makefile to include HAL headers**
|
|
||||||
```makefile
|
|
||||||
INCLUDES += -Iinclude/hal
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Compile check (headers only)**
|
|
||||||
```bash
|
|
||||||
make clean && make PLATFORM=linux
|
|
||||||
```
|
|
||||||
|
|
||||||
Should compile without errors (HAL functions not yet called).
|
|
||||||
|
|
||||||
### Success Criteria
|
|
||||||
|
|
||||||
✅ All HAL headers compile without errors
|
|
||||||
✅ No changes to VM code yet
|
|
||||||
✅ Documentation reviewed and approved
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Phase 2: Implement HAL for Linux
|
|
||||||
|
|
||||||
**Duration:** 3-5 days
|
|
||||||
**Risk:** Medium (refactoring existing platform code)
|
|
||||||
|
|
||||||
### Current Platform Code Locations
|
|
||||||
|
|
||||||
Audit existing platform-specific code:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Find POSIX-specific calls
|
|
||||||
grep -r "clock_gettime\|pthread\|signal\|malloc\|printf" src/
|
|
||||||
```
|
|
||||||
|
|
||||||
**Expected locations:**
|
|
||||||
- Timing: `src/platform/linux/time.c` (already exists)
|
|
||||||
- Memory: Direct `malloc()` calls in VM code (needs refactoring)
|
|
||||||
- Console: Direct `printf()` calls in REPL (needs refactoring)
|
|
||||||
|
|
||||||
### Tasks
|
|
||||||
|
|
||||||
1. **Create Linux HAL directory**
|
|
||||||
```bash
|
|
||||||
mkdir -p src/platform/linux/hal
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Implement Linux HAL subsystems**
|
|
||||||
|
|
||||||
**2a. `hal_time.c`** - Refactor `src/platform/linux/time.c`
|
|
||||||
```c
|
|
||||||
/* Before: */
|
|
||||||
uint64_t platform_time_ns(void) {
|
|
||||||
struct timespec ts;
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
return ...;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* After: */
|
|
||||||
uint64_t hal_time_now_ns(void) {
|
|
||||||
struct timespec ts;
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
return (uint64_t)ts.tv_sec * 1000000000ULL + ts.tv_nsec;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**2b. `hal_memory.c`** - Wrap malloc/free
|
|
||||||
```c
|
|
||||||
void *hal_mem_alloc(size_t size) {
|
|
||||||
if (size == 0) return NULL;
|
|
||||||
void *ptr = malloc(size);
|
|
||||||
if (ptr) memset(ptr, 0, size);
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_mem_free(void *ptr) {
|
|
||||||
free(ptr);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**2c. `hal_console.c`** - Wrap stdio
|
|
||||||
```c
|
|
||||||
void hal_console_putc(char c) {
|
|
||||||
putchar(c);
|
|
||||||
fflush(stdout);
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_console_getc(void) {
|
|
||||||
return getchar();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**2d. `hal_interrupt.c`** - Signal-based interrupts
|
|
||||||
See `platform-implementations.md` for full implementation.
|
|
||||||
|
|
||||||
**2e. `hal_cpu.c`** - CPU info
|
|
||||||
```c
|
|
||||||
unsigned int hal_cpu_id(void) {
|
|
||||||
return 0; /* Single-threaded */
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_cpu_relax(void) {
|
|
||||||
sched_yield();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**2f. `hal_panic.c`** - Error handling
|
|
||||||
```c
|
|
||||||
void hal_panic(const char *msg) {
|
|
||||||
fprintf(stderr, "PANIC: %s\n", msg ? msg : "unknown");
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Update Makefile**
|
|
||||||
```makefile
|
|
||||||
ifeq ($(PLATFORM),linux)
|
|
||||||
PLATFORM_SOURCES = \
|
|
||||||
src/platform/linux/hal_time.c \
|
|
||||||
src/platform/linux/hal_interrupt.c \
|
|
||||||
src/platform/linux/hal_memory.c \
|
|
||||||
src/platform/linux/hal_console.c \
|
|
||||||
src/platform/linux/hal_cpu.c \
|
|
||||||
src/platform/linux/hal_panic.c
|
|
||||||
endif
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Build test (HAL code compiles)**
|
|
||||||
```bash
|
|
||||||
make clean && make PLATFORM=linux
|
|
||||||
```
|
|
||||||
|
|
||||||
### Success Criteria
|
|
||||||
|
|
||||||
✅ Linux HAL compiles without errors
|
|
||||||
✅ Existing VM code still builds (not yet using HAL)
|
|
||||||
✅ No functional changes yet
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Phase 3: Migrate VM Core to use HAL
|
|
||||||
|
|
||||||
**Duration:** 2-3 days
|
|
||||||
**Risk:** High (core VM changes)
|
|
||||||
|
|
||||||
### Files to Modify
|
|
||||||
|
|
||||||
- `src/vm.c` - Core interpreter loop
|
|
||||||
- `src/vm_api.c` - External API
|
|
||||||
- `src/memory_management.c` - Dictionary allocator
|
|
||||||
- `include/vm.h` - VM struct
|
|
||||||
|
|
||||||
### Tasks
|
|
||||||
|
|
||||||
1. **Replace direct malloc/free in VM core**
|
|
||||||
|
|
||||||
**Before:**
|
|
||||||
```c
|
|
||||||
/* src/memory_management.c */
|
|
||||||
void *mem = malloc(size);
|
|
||||||
```
|
|
||||||
|
|
||||||
**After:**
|
|
||||||
```c
|
|
||||||
#include "hal/hal_memory.h"
|
|
||||||
|
|
||||||
void *mem = hal_mem_alloc(size);
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Replace timing calls in heartbeat**
|
|
||||||
|
|
||||||
**Before:**
|
|
||||||
```c
|
|
||||||
/* src/vm.c */
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
struct timespec ts;
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
uint64_t now = ts.tv_sec * 1000000000ULL + ts.tv_nsec;
|
|
||||||
```
|
|
||||||
|
|
||||||
**After:**
|
|
||||||
```c
|
|
||||||
#include "hal/hal_time.h"
|
|
||||||
|
|
||||||
uint64_t now = hal_time_now_ns();
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Add HAL initialization to VM startup**
|
|
||||||
|
|
||||||
**In `src/main.c`:**
|
|
||||||
```c
|
|
||||||
int main(int argc, char **argv) {
|
|
||||||
/* Initialize HAL subsystems */
|
|
||||||
hal_time_init();
|
|
||||||
hal_interrupt_init();
|
|
||||||
hal_mem_init();
|
|
||||||
hal_console_init();
|
|
||||||
hal_cpu_init();
|
|
||||||
|
|
||||||
/* Continue with existing VM initialization */
|
|
||||||
VM *vm = vm_create();
|
|
||||||
...
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Remove platform-specific #ifdefs**
|
|
||||||
|
|
||||||
**Before:**
|
|
||||||
```c
|
|
||||||
#ifdef PLATFORM_LINUX
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
#elif PLATFORM_L4RE
|
|
||||||
l4re_kip_clock(kip);
|
|
||||||
#endif
|
|
||||||
```
|
|
||||||
|
|
||||||
**After:**
|
|
||||||
```c
|
|
||||||
uint64_t now = hal_time_now_ns(); /* Works on all platforms */
|
|
||||||
```
|
|
||||||
|
|
||||||
5. **Build and test**
|
|
||||||
```bash
|
|
||||||
make clean && make PLATFORM=linux
|
|
||||||
make test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Expected Failures
|
|
||||||
|
|
||||||
- **Compilation errors:** Missing `#include "hal/hal_*.h"`
|
|
||||||
- **Link errors:** HAL functions not implemented
|
|
||||||
- **Runtime errors:** HAL not initialized before VM
|
|
||||||
|
|
||||||
**Fix incrementally:** Add includes, implement missing HAL functions, ensure init order.
|
|
||||||
|
|
||||||
### Success Criteria
|
|
||||||
|
|
||||||
✅ VM builds using HAL interfaces
|
|
||||||
✅ All 936+ tests pass
|
|
||||||
✅ No platform-specific code in `src/vm.c`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Phase 4: Migrate Physics Subsystems to use HAL
|
|
||||||
|
|
||||||
**Duration:** 2-3 days
|
|
||||||
**Risk:** Medium (determinism must be preserved)
|
|
||||||
|
|
||||||
### Files to Modify
|
|
||||||
|
|
||||||
- `src/dictionary_heat_optimization.c`
|
|
||||||
- `src/rolling_window_of_truth.c`
|
|
||||||
- `src/physics_hotwords_cache.c`
|
|
||||||
- `src/physics_pipelining_metrics.c`
|
|
||||||
- `src/inference_engine.c`
|
|
||||||
- `src/heartbeat.c`
|
|
||||||
|
|
||||||
### Tasks
|
|
||||||
|
|
||||||
1. **Audit timing calls in physics subsystems**
|
|
||||||
```bash
|
|
||||||
grep -n "clock_gettime\|time\.h" src/*physics*.c src/heartbeat.c src/inference*.c
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Replace timing calls**
|
|
||||||
|
|
||||||
**Example: `src/rolling_window_of_truth.c`**
|
|
||||||
```c
|
|
||||||
/* Before: */
|
|
||||||
#include <time.h>
|
|
||||||
struct timespec ts;
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
uint64_t timestamp = ...;
|
|
||||||
|
|
||||||
/* After: */
|
|
||||||
#include "hal/hal_time.h"
|
|
||||||
uint64_t timestamp = hal_time_now_ns();
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Migrate heartbeat to HAL timer**
|
|
||||||
|
|
||||||
**Before:** `src/heartbeat.c` uses pthread + sleep
|
|
||||||
```c
|
|
||||||
void *heartbeat_thread(void *arg) {
|
|
||||||
while (running) {
|
|
||||||
usleep(period_us);
|
|
||||||
vm_tick(vm);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**After:** Use HAL periodic timer
|
|
||||||
```c
|
|
||||||
static VM *heartbeat_vm = NULL;
|
|
||||||
|
|
||||||
static void heartbeat_isr(void *ctx) {
|
|
||||||
(void)ctx;
|
|
||||||
if (heartbeat_vm) {
|
|
||||||
vm_tick_isr(heartbeat_vm); /* ISR-safe VM tick */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void heartbeat_start(VM *vm, uint64_t rate_hz) {
|
|
||||||
heartbeat_vm = vm;
|
|
||||||
uint64_t period_ns = 1000000000ULL / rate_hz;
|
|
||||||
hal_timer_periodic(period_ns, heartbeat_isr, NULL);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
**Critical:** `vm_tick_isr()` must be ISR-safe:
|
|
||||||
- No malloc/free
|
|
||||||
- No blocking I/O
|
|
||||||
- Only lock-free ring buffer updates
|
|
||||||
|
|
||||||
4. **Test deterministic behavior**
|
|
||||||
```bash
|
|
||||||
make fastest PLATFORM=linux
|
|
||||||
./build/amd64/fastest/starforth --doe > results_after_hal.csv
|
|
||||||
```
|
|
||||||
|
|
||||||
Compare with baseline (before HAL migration):
|
|
||||||
```bash
|
|
||||||
diff results_before_hal.csv results_after_hal.csv
|
|
||||||
```
|
|
||||||
|
|
||||||
**Expected:** Identical results (0% algorithmic variance).
|
|
||||||
|
|
||||||
### Success Criteria
|
|
||||||
|
|
||||||
✅ Physics subsystems use HAL for all timing
|
|
||||||
✅ Heartbeat runs via HAL periodic timer
|
|
||||||
✅ 0% algorithmic variance maintained
|
|
||||||
✅ All tests pass
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Phase 5: Migrate REPL and Word Implementations
|
|
||||||
|
|
||||||
**Duration:** 1-2 days
|
|
||||||
**Risk:** Low (mostly console I/O)
|
|
||||||
|
|
||||||
### Files to Modify
|
|
||||||
|
|
||||||
- `src/repl.c` - Read-eval-print loop
|
|
||||||
- `src/word_source/*_words.c` - Words that do I/O (emit, key, etc.)
|
|
||||||
|
|
||||||
### Tasks
|
|
||||||
|
|
||||||
1. **Replace stdio in REPL**
|
|
||||||
|
|
||||||
**Before:** `src/repl.c`
|
|
||||||
```c
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
char c = getchar();
|
|
||||||
printf("ok\n");
|
|
||||||
```
|
|
||||||
|
|
||||||
**After:**
|
|
||||||
```c
|
|
||||||
#include "hal/hal_console.h"
|
|
||||||
|
|
||||||
char c = hal_console_getc();
|
|
||||||
hal_console_puts("ok\n");
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Update I/O words**
|
|
||||||
|
|
||||||
**`src/word_source/io_words.c`:**
|
|
||||||
```c
|
|
||||||
/* EMIT ( c -- ) */
|
|
||||||
static void word_emit(VM *vm) {
|
|
||||||
int c = vm_pop(vm);
|
|
||||||
hal_console_putc((char)c);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* KEY ( -- c ) */
|
|
||||||
static void word_key(VM *vm) {
|
|
||||||
int c = hal_console_getc();
|
|
||||||
vm_push(vm, c);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Test REPL interactively**
|
|
||||||
```bash
|
|
||||||
./build/amd64/standard/starforth
|
|
||||||
> 1 2 + .
|
|
||||||
3 ok
|
|
||||||
> BYE
|
|
||||||
```
|
|
||||||
|
|
||||||
### Success Criteria
|
|
||||||
|
|
||||||
✅ REPL works identically to before
|
|
||||||
✅ All I/O words use HAL
|
|
||||||
✅ No direct stdio calls in VM code
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Phase 6: Implement HAL for L4Re (Optional)
|
|
||||||
|
|
||||||
**Duration:** 3-5 days
|
|
||||||
**Risk:** Low (validates HAL portability)
|
|
||||||
|
|
||||||
This phase is **optional** but highly recommended to validate that the HAL abstraction actually works across platforms.
|
|
||||||
|
|
||||||
### Tasks
|
|
||||||
|
|
||||||
1. **Create L4Re HAL directory**
|
|
||||||
```bash
|
|
||||||
mkdir -p src/platform/l4re/hal
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Implement L4Re HAL subsystems**
|
|
||||||
- `hal_time.c` → L4Re clock API
|
|
||||||
- `hal_memory.c` → L4Re dataspaces
|
|
||||||
- `hal_console.c` → L4Re console service
|
|
||||||
- `hal_interrupt.c` → L4Re IRQ objects
|
|
||||||
|
|
||||||
See L4Re documentation for API details.
|
|
||||||
|
|
||||||
3. **Build for L4Re**
|
|
||||||
```bash
|
|
||||||
make PLATFORM=l4re
|
|
||||||
```
|
|
||||||
|
|
||||||
4. **Run tests on L4Re**
|
|
||||||
```bash
|
|
||||||
make PLATFORM=l4re test
|
|
||||||
```
|
|
||||||
|
|
||||||
### Success Criteria
|
|
||||||
|
|
||||||
✅ L4Re HAL compiles
|
|
||||||
✅ VM runs on L4Re without source changes
|
|
||||||
✅ Tests pass on L4Re
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Phase 7: Validate Deterministic Behavior
|
|
||||||
|
|
||||||
**Duration:** 1 day
|
|
||||||
**Risk:** High (final validation)
|
|
||||||
|
|
||||||
### Tasks
|
|
||||||
|
|
||||||
1. **Run DoE on Linux (HAL)**
|
|
||||||
```bash
|
|
||||||
make fastest PLATFORM=linux
|
|
||||||
for i in {1..10}; do
|
|
||||||
./build/amd64/fastest/starforth --doe > results_linux_$i.csv
|
|
||||||
done
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Verify 0% variance across runs**
|
|
||||||
```bash
|
|
||||||
# All CSV files should be identical
|
|
||||||
md5sum results_linux_*.csv
|
|
||||||
```
|
|
||||||
|
|
||||||
3. **Compare with pre-HAL baseline**
|
|
||||||
```bash
|
|
||||||
diff results_before_hal.csv results_linux_1.csv
|
|
||||||
```
|
|
||||||
|
|
||||||
**Expected:** Identical (HAL added zero overhead).
|
|
||||||
|
|
||||||
4. **Run full test suite**
|
|
||||||
```bash
|
|
||||||
make test PLATFORM=linux
|
|
||||||
```
|
|
||||||
|
|
||||||
**Expected:** All 936+ tests pass.
|
|
||||||
|
|
||||||
5. **Benchmark performance**
|
|
||||||
```bash
|
|
||||||
make bench PLATFORM=linux
|
|
||||||
```
|
|
||||||
|
|
||||||
**Expected:** < 5% performance delta from pre-HAL baseline.
|
|
||||||
|
|
||||||
### Success Criteria
|
|
||||||
|
|
||||||
✅ 0% algorithmic variance maintained
|
|
||||||
✅ All tests pass
|
|
||||||
✅ < 5% performance regression
|
|
||||||
✅ HAL abstraction validated
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Rollback Strategy
|
|
||||||
|
|
||||||
If migration fails at any phase:
|
|
||||||
|
|
||||||
1. **Git branch strategy**
|
|
||||||
```bash
|
|
||||||
git checkout -b hal-migration
|
|
||||||
# Work on branch, test each phase
|
|
||||||
git commit -m "Phase N complete"
|
|
||||||
# If phase fails, revert:
|
|
||||||
git reset --hard HEAD~1
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Incremental commits**
|
|
||||||
- Commit after each phase passes tests
|
|
||||||
- Never commit broken code
|
|
||||||
- Each commit should build and pass tests
|
|
||||||
|
|
||||||
3. **Feature flag (if needed)**
|
|
||||||
```c
|
|
||||||
#ifdef ENABLE_HAL
|
|
||||||
uint64_t now = hal_time_now_ns();
|
|
||||||
#else
|
|
||||||
struct timespec ts;
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
uint64_t now = ...;
|
|
||||||
#endif
|
|
||||||
```
|
|
||||||
|
|
||||||
Enable HAL incrementally, fall back if issues arise.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Post-Migration Cleanup
|
|
||||||
|
|
||||||
After successful migration:
|
|
||||||
|
|
||||||
1. **Remove old platform code**
|
|
||||||
```bash
|
|
||||||
# If src/platform/linux/time.c was fully replaced by hal_time.c
|
|
||||||
git rm src/platform/linux/time.c
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Update documentation**
|
|
||||||
- `docs/CLAUDE.md` - Mention HAL architecture
|
|
||||||
- `README.md` - Update build instructions
|
|
||||||
- `docs/DEVELOPER.md` - Add HAL section
|
|
||||||
|
|
||||||
3. **Update .gitignore**
|
|
||||||
```
|
|
||||||
# Build artifacts for all platforms
|
|
||||||
build/linux/
|
|
||||||
build/l4re/
|
|
||||||
build/kernel/
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Timeline Estimate
|
|
||||||
|
|
||||||
| Phase | Duration | Cumulative |
|
|
||||||
|-------|----------|------------|
|
|
||||||
| 1. Define HAL Interfaces | 1-2 days | 1-2 days |
|
|
||||||
| 2. Implement Linux HAL | 3-5 days | 4-7 days |
|
|
||||||
| 3. Migrate VM Core | 2-3 days | 6-10 days |
|
|
||||||
| 4. Migrate Physics | 2-3 days | 8-13 days |
|
|
||||||
| 5. Migrate REPL | 1-2 days | 9-15 days |
|
|
||||||
| 6. L4Re HAL (optional) | 3-5 days | 12-20 days |
|
|
||||||
| 7. Validation | 1 day | 13-21 days |
|
|
||||||
|
|
||||||
**Total:** 2-4 weeks (depending on L4Re inclusion)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Success Metrics
|
|
||||||
|
|
||||||
The HAL migration is successful if:
|
|
||||||
|
|
||||||
1. ✅ **All tests pass** - 936+ tests on Linux (and L4Re if implemented)
|
|
||||||
2. ✅ **0% variance** - DoE results identical pre/post migration
|
|
||||||
3. ✅ **No regressions** - Performance < 5% slower
|
|
||||||
4. ✅ **Zero platform code in VM** - No #ifdef PLATFORM_X in core
|
|
||||||
5. ✅ **Clean abstractions** - HAL interfaces well-documented
|
|
||||||
6. ✅ **Ready for LithosAnanke** - Platform layer can be replaced
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Next Steps
|
|
||||||
|
|
||||||
After successful HAL migration:
|
|
||||||
|
|
||||||
1. **Implement LithosAnanke platform** (`src/platform/kernel/`)
|
|
||||||
2. **UEFI boot loader** (`src/platform/kernel/boot/uefi_loader.c`)
|
|
||||||
3. **Boot to `ok` prompt** on QEMU/OVMF
|
|
||||||
4. **Validate physics on bare metal** (determinism on real hardware)
|
|
||||||
|
|
||||||
See `lithosananke-integration.md` for LithosAnanke-specific implementation details.
|
|
||||||
@@ -1,345 +0,0 @@
|
|||||||
# Hardware Abstraction Layer (HAL) Architecture
|
|
||||||
|
|
||||||
> **⚠️ Important Note**: This document describes the **target HAL architecture** with standardized `hal_*` function naming. The current codebase uses `sf_time_backend_t` and similar abstractions with different naming conventions. See [migration-plan.md](migration-plan.md) for the refactoring steps to migrate existing platform code to the HAL interfaces described here.
|
|
||||||
>
|
|
||||||
> **HISTORICAL — L4Re/Fiasco.OC**: this document's L4Re references (platform comparison table, microkernel discussion, etc.) describe a target that was a supported platform through mid-2026. L4Re support has since been removed as an active target — `src/platform/l4re/time.c` and related `#ifdef __l4__` code are retained for reference but no longer wired into any build. Treat every L4Re mention below as historical design context, not a currently buildable platform.
|
|
||||||
|
|
||||||
## Executive Summary
|
|
||||||
|
|
||||||
The Hardware Abstraction Layer (HAL) is the architectural foundation that enables StarForth to evolve from a hosted VM into LithosAnanke while preserving the physics-driven adaptive runtime's deterministic behavior across all platforms.
|
|
||||||
|
|
||||||
**Critical insight:** The HAL is not an afterthought—it's the linchpin that makes LithosAnanke → StarshipOS possible without compromising StarForth's experimental integrity.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## The Problem
|
|
||||||
|
|
||||||
StarForth currently runs on multiple platforms:
|
|
||||||
- **Linux** (POSIX, hosted)
|
|
||||||
- **L4Re/Fiasco.OC** (microkernel)
|
|
||||||
- **Bare metal** (limited, experimental)
|
|
||||||
|
|
||||||
Each platform has its own:
|
|
||||||
- Timing mechanisms (POSIX timers vs. hardware timers)
|
|
||||||
- Interrupt handling (signals vs. IDT/APIC)
|
|
||||||
- Memory allocation (malloc vs. physical page frames)
|
|
||||||
- I/O mechanisms (stdin/stdout vs. UART/framebuffer)
|
|
||||||
|
|
||||||
**Without a HAL:** Platform-specific code bleeds into the VM core, physics subsystems, and word implementations. This creates:
|
|
||||||
- ❌ Fragile #ifdef PLATFORM_X conditionals throughout codebase
|
|
||||||
- ❌ Platform-specific bugs in supposedly portable code
|
|
||||||
- ❌ Inability to test kernel code on hosted platforms
|
|
||||||
- ❌ Risk to deterministic behavior guarantees (0% algorithmic variance)
|
|
||||||
|
|
||||||
**With a HAL:** Clean separation between VM logic and platform implementation:
|
|
||||||
- ✅ VM and physics subsystems are platform-agnostic
|
|
||||||
- ✅ Platform code is isolated and testable
|
|
||||||
- ✅ New platforms (LithosAnanke) can be added without touching VM core
|
|
||||||
- ✅ Deterministic behavior guaranteed by HAL contract, not platform quirks
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Architecture Overview
|
|
||||||
|
|
||||||
```
|
|
||||||
┌────────────────────────────────────────────────────────────┐
|
|
||||||
│ StarForth VM Core + Physics Subsystems │
|
|
||||||
│ • Interpreter loop (vm.c) │
|
|
||||||
│ • Execution heat tracking │
|
|
||||||
│ • Rolling window of truth │
|
|
||||||
│ • Hot-words cache │
|
|
||||||
│ • Pipelining metrics │
|
|
||||||
│ • Inference engine │
|
|
||||||
│ • Heartbeat coordination │
|
|
||||||
│ │
|
|
||||||
│ ↓ Calls HAL interfaces (platform-agnostic) │
|
|
||||||
├────────────────────────────────────────────────────────────┤
|
|
||||||
│ Hardware Abstraction Layer (HAL) │
|
|
||||||
│ • hal_time.h - Monotonic time, timers, calibration │
|
|
||||||
│ • hal_interrupt.h - IRQ management, ISR registration │
|
|
||||||
│ • hal_memory.h - Allocation, page mapping, heap │
|
|
||||||
│ • hal_console.h - Character I/O (serial, framebuffer) │
|
|
||||||
│ • hal_cpu.h - CPU ID, relax/halt, SMP coordination │
|
|
||||||
│ │
|
|
||||||
│ ↓ Platform-specific implementations │
|
|
||||||
├────────────────────────────────────────────────────────────┤
|
|
||||||
│ Platform Implementations │
|
|
||||||
│ ┌──────────────┬──────────────┬──────────────────────┐ │
|
|
||||||
│ │ Linux │ L4Re │ Kernel (LithosAnanke) │ │
|
|
||||||
│ │ (POSIX) │ (microkernel)│ (freestanding) │ │
|
|
||||||
│ ├──────────────┼──────────────┼──────────────────────┤ │
|
|
||||||
│ │ clock_gettime│ L4Re::Clock │ TSC + HPET + APIC │ │
|
|
||||||
│ │ timerfd │ L4Re::IrqEoi │ IDT + APIC IRQ │ │
|
|
||||||
│ │ malloc/free │ dataspaces │ PMM + VMM + kmalloc │ │
|
|
||||||
│ │ stdin/stdout │ L4Re::Console│ UART + framebuffer │ │
|
|
||||||
│ │ pthread │ L4Re::Thread │ SMP bring-up │ │
|
|
||||||
│ └──────────────┴──────────────┴──────────────────────┘ │
|
|
||||||
└────────────────────────────────────────────────────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Design Principles
|
|
||||||
|
|
||||||
### 1. **VM Purity**
|
|
||||||
The VM core must never know which platform it's running on. All platform awareness lives in HAL implementations.
|
|
||||||
|
|
||||||
**Anti-pattern (current):**
|
|
||||||
```c
|
|
||||||
#ifdef PLATFORM_LINUX
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
#elif PLATFORM_L4RE
|
|
||||||
l4re_kip_clock(kip);
|
|
||||||
#elif PLATFORM_KERNEL
|
|
||||||
rdtsc();
|
|
||||||
#endif
|
|
||||||
```
|
|
||||||
|
|
||||||
**Correct pattern (HAL):**
|
|
||||||
```c
|
|
||||||
// In VM code (platform-agnostic)
|
|
||||||
uint64_t now = hal_time_now_ns();
|
|
||||||
|
|
||||||
// In platform/linux/hal_time.c
|
|
||||||
uint64_t hal_time_now_ns(void) {
|
|
||||||
struct timespec ts;
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
return (uint64_t)ts.tv_sec * 1000000000ULL + ts.tv_nsec;
|
|
||||||
}
|
|
||||||
|
|
||||||
// In platform/kernel/hal_time.c
|
|
||||||
uint64_t hal_time_now_ns(void) {
|
|
||||||
return tsc_to_ns(rdtsc());
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. **Contract-First Design**
|
|
||||||
HAL interfaces are **contracts**, not convenience wrappers. Each HAL function has:
|
|
||||||
- **Precise semantics** - What it does, guaranteed across all platforms
|
|
||||||
- **Error handling** - When it can fail and how
|
|
||||||
- **Performance expectations** - Allowed latency/overhead
|
|
||||||
- **Concurrency model** - Thread-safe? ISR-safe?
|
|
||||||
|
|
||||||
### 3. **Testability on Hosted Platforms**
|
|
||||||
LithosAnanke code must be developable and testable on Linux/L4Re before deploying to bare metal.
|
|
||||||
|
|
||||||
**Example:** Heartbeat ISR development
|
|
||||||
- **Kernel implementation:** APIC timer interrupt → ISR → ring buffer
|
|
||||||
- **Linux test implementation:** timerfd + signal handler → ISR → ring buffer
|
|
||||||
- **Same HAL interface, same VM code, different platform layer**
|
|
||||||
|
|
||||||
### 4. **Zero Overhead When Possible**
|
|
||||||
HAL calls should compile to direct hardware access on kernel platforms, not add abstraction tax.
|
|
||||||
|
|
||||||
**Good:** `hal_time_now_ns()` inlines to `rdtsc()` with `-O2`
|
|
||||||
**Bad:** Function pointer indirection adds 5-10 cycles per call
|
|
||||||
|
|
||||||
### 5. **Fail-Fast Validation**
|
|
||||||
HAL implementations validate platform assumptions at init time, not during execution.
|
|
||||||
|
|
||||||
**Example:**
|
|
||||||
```c
|
|
||||||
void hal_time_init(void) {
|
|
||||||
// Calibrate TSC frequency at boot
|
|
||||||
tsc_calibrate_hpet();
|
|
||||||
|
|
||||||
// Validate monotonicity
|
|
||||||
uint64_t t1 = hal_time_now_ns();
|
|
||||||
hal_cpu_relax();
|
|
||||||
uint64_t t2 = hal_time_now_ns();
|
|
||||||
|
|
||||||
if (t2 < t1) {
|
|
||||||
hal_panic("hal_time: TSC not monotonic!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## HAL Subsystems
|
|
||||||
|
|
||||||
### 1. **Time & Timers** (`hal_time.h`)
|
|
||||||
**Purpose:** Monotonic time, periodic/oneshot timers, calibration
|
|
||||||
|
|
||||||
**Critical for StarForth:** The heartbeat subsystem and physics feedback loops depend on precise, jitter-free timing. HAL must guarantee:
|
|
||||||
- Monotonic time (never goes backward)
|
|
||||||
- Sub-microsecond resolution
|
|
||||||
- Calibrated frequency (for TSC-based timing)
|
|
||||||
|
|
||||||
**Platform challenges:**
|
|
||||||
- **Linux:** `clock_gettime()` is good, but signal-based timers have latency
|
|
||||||
- **Kernel:** TSC drift, HPET/PIT fallback, per-core calibration
|
|
||||||
|
|
||||||
### 2. **Interrupts** (`hal_interrupt.h`)
|
|
||||||
**Purpose:** Enable/disable IRQs, register ISRs, query interrupt context
|
|
||||||
|
|
||||||
**Critical for StarForth:** Heartbeat ISR must run at precise intervals without VM involvement.
|
|
||||||
|
|
||||||
**Platform challenges:**
|
|
||||||
- **Linux:** Signals are "interrupt-like" but not true IRQs
|
|
||||||
- **Kernel:** IDT setup, APIC configuration, spurious interrupt handling
|
|
||||||
|
|
||||||
### 3. **Memory** (`hal_memory.h`)
|
|
||||||
**Purpose:** Allocate/free memory, page mapping, heap management
|
|
||||||
|
|
||||||
**Critical for StarForth:** Dictionary allocation, stack allocation, heap allocator must work identically across platforms.
|
|
||||||
|
|
||||||
**Platform challenges:**
|
|
||||||
- **Linux:** malloc/free are simple
|
|
||||||
- **Kernel:** Physical memory manager, virtual memory manager, heap allocator—all from scratch
|
|
||||||
|
|
||||||
### 4. **Console** (`hal_console.h`)
|
|
||||||
**Purpose:** Character I/O for REPL and diagnostics
|
|
||||||
|
|
||||||
**Critical for StarForth:** The REPL must work on all platforms for interactive experimentation.
|
|
||||||
|
|
||||||
**Platform challenges:**
|
|
||||||
- **Linux:** stdin/stdout are perfect
|
|
||||||
- **Kernel:** UART 16550 is well-documented but framebuffer is tricky
|
|
||||||
|
|
||||||
### 5. **CPU** (`hal_cpu.h`)
|
|
||||||
**Purpose:** CPU ID, relax/halt, SMP coordination
|
|
||||||
|
|
||||||
**Critical for StarForth:** Per-core execution heat tracking (future), SMP scalability (future).
|
|
||||||
|
|
||||||
**Platform challenges:**
|
|
||||||
- **Linux:** pthread local storage
|
|
||||||
- **Kernel:** Local APIC, per-core stacks, CPU-local storage
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## HAL and the Physics Subsystems
|
|
||||||
|
|
||||||
The physics-driven adaptive runtime is the **primary beneficiary** of the HAL:
|
|
||||||
|
|
||||||
| Physics Subsystem | HAL Dependency | Why |
|
|
||||||
|-------------------|----------------|-----|
|
|
||||||
| **Execution Heat** | None (pure VM state) | Tracks word execution frequency |
|
|
||||||
| **Rolling Window** | `hal_time_now_ns()` | Timestamps for window entries |
|
|
||||||
| **Hot-Words Cache** | None (pure dictionary state) | Frequency-based reordering |
|
|
||||||
| **Pipelining Metrics** | None (pure transition tracking) | Word-to-word prediction |
|
|
||||||
| **Inference Engine** | `hal_time_now_ns()` | Calibration timing, ANOVA |
|
|
||||||
| **Heartbeat** | `hal_timer_periodic()`, `hal_interrupt.*` | ISR-based sampling |
|
|
||||||
|
|
||||||
**Key insight:** Only 2 of 6 subsystems touch the HAL directly, and only via clean interfaces. This preserves deterministic behavior while enabling kernel deployment.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## HAL and LithosAnanke
|
|
||||||
|
|
||||||
LithosAnanke is a **new platform implementation** of the HAL:
|
|
||||||
|
|
||||||
```
|
|
||||||
src/platform/kernel/
|
|
||||||
├── boot/
|
|
||||||
│ └── uefi_loader.c # UEFI entry point → BootInfo handoff
|
|
||||||
├── hal_time.c # TSC + HPET + APIC timer
|
|
||||||
├── hal_interrupt.c # IDT + Local APIC + IOAPIC
|
|
||||||
├── hal_memory.c # PMM + VMM + kmalloc
|
|
||||||
├── hal_console.c # UART 16550 + framebuffer
|
|
||||||
├── hal_cpu.c # SMP + CPU-local storage
|
|
||||||
└── drivers/ # PCI, AHCI, NVMe, VirtIO, etc.
|
|
||||||
```
|
|
||||||
|
|
||||||
**LithosAnanke does NOT modify:**
|
|
||||||
- VM core (`src/vm.c`)
|
|
||||||
- Physics subsystems (`src/dictionary_heat_optimization.c`, etc.)
|
|
||||||
- Word implementations (`src/word_source/*.c`)
|
|
||||||
|
|
||||||
**LithosAnanke ONLY implements:**
|
|
||||||
- HAL interfaces (`hal_*.c`)
|
|
||||||
- UEFI boot loader (`boot/uefi_loader.c`)
|
|
||||||
- Device drivers (`drivers/*.c`)
|
|
||||||
|
|
||||||
This is the **proof** that the HAL abstraction works: LithosAnanke is a pure platform layer, not a VM fork.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## HAL and StarshipOS
|
|
||||||
|
|
||||||
StarshipOS builds on LithosAnanke by adding:
|
|
||||||
- **Process model** - Forth tasks vs. traditional processes
|
|
||||||
- **Filesystem** - FAT32, ext2, or log-structured
|
|
||||||
- **Networking** - TCP/IP stack, DHCP, DNS
|
|
||||||
- **Device model** - Unified block/net/char device interfaces
|
|
||||||
- **Security model** - Capabilities, ACL, Forth-based access control
|
|
||||||
|
|
||||||
All of these **still use the HAL** for low-level access:
|
|
||||||
- Filesystem → `hal_memory` for caching, `hal_interrupt` for async I/O
|
|
||||||
- Networking → `hal_interrupt` for packet RX, `hal_time` for timeouts
|
|
||||||
- Device model → HAL as the common substrate
|
|
||||||
|
|
||||||
**The HAL is not just a kernel bootstrapping tool—it's the foundation for the entire OS.**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Migration Strategy
|
|
||||||
|
|
||||||
Current StarForth codebase must be refactored to introduce the HAL:
|
|
||||||
|
|
||||||
### Phase 1: Define HAL Interfaces
|
|
||||||
- Write `include/hal/*.h` headers with contracts
|
|
||||||
- Document semantics, error handling, performance expectations
|
|
||||||
- **No implementation yet**
|
|
||||||
|
|
||||||
### Phase 2: Refactor Existing Platforms
|
|
||||||
- Create `src/platform/linux/hal_*.c` implementing HAL
|
|
||||||
- Create `src/platform/l4re/hal_*.c` implementing HAL
|
|
||||||
- Update VM code to call HAL instead of platform-specific APIs
|
|
||||||
- **VM must still build and pass all 936+ tests**
|
|
||||||
|
|
||||||
### Phase 3: Validate HAL
|
|
||||||
- Build and test on Linux
|
|
||||||
- Build and test on L4Re (if available)
|
|
||||||
- Verify deterministic behavior (0% algorithmic variance) still holds
|
|
||||||
- Benchmark: HAL must not add measurable overhead
|
|
||||||
|
|
||||||
### Phase 4: Implement LithosAnanke Platform
|
|
||||||
- Create `src/platform/kernel/` with HAL implementations
|
|
||||||
- UEFI boot loader
|
|
||||||
- Basic MM, console, timing
|
|
||||||
- **Goal:** Boot to `ok` prompt on QEMU/OVMF
|
|
||||||
|
|
||||||
### Phase 5: Full LithosAnanke
|
|
||||||
- Complete HAL implementations (interrupts, SMP, drivers)
|
|
||||||
- Heartbeat ISR running at kernel level
|
|
||||||
- Physics subsystems operational
|
|
||||||
- **Goal:** Reproduce DoE results on bare metal
|
|
||||||
|
|
||||||
### Phase 6: StarshipOS
|
|
||||||
- Process model, filesystem, networking
|
|
||||||
- Forth as native control plane
|
|
||||||
- **Goal:** Self-hosting OS
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Success Criteria
|
|
||||||
|
|
||||||
The HAL is successful if:
|
|
||||||
|
|
||||||
1. ✅ **VM core has zero platform-specific code**
|
|
||||||
2. ✅ **All 936+ tests pass on Linux, L4Re, and LithosAnanke**
|
|
||||||
3. ✅ **0% algorithmic variance maintained across platforms**
|
|
||||||
4. ✅ **No measurable performance regression from HAL abstraction**
|
|
||||||
5. ✅ **LithosAnanke boots to `ok` prompt and runs REPL**
|
|
||||||
6. ✅ **Heartbeat subsystem works identically on all platforms**
|
|
||||||
7. ✅ **New platforms can be added without touching VM code**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Next Steps
|
|
||||||
|
|
||||||
See companion documentation:
|
|
||||||
- `interfaces.md` - Detailed HAL interface specifications
|
|
||||||
- `platform-implementations.md` - How to implement HAL for new platforms
|
|
||||||
- `migration-plan.md` - Step-by-step refactoring guide
|
|
||||||
- `lithosananke-integration.md` - LithosAnanke-specific implementation details
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## References
|
|
||||||
|
|
||||||
- StarForth VM core: `src/vm.c`
|
|
||||||
- Heartbeat system: `docs/03-architecture/heartbeat-system/`
|
|
||||||
- Physics feedback loops: `docs/FEEDBACK_LOOPS.md`
|
|
||||||
- Platform abstraction (current): `src/platform/`
|
|
||||||
@@ -1,729 +0,0 @@
|
|||||||
# HAL Platform Implementation Guide
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
This document explains how to implement the HAL for a new platform. It provides detailed examples for Linux, L4Re, and LithosAnanke (freestanding) implementations.
|
|
||||||
|
|
||||||
> **HISTORICAL — L4Re/Fiasco.OC**: the L4Re examples below describe a target that was a supported platform through mid-2026. L4Re support has since been removed as an active target — `src/platform/l4re/time.c` and related `#ifdef __l4__` code are retained for reference but no longer wired into any build.
|
|
||||||
|
|
||||||
**Target audience:** Platform developers adding HAL support for a new target.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Platform Directory Structure
|
|
||||||
|
|
||||||
```
|
|
||||||
src/platform/<platform>/
|
|
||||||
├── hal_time.c # Time & timer HAL implementation
|
|
||||||
├── hal_interrupt.c # Interrupt HAL implementation
|
|
||||||
├── hal_memory.c # Memory HAL implementation
|
|
||||||
├── hal_console.c # Console HAL implementation
|
|
||||||
├── hal_cpu.c # CPU HAL implementation
|
|
||||||
├── hal_panic.c # Panic/error HAL implementation
|
|
||||||
└── platform_init.c # Platform-specific initialization (optional)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Build Integration
|
|
||||||
|
|
||||||
Each platform is compiled independently via Makefile:
|
|
||||||
|
|
||||||
```makefile
|
|
||||||
# Platform selection
|
|
||||||
PLATFORM ?= linux # linux | l4re | kernel
|
|
||||||
|
|
||||||
# Platform-specific source files
|
|
||||||
PLATFORM_SOURCES = \
|
|
||||||
src/platform/$(PLATFORM)/hal_time.c \
|
|
||||||
src/platform/$(PLATFORM)/hal_interrupt.c \
|
|
||||||
src/platform/$(PLATFORM)/hal_memory.c \
|
|
||||||
src/platform/$(PLATFORM)/hal_console.c \
|
|
||||||
src/platform/$(PLATFORM)/hal_cpu.c \
|
|
||||||
src/platform/$(PLATFORM)/hal_panic.c
|
|
||||||
|
|
||||||
# Platform-specific flags
|
|
||||||
ifeq ($(PLATFORM),kernel)
|
|
||||||
CFLAGS += -ffreestanding -nostdlib -mno-red-zone
|
|
||||||
LDFLAGS += -nostdlib -static
|
|
||||||
endif
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Implementation Examples
|
|
||||||
|
|
||||||
### 1. Linux Platform (`src/platform/linux/`)
|
|
||||||
|
|
||||||
Linux is the **reference platform** for development and testing. It provides the richest debugging environment.
|
|
||||||
|
|
||||||
#### `hal_time.c` (Linux)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_time.h"
|
|
||||||
#include <time.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
/* Timer state */
|
|
||||||
typedef struct {
|
|
||||||
timer_t timer_id;
|
|
||||||
hal_timer_callback_t callback;
|
|
||||||
void *ctx;
|
|
||||||
} linux_timer_t;
|
|
||||||
|
|
||||||
static linux_timer_t *periodic_timers = NULL;
|
|
||||||
static int timer_count = 0;
|
|
||||||
|
|
||||||
void hal_time_init(void) {
|
|
||||||
/* Linux: clock_gettime is always available */
|
|
||||||
struct timespec ts;
|
|
||||||
if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0) {
|
|
||||||
hal_panic("hal_time_init: CLOCK_MONOTONIC unavailable");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t hal_time_now_ns(void) {
|
|
||||||
struct timespec ts;
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
|
||||||
return (uint64_t)ts.tv_sec * 1000000000ULL + ts.tv_nsec;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_time_delay_ns(uint64_t ns) {
|
|
||||||
struct timespec req;
|
|
||||||
req.tv_sec = ns / 1000000000ULL;
|
|
||||||
req.tv_nsec = ns % 1000000000ULL;
|
|
||||||
nanosleep(&req, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Signal handler for periodic timer */
|
|
||||||
static void timer_signal_handler(int signo, siginfo_t *si, void *uc) {
|
|
||||||
(void)signo;
|
|
||||||
(void)uc;
|
|
||||||
|
|
||||||
linux_timer_t *timer = (linux_timer_t *)si->si_value.sival_ptr;
|
|
||||||
if (timer && timer->callback) {
|
|
||||||
timer->callback(timer->ctx);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_timer_periodic(uint64_t period_ns, hal_timer_callback_t callback, void *ctx) {
|
|
||||||
/* Allocate timer structure */
|
|
||||||
linux_timer_t *timer = malloc(sizeof(linux_timer_t));
|
|
||||||
if (!timer) return -1;
|
|
||||||
|
|
||||||
timer->callback = callback;
|
|
||||||
timer->ctx = ctx;
|
|
||||||
|
|
||||||
/* Set up signal handler */
|
|
||||||
struct sigaction sa;
|
|
||||||
memset(&sa, 0, sizeof(sa));
|
|
||||||
sa.sa_flags = SA_SIGINFO;
|
|
||||||
sa.sa_sigaction = timer_signal_handler;
|
|
||||||
sigemptyset(&sa.sa_mask);
|
|
||||||
sigaction(SIGRTMIN, &sa, NULL);
|
|
||||||
|
|
||||||
/* Create POSIX timer */
|
|
||||||
struct sigevent sev;
|
|
||||||
memset(&sev, 0, sizeof(sev));
|
|
||||||
sev.sigev_notify = SIGEV_SIGNAL;
|
|
||||||
sev.sigev_signo = SIGRTMIN;
|
|
||||||
sev.sigev_value.sival_ptr = timer;
|
|
||||||
|
|
||||||
if (timer_create(CLOCK_MONOTONIC, &sev, &timer->timer_id) != 0) {
|
|
||||||
free(timer);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Arm the timer */
|
|
||||||
struct itimerspec its;
|
|
||||||
its.it_value.tv_sec = period_ns / 1000000000ULL;
|
|
||||||
its.it_value.tv_nsec = period_ns % 1000000000ULL;
|
|
||||||
its.it_interval = its.it_value; /* Periodic */
|
|
||||||
|
|
||||||
if (timer_settime(timer->timer_id, 0, &its, NULL) != 0) {
|
|
||||||
timer_delete(timer->timer_id);
|
|
||||||
free(timer);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return timer_count++; /* Return timer ID */
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_timer_cancel(int timer_id) {
|
|
||||||
/* TODO: Implement timer cancellation */
|
|
||||||
(void)timer_id;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t hal_time_frequency_hz(void) {
|
|
||||||
/* Linux: CLOCK_MONOTONIC is variable frequency, return 0 */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `hal_interrupt.c` (Linux)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_interrupt.h"
|
|
||||||
#include <signal.h>
|
|
||||||
|
|
||||||
/* Linux uses signals as "interrupts" */
|
|
||||||
static __thread int in_signal_handler = 0;
|
|
||||||
|
|
||||||
void hal_interrupt_init(void) {
|
|
||||||
/* No initialization needed on Linux */
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_irq_enable(void) {
|
|
||||||
/* Linux: interrupts (signals) always enabled */
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long hal_irq_disable(void) {
|
|
||||||
/* Linux: can't disable signals, return dummy state */
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_irq_restore(unsigned long state) {
|
|
||||||
(void)state;
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_irq_register(unsigned int irq, hal_isr_t isr, void *ctx) {
|
|
||||||
/* Linux: IRQs are handled via signal mechanism in hal_timer_periodic() */
|
|
||||||
(void)irq;
|
|
||||||
(void)isr;
|
|
||||||
(void)ctx;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_irq_unregister(unsigned int irq) {
|
|
||||||
(void)irq;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_in_interrupt_context(void) {
|
|
||||||
return in_signal_handler;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `hal_memory.c` (Linux)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_memory.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
void hal_mem_init(void) {
|
|
||||||
/* malloc is always available on Linux */
|
|
||||||
}
|
|
||||||
|
|
||||||
void *hal_mem_alloc(size_t size) {
|
|
||||||
if (size == 0) return NULL;
|
|
||||||
void *ptr = malloc(size);
|
|
||||||
if (ptr) {
|
|
||||||
memset(ptr, 0, size); /* Zero-initialize */
|
|
||||||
}
|
|
||||||
return ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_mem_free(void *ptr) {
|
|
||||||
free(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t hal_mem_alloc_pages(size_t count) {
|
|
||||||
/* Linux: just allocate from heap (no separate PMM) */
|
|
||||||
size_t size = count * hal_mem_page_size();
|
|
||||||
return (uint64_t)hal_mem_alloc(size);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_mem_free_pages(uint64_t paddr, size_t count) {
|
|
||||||
(void)count;
|
|
||||||
hal_mem_free((void *)paddr);
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_mem_map(uint64_t vaddr, uint64_t paddr, size_t size, unsigned int flags) {
|
|
||||||
/* Linux: identity mapping, no-op */
|
|
||||||
(void)vaddr;
|
|
||||||
(void)paddr;
|
|
||||||
(void)size;
|
|
||||||
(void)flags;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t hal_mem_page_size(void) {
|
|
||||||
return 4096; /* Standard page size */
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `hal_console.c` (Linux)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_console.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <poll.h>
|
|
||||||
|
|
||||||
void hal_console_init(void) {
|
|
||||||
/* stdin/stdout always available */
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_console_putc(char c) {
|
|
||||||
putchar(c);
|
|
||||||
fflush(stdout); /* Ensure character is visible */
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_console_puts(const char *s) {
|
|
||||||
if (s) {
|
|
||||||
fputs(s, stdout);
|
|
||||||
fflush(stdout);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_console_getc(void) {
|
|
||||||
return getchar();
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_console_has_input(void) {
|
|
||||||
struct pollfd pfd;
|
|
||||||
pfd.fd = STDIN_FILENO;
|
|
||||||
pfd.events = POLLIN;
|
|
||||||
return poll(&pfd, 1, 0) > 0;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `hal_cpu.c` (Linux)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_cpu.h"
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sched.h>
|
|
||||||
|
|
||||||
void hal_cpu_init(void) {
|
|
||||||
/* No initialization needed */
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int hal_cpu_id(void) {
|
|
||||||
/* Linux: return thread ID (not true CPU ID) */
|
|
||||||
return 0; /* Single-threaded for now */
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_cpu_relax(void) {
|
|
||||||
sched_yield();
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_cpu_halt(void) {
|
|
||||||
pause(); /* Wait for signal */
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int hal_cpu_count(void) {
|
|
||||||
return sysconf(_SC_NPROCESSORS_ONLN);
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `hal_panic.c` (Linux)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_panic.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
void hal_panic(const char *msg) {
|
|
||||||
fprintf(stderr, "PANIC: %s\n", msg ? msg : "unknown error");
|
|
||||||
fflush(stderr);
|
|
||||||
abort();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 2. Kernel Platform (`src/platform/kernel/`)
|
|
||||||
|
|
||||||
The kernel platform is **freestanding**—no libc, no OS, direct hardware access.
|
|
||||||
|
|
||||||
#### `hal_time.c` (Kernel)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_time.h"
|
|
||||||
#include "hal/hal_interrupt.h"
|
|
||||||
#include "kernel/apic.h"
|
|
||||||
#include "kernel/hpet.h"
|
|
||||||
#include "kernel/tsc.h"
|
|
||||||
|
|
||||||
/* TSC calibration state */
|
|
||||||
static uint64_t tsc_frequency_hz = 0;
|
|
||||||
static uint64_t tsc_offset_ns = 0;
|
|
||||||
|
|
||||||
void hal_time_init(void) {
|
|
||||||
/* Calibrate TSC using HPET */
|
|
||||||
tsc_frequency_hz = tsc_calibrate_hpet();
|
|
||||||
|
|
||||||
if (tsc_frequency_hz == 0) {
|
|
||||||
hal_panic("hal_time_init: TSC calibration failed");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Validate monotonicity */
|
|
||||||
uint64_t t1 = hal_time_now_ns();
|
|
||||||
for (volatile int i = 0; i < 1000; i++);
|
|
||||||
uint64_t t2 = hal_time_now_ns();
|
|
||||||
|
|
||||||
if (t2 < t1) {
|
|
||||||
hal_panic("hal_time_init: TSC not monotonic");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t hal_time_now_ns(void) {
|
|
||||||
/* Read TSC and convert to nanoseconds */
|
|
||||||
uint64_t tsc = rdtsc();
|
|
||||||
return tsc_to_ns(tsc) - tsc_offset_ns;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_time_delay_ns(uint64_t ns) {
|
|
||||||
uint64_t end = hal_time_now_ns() + ns;
|
|
||||||
while (hal_time_now_ns() < end) {
|
|
||||||
hal_cpu_relax();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* APIC timer state */
|
|
||||||
static hal_timer_callback_t apic_timer_callback = NULL;
|
|
||||||
static void *apic_timer_ctx = NULL;
|
|
||||||
|
|
||||||
/* APIC timer ISR (called from IDT) */
|
|
||||||
void apic_timer_isr(void) {
|
|
||||||
if (apic_timer_callback) {
|
|
||||||
apic_timer_callback(apic_timer_ctx);
|
|
||||||
}
|
|
||||||
apic_eoi(); /* Send End-Of-Interrupt */
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_timer_periodic(uint64_t period_ns, hal_timer_callback_t callback, void *ctx) {
|
|
||||||
if (period_ns < 1000) return -2; /* Minimum 1µs */
|
|
||||||
|
|
||||||
apic_timer_callback = callback;
|
|
||||||
apic_timer_ctx = ctx;
|
|
||||||
|
|
||||||
/* Configure APIC timer */
|
|
||||||
uint64_t ticks = (period_ns * apic_timer_frequency_hz()) / 1000000000ULL;
|
|
||||||
apic_timer_periodic(ticks);
|
|
||||||
|
|
||||||
return 1; /* Timer ID */
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_timer_cancel(int timer_id) {
|
|
||||||
(void)timer_id;
|
|
||||||
apic_timer_stop();
|
|
||||||
apic_timer_callback = NULL;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t hal_time_frequency_hz(void) {
|
|
||||||
return tsc_frequency_hz;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `hal_interrupt.c` (Kernel)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_interrupt.h"
|
|
||||||
#include "kernel/idt.h"
|
|
||||||
#include "kernel/apic.h"
|
|
||||||
|
|
||||||
/* Per-CPU interrupt nesting count */
|
|
||||||
static __thread unsigned int interrupt_depth = 0;
|
|
||||||
|
|
||||||
void hal_interrupt_init(void) {
|
|
||||||
/* Initialize IDT */
|
|
||||||
idt_init();
|
|
||||||
|
|
||||||
/* Initialize Local APIC */
|
|
||||||
apic_init();
|
|
||||||
|
|
||||||
/* Disable legacy PIC (use APIC instead) */
|
|
||||||
pic_disable();
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_irq_enable(void) {
|
|
||||||
__asm__ volatile("sti");
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned long hal_irq_disable(void) {
|
|
||||||
unsigned long flags;
|
|
||||||
__asm__ volatile(
|
|
||||||
"pushfq\n"
|
|
||||||
"popq %0\n"
|
|
||||||
"cli\n"
|
|
||||||
: "=r"(flags)
|
|
||||||
);
|
|
||||||
return flags;
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_irq_restore(unsigned long state) {
|
|
||||||
__asm__ volatile(
|
|
||||||
"pushq %0\n"
|
|
||||||
"popfq\n"
|
|
||||||
:
|
|
||||||
: "r"(state)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ISR table (256 entries for x86_64 IDT) */
|
|
||||||
static hal_isr_t isr_table[256] = {0};
|
|
||||||
static void *isr_ctx_table[256] = {0};
|
|
||||||
|
|
||||||
/* Common ISR entry point (called from IDT stubs) */
|
|
||||||
void common_isr_handler(unsigned int vector) {
|
|
||||||
interrupt_depth++;
|
|
||||||
|
|
||||||
if (isr_table[vector]) {
|
|
||||||
isr_table[vector](vector, isr_ctx_table[vector]);
|
|
||||||
}
|
|
||||||
|
|
||||||
interrupt_depth--;
|
|
||||||
apic_eoi();
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_irq_register(unsigned int irq, hal_isr_t isr, void *ctx) {
|
|
||||||
if (irq >= 256) return -1;
|
|
||||||
|
|
||||||
isr_table[irq] = isr;
|
|
||||||
isr_ctx_table[irq] = ctx;
|
|
||||||
|
|
||||||
/* Configure IOAPIC to route IRQ to Local APIC */
|
|
||||||
ioapic_route_irq(irq, 0); /* Route to CPU 0 */
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_irq_unregister(unsigned int irq) {
|
|
||||||
if (irq >= 256) return -1;
|
|
||||||
|
|
||||||
isr_table[irq] = NULL;
|
|
||||||
isr_ctx_table[irq] = NULL;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_in_interrupt_context(void) {
|
|
||||||
return interrupt_depth > 0;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `hal_memory.c` (Kernel)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_memory.h"
|
|
||||||
#include "kernel/pmm.h" /* Physical Memory Manager */
|
|
||||||
#include "kernel/vmm.h" /* Virtual Memory Manager */
|
|
||||||
#include "kernel/kmalloc.h" /* Kernel heap allocator */
|
|
||||||
|
|
||||||
void hal_mem_init(void) {
|
|
||||||
/* Initialize physical memory manager (parse UEFI memory map) */
|
|
||||||
pmm_init();
|
|
||||||
|
|
||||||
/* Initialize virtual memory manager (set up page tables) */
|
|
||||||
vmm_init();
|
|
||||||
|
|
||||||
/* Initialize kernel heap allocator */
|
|
||||||
kmalloc_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
void *hal_mem_alloc(size_t size) {
|
|
||||||
if (size == 0) return NULL;
|
|
||||||
return kmalloc(size); /* Kernel heap allocator */
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_mem_free(void *ptr) {
|
|
||||||
kfree(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t hal_mem_alloc_pages(size_t count) {
|
|
||||||
return pmm_alloc_pages(count);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_mem_free_pages(uint64_t paddr, size_t count) {
|
|
||||||
pmm_free_pages(paddr, count);
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_mem_map(uint64_t vaddr, uint64_t paddr, size_t size, unsigned int flags) {
|
|
||||||
/* Translate HAL flags to page table flags */
|
|
||||||
unsigned int pt_flags = 0;
|
|
||||||
if (flags & HAL_MEM_WRITE) pt_flags |= PAGE_WRITE;
|
|
||||||
if (flags & HAL_MEM_EXEC) pt_flags |= PAGE_EXEC;
|
|
||||||
if (flags & HAL_MEM_NOCACHE) pt_flags |= PAGE_NOCACHE;
|
|
||||||
|
|
||||||
return vmm_map(vaddr, paddr, size, pt_flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t hal_mem_page_size(void) {
|
|
||||||
return 4096;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `hal_console.c` (Kernel)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_console.h"
|
|
||||||
#include "kernel/uart.h"
|
|
||||||
#include "kernel/framebuffer.h"
|
|
||||||
|
|
||||||
void hal_console_init(void) {
|
|
||||||
/* Initialize UART 16550 (serial console) */
|
|
||||||
uart_init(0x3F8, 115200); /* COM1, 115200 baud */
|
|
||||||
|
|
||||||
/* Initialize framebuffer (if available from UEFI GOP) */
|
|
||||||
fb_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_console_putc(char c) {
|
|
||||||
/* Output to both serial and framebuffer */
|
|
||||||
uart_putc(c);
|
|
||||||
fb_putc(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_console_puts(const char *s) {
|
|
||||||
if (!s) return;
|
|
||||||
while (*s) {
|
|
||||||
hal_console_putc(*s++);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_console_getc(void) {
|
|
||||||
/* Read from UART (blocking) */
|
|
||||||
return uart_getc();
|
|
||||||
}
|
|
||||||
|
|
||||||
int hal_console_has_input(void) {
|
|
||||||
return uart_has_data();
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
#### `hal_cpu.c` (Kernel)
|
|
||||||
|
|
||||||
```c
|
|
||||||
#include "hal/hal_cpu.h"
|
|
||||||
#include "kernel/apic.h"
|
|
||||||
|
|
||||||
static unsigned int cpu_count = 1;
|
|
||||||
|
|
||||||
void hal_cpu_init(void) {
|
|
||||||
/* Detect CPU features */
|
|
||||||
cpu_detect_features();
|
|
||||||
|
|
||||||
/* Bring up secondary CPUs (SMP) */
|
|
||||||
cpu_count = smp_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int hal_cpu_id(void) {
|
|
||||||
/* Get Local APIC ID */
|
|
||||||
return apic_get_id();
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_cpu_relax(void) {
|
|
||||||
__asm__ volatile("pause");
|
|
||||||
}
|
|
||||||
|
|
||||||
void hal_cpu_halt(void) {
|
|
||||||
__asm__ volatile("hlt");
|
|
||||||
}
|
|
||||||
|
|
||||||
unsigned int hal_cpu_count(void) {
|
|
||||||
return cpu_count;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Platform Testing Strategy
|
|
||||||
|
|
||||||
### 1. **Unit Tests (Per-Platform)**
|
|
||||||
|
|
||||||
Each platform should have unit tests for HAL functions:
|
|
||||||
|
|
||||||
```c
|
|
||||||
/* test/platform/linux/hal_time_test.c */
|
|
||||||
void test_hal_time_monotonic(void) {
|
|
||||||
hal_time_init();
|
|
||||||
|
|
||||||
uint64_t t1 = hal_time_now_ns();
|
|
||||||
hal_time_delay_ns(1000000); /* 1ms */
|
|
||||||
uint64_t t2 = hal_time_now_ns();
|
|
||||||
|
|
||||||
assert(t2 > t1);
|
|
||||||
assert((t2 - t1) >= 1000000);
|
|
||||||
assert((t2 - t1) < 2000000); /* Allow 100% jitter for test */
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. **Cross-Platform VM Tests**
|
|
||||||
|
|
||||||
VM tests should run identically on all platforms:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Linux
|
|
||||||
make PLATFORM=linux test
|
|
||||||
|
|
||||||
# L4Re
|
|
||||||
make PLATFORM=l4re test
|
|
||||||
|
|
||||||
# Kernel (QEMU)
|
|
||||||
make PLATFORM=kernel test-qemu
|
|
||||||
```
|
|
||||||
|
|
||||||
**Success criteria:** All 936+ tests pass on all platforms.
|
|
||||||
|
|
||||||
### 3. **Determinism Validation**
|
|
||||||
|
|
||||||
Physics subsystems must show 0% algorithmic variance:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Run DoE on each platform
|
|
||||||
for platform in linux l4re kernel; do
|
|
||||||
make PLATFORM=$platform fastest
|
|
||||||
./build/$ARCH/fastest/starforth --doe > results_$platform.csv
|
|
||||||
done
|
|
||||||
|
|
||||||
# Compare results (should be identical)
|
|
||||||
diff results_linux.csv results_kernel.csv
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Common Implementation Pitfalls
|
|
||||||
|
|
||||||
### 1. **Non-Monotonic Time**
|
|
||||||
|
|
||||||
**Symptom:** Physics metrics show negative deltas, rolling window corrupted.
|
|
||||||
|
|
||||||
**Cause:** TSC goes backward (multi-core, frequency scaling).
|
|
||||||
|
|
||||||
**Fix:** Use `rdtscp` instead of `rdtsc`, synchronize TSC across cores, or fall back to HPET.
|
|
||||||
|
|
||||||
### 2. **Timer Jitter**
|
|
||||||
|
|
||||||
**Symptom:** Heartbeat intervals vary by 10-50%, metrics show high variance.
|
|
||||||
|
|
||||||
**Cause:** Signal latency (Linux), interrupt latency (kernel).
|
|
||||||
|
|
||||||
**Fix:** Minimize ISR work, use high-priority timer interrupt, disable frequency scaling.
|
|
||||||
|
|
||||||
### 3. **Memory Leaks**
|
|
||||||
|
|
||||||
**Symptom:** `hal_mem_alloc()` calls grow without matching `hal_mem_free()`.
|
|
||||||
|
|
||||||
**Cause:** Missing free in error paths, lost pointers.
|
|
||||||
|
|
||||||
**Fix:** Valgrind on Linux, manual leak tracking on kernel.
|
|
||||||
|
|
||||||
### 4. **Interrupt Context Violations**
|
|
||||||
|
|
||||||
**Symptom:** Crashes, hangs, or corruption when calling blocking HAL functions from ISR.
|
|
||||||
|
|
||||||
**Cause:** Calling `hal_mem_alloc()` or `hal_console_getc()` from timer ISR.
|
|
||||||
|
|
||||||
**Fix:** Assert `!hal_in_interrupt_context()` in blocking functions.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## Next Steps
|
|
||||||
|
|
||||||
- See `migration-plan.md` for refactoring existing code
|
|
||||||
- See `lithosananke-integration.md` for kernel-specific details
|
|
||||||
@@ -550,13 +550,13 @@ identically afterward.)
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Build
|
# Build
|
||||||
make -f Makefile.starkernel ARCH=amd64 STARFORTH_ENABLE_VM=1
|
make -f kernel/Makefile ARCH=amd64 STARFORTH_ENABLE_VM=1
|
||||||
|
|
||||||
# Run QEMU
|
# Run QEMU
|
||||||
make -f Makefile.starkernel ARCH=amd64 STARFORTH_ENABLE_VM=1 qemu
|
make -f kernel/Makefile ARCH=amd64 STARFORTH_ENABLE_VM=1 qemu
|
||||||
|
|
||||||
# Clean
|
# Clean
|
||||||
make -f Makefile.starkernel ARCH=amd64 clean-kernel
|
make -f kernel/Makefile ARCH=amd64 clean-kernel
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -564,13 +564,9 @@ make -f Makefile.starkernel ARCH=amd64 clean-kernel
|
|||||||
## Branch Relationship
|
## Branch Relationship
|
||||||
|
|
||||||
```
|
```
|
||||||
master (hosted StarForth)
|
master (post-split: sole LithosAnanke production line — the old
|
||||||
│
|
lithosananke/master two-branch topology no longer exists in this repo)
|
||||||
├── lithosananke (kernel branch)
|
└── M0–M7 complete, M7.1 live (capsules / Tripod / Stadium / ACL)
|
||||||
│ │
|
|
||||||
│ └── M7 complete, M7.1 design complete
|
|
||||||
│
|
|
||||||
└── starkernel-junkyard (legacy, can delete)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user