Compare commits
39
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdf9c1946c | ||
|
|
b9b2bd81da | ||
|
|
7975bab049 | ||
|
|
13fae6df30 | ||
|
|
b6c87b3045 | ||
|
|
36b258054c | ||
|
|
c2e42c3cba | ||
|
|
0565a03996 | ||
|
|
7099f42a5a | ||
|
|
e29a00f717 | ||
|
|
49c6ec82ee | ||
|
|
53b1e98eb7 | ||
|
|
15a8ec8bcf | ||
|
|
6dcfbe6740 | ||
|
|
bcfca9fa19 | ||
|
|
dd3469f9a3 | ||
|
|
f30005e1f6 | ||
|
|
6f9900f805 | ||
|
|
cda8aad8b2 | ||
|
|
d36b78cc73 | ||
|
|
ea0fd7c38e | ||
|
|
47712e0cd1 | ||
|
|
5210abaa4e | ||
|
|
1061433791 | ||
|
|
38c4d5ac69 | ||
|
|
52e184ef03 | ||
|
|
913a896e1b | ||
|
|
9bf30f7a21 | ||
|
|
4ed2df4b56 | ||
|
|
573d386b51 | ||
|
|
66d0af55d0 | ||
|
|
295cd5185c | ||
|
|
8301d09db0 | ||
|
|
b80bd5cd27 | ||
|
|
a98baaacdd | ||
|
|
4137f1b70d | ||
|
|
9ee797db7f | ||
|
|
9ae86b873e | ||
|
|
b789d18ac0 |
+5
-4
@@ -198,9 +198,10 @@ removed as an active target.)
|
||||
**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
|
||||
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 403-word dictionary (word count as of 2026-11-17, hash
|
||||
`0x627f392ccbaa96f1`, POST 990/990, `logs/20261117-222402/PROTOCOL.md`; corrected 2026-11-17 — this
|
||||
file said 318 words, hash `0x8c92508f748f99cf` (2026-11-10); corrected 2026-11-10 — it said 526 words,
|
||||
hash across amd64/aarch64/riscv64 with a 404-word dictionary (word count as of 2026-11-18, hash
|
||||
`0x847bd8ef42f53e14`, POST 990/990, `logs/20261118-204012/PROTOCOL.md`, capsules loaded through blocks; before that
|
||||
`0xf4e9fdc94f6bfc77`, `logs/20261118-151921/PROTOCOL.md`; corrected 2026-11-18 — this file said
|
||||
403 words, hash `0x627f392ccbaa96f1` (2026-11-17, before `starshipos.4th` loaded); it said 318 words, hash `0x8c92508f748f99cf` (2026-11-10); corrected 2026-11-10 — it said 526 words,
|
||||
hash `0x82f4ae7cb2e2d424` (2026-10-14, `FABRIC-3.md` §XXXVIII); verify against a live
|
||||
`PARITY:V4_SYSTEM word_count=` line before citing, it changes with any new C word registration).
|
||||
|
||||
@@ -230,7 +231,7 @@ Output: `build/<arch>/kernel/starkernel_loader.efi` + `build/<arch>/kernel/stark
|
||||
Two independently tracked version strings flow into the generated `include/version.h`:
|
||||
`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
|
||||
`LITHOS_VERSION` (`kernel/Makefile` — the kernel version, currently **`4.0.0-alpha.4`**; corrected 2026-11-10 — this file said `2.1.0` (bumped at
|
||||
`LITHOS_VERSION` (`kernel/Makefile` — the kernel version, currently **`4.0.0-alpha.5`**; corrected 2026-11-18 — this file said `4.0.0-alpha.4`; corrected 2026-11-10 — it said `2.1.0` (bumped at
|
||||
the `v2.1.0` tag that closed FABRIC-3.6; corrected 2026-10-14 from `3.1.0` / `2.0.0`, which
|
||||
replaced `2.0.1` on 2026-09-19 per `FABRIC-3.md` §I.2 — `2.0.1` named the SER5
|
||||
hardware-track line and claimed unverified progress). The versioning policy is
|
||||
|
||||
@@ -153,3 +153,25 @@ him -> the tag, on his word.
|
||||
- **POST is as v3's works.** Not reproducing v3's tests AS WRITTEN, or a parity mismatch, is THE failure.
|
||||
- Order given: inspect the debug (EMERGENCY) build first, then write the design for the failure-triggered
|
||||
diagnostic build -- for his ruling, before building.
|
||||
|
||||
## A long stage may run in the background, but only alone (Captain Bob, 2026-11-18)
|
||||
|
||||
A protocol stage that takes longer than one foreground command (600 s at most) may run in the
|
||||
background, on one condition: **nothing else runs at the same time**, no other background process
|
||||
of any kind, the docs stage included. Captain Bob: "Aarch64 bg is fine as long as there is no other
|
||||
background process running including docs. In fact that might generalize too."
|
||||
|
||||
So:
|
||||
- **One stage at a time,** foreground or background. A background stage is waited for before the
|
||||
next stage, or anything else, starts.
|
||||
- **Still one QEMU at a time.**
|
||||
- **Today this covers** `accept-aarch64` (401 to 429 s for the boot plus its session) and `docs`.
|
||||
Any other long stage runs the same way.
|
||||
|
||||
## The hosted product is not a concern (Captain Bob, restated 2026-11-18)
|
||||
|
||||
"Nobody cares about hosted anymore. I told you that."
|
||||
- No effort goes into the hosted v4 product (`v4/tools/hosted.c`, `boot.c`'s use by it) for its own
|
||||
sake.
|
||||
- It is touched only to keep the gates that still run it green: the docs stage's dictionary check
|
||||
(`v4/tools/mkdictionary.py`) and `make -C v4 test`. Ruled "Keep the boot.c change", for that reason.
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# Changelog
|
||||
|
||||
## 2026-11-18 — LithosAnanke v4.0.0-alpha.5: the fabric to spec
|
||||
|
||||
The kernel boots v4's fabric as designed (#189):
|
||||
- Hera is born in the fabric and runs v3's whole POST, 990 cases, as written.
|
||||
- Every node ticks on the one adaptive heartbeat, in lockstep.
|
||||
- Each step walks only the places that hold a node (mechanism A, which brought aarch64 back inside
|
||||
its 570 s).
|
||||
- A fault dump prints when a node stops, and a diagnostic build follows any failed stage.
|
||||
- Capsules are ephemeral: a block lands at its number less the RAM block count, a later write
|
||||
overwrites, and the loader interprets the lowest block
|
||||
(`docs/v4.0.0/plans/2026-11-18-capsule-blocks.md`).
|
||||
|
||||
`dict_hash` is `0x847bd8ef42f53e14`. `docs/fabric/FABRIC-3.md` XLVIII.25–28.
|
||||
|
||||
## 2026-11-10 — LithosAnanke v4.0.0-alpha.4: the plug-and-play stick
|
||||
|
||||
The plug-and-play stick (#92), the BAM flush (#155), the Book of Fabric (#138), the Dictionary of v4 (#157), and the .com’s Downloads and Documents pages (#126, #161).
|
||||
|
||||
@@ -28,6 +28,18 @@ config STARFORTH_V4
|
||||
2026-10-14: v3 is being retired. Off builds v3 alone. See
|
||||
docs/v4.0.0/DECOMPOSITION.md and boards/BRINGUP.md A6.
|
||||
|
||||
config BLK_RAM_USER_BLOCKS
|
||||
int "The VM's user RAM block count (BLK_RAM_USER_BLOCKS)"
|
||||
default 2048
|
||||
help
|
||||
How many blocks of fast RAM a VM sees: LBN 0 .. BLK_RAM_USER_BLOCKS - 1.
|
||||
The block layout is derived from it (v3/include/blk_layout.h,
|
||||
block_subsystem.h: BLK_RAM_BLOCKS, BLK_DISK_START). A capsule page
|
||||
`Block n` must have n at least this, and is copied down by it to be
|
||||
interpreted (docs/v4.0.0/plans/2026-11-18-capsule-blocks.md). mkcapsule
|
||||
and mkartemis are built with the same value. Changing it moves where
|
||||
disk blocks start, so media made with another value do not match.
|
||||
|
||||
config PARITY_MODE
|
||||
bool "Deterministic parity harness mode (PARITY_MODE)"
|
||||
default n
|
||||
@@ -99,6 +111,15 @@ config STADIUM_CAPACITY_TICK
|
||||
tuning is DoE work (item 5.1), same treatment as the other
|
||||
placeholder constants in this file.
|
||||
|
||||
config STADIUM_HEAT_SLICE_CELLS
|
||||
int "Stadium cells walked per heartbeat tick for the heartbeat's load (STADIUM_HEAT_SLICE_CELLS)"
|
||||
default 5500
|
||||
help
|
||||
The adaptive heartbeat paces by the Stadium's resident heat, walked a
|
||||
slice each tick: a whole walk is cells / this many ticks. 5500 is about
|
||||
0.25 ms on aarch64 under TCG (measured 2026-11-19), a tenth of the
|
||||
fastest tick.
|
||||
|
||||
config STADIUM_MEMORY_PERCENT
|
||||
int "Percent of free physical memory the Stadium claims at boot (STADIUM_MEMORY_PERCENT)"
|
||||
default 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# LithosAnanke v4.0.0-alpha.4
|
||||
# LithosAnanke v4.0.0-alpha.5
|
||||
|
||||
**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.
|
||||
@@ -7,8 +7,8 @@ runs StarForth as its sole userspace runtime. No libc. No OS. Just stone and nec
|
||||
|
||||
**Try it in your browser:** [starshipos-f18.com](https://starshipos-f18.com/) — a StarshipOS
|
||||
machine of your own, booted to `[zuse@Hera] ok>`, thrown away when you leave. **Releases:**
|
||||
[v4.0.0-alpha.4](https://gitea.starshipos-f18.org/rajames/LithosAnanke/releases),
|
||||
the kernel `4.0.0-alpha.4` with the StarForth engine `3.2.0`.
|
||||
[v4.0.0-alpha.5](https://gitea.starshipos-f18.org/rajames/LithosAnanke/releases),
|
||||
the kernel `4.0.0-alpha.5` with the StarForth engine `3.2.0`.
|
||||
|
||||
---
|
||||
|
||||
@@ -46,7 +46,7 @@ milestone, #156): what v4 needs of it, the block layer, moves into v4 and the re
|
||||
|
||||
**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 — **990 tests**,
|
||||
`PARITY:V4_SYSTEM word_count=403 dict_hash=0x627f392ccbaa96f1` (`logs/20261117-222402/PROTOCOL.md`); v3 — **1052 tests**,
|
||||
`PARITY:V4_SYSTEM word_count=404 dict_hash=0x847bd8ef42f53e14` (`logs/20261118-204012/PROTOCOL.md`); v3 — **1052 tests**,
|
||||
`PARITY:M7.1a word_count=526 hash=0x82f4ae7cb2e2d424`.
|
||||
|
||||
**How a change gets in** (the Captain Bob method): `master` is reached only through a pull request
|
||||
|
||||
+25
-29
@@ -6,7 +6,7 @@
|
||||
|
||||
## Capsule Summary
|
||||
|
||||
| Capsule | Blocks claimed | xxHash64 | Signed |
|
||||
| Capsule | Blocks used | xxHash64 | Signed |
|
||||
|---------|----------------|----------|--------|
|
||||
| `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` | n/a |
|
||||
@@ -29,11 +29,11 @@
|
||||
| `sdk.4th` | 5109, 5110, 5111, 5112, 5113, 5114, 5115 | `0x008fdbbb62c94a3a` | n/a |
|
||||
| `turtle.4th` | 5100, 5101, 5102, 5103, 5104, 5105, 5106, 5107, 5108 | `0x4d470418ca543365` | n/a |
|
||||
| `user-font-demo.4th` | 4200, 4201, 4202 | `0xce1fd7d1b581a56d` | n/a |
|
||||
| `v4:centre.4th` | 8100, 8101, 8102, 8104, 8105, 8106, 8107 | `0xccd1b28a101c78b2` | n/a |
|
||||
| `v4:forth79.4th` | 6000, 6001, 6002 | `0x4055641ee17d176b` | n/a |
|
||||
| `v4:hera.4th` | 8000, 8001 | `0x85300ad4e6e8b86b` | n/a |
|
||||
| `v4:physics.4th` | 8200, 8201, 8202, 8203, 8204 | `0x747d89ca8d57e29c` | n/a |
|
||||
| `v4:starshipos.4th` | 7000, 7001 | `0xb74bfa51f8d4719a` | n/a |
|
||||
| `v4:centre.4th` | 3964, 3965, 3966, 3967, 3968, 3969, 3970 | `0xea5815290d56dff3` | n/a |
|
||||
| `v4:forth79.4th` | 3948, 3949, 3950 | `0x4609d6ef54166ef8` | n/a |
|
||||
| `v4:hera.4th` | 3960, 3961 | `0x78730b1d6effe892` | n/a |
|
||||
| `v4:physics.4th` | 3972, 3973, 3974, 3975, 3976 | `0x5b0195fc30828bde` | n/a |
|
||||
| `v4:starshipos.4th` | 3956, 3957 | `0x1734a8f4fe7483a5` | n/a |
|
||||
| `workload-0.4th` | 2200, 2201 | `0x93f86f60aeba8feb` | n/a |
|
||||
| `workload-1-lite.4th` | 5058, 5059 | `0x44a7a7e3176dcc8d` | n/a |
|
||||
| `workload-1.4th` | 4406, 4415, 4425, 4435 | `0x63e251adb0a03613` | n/a |
|
||||
@@ -105,6 +105,25 @@
|
||||
| 2160 | `workload-8.4th` | `0x56b7f2f0efa000df` | ok |
|
||||
| 2200 | `workload-0.4th` | `0x93f86f60aeba8feb` | ok |
|
||||
| 2201 | `workload-0.4th` | `0x93f86f60aeba8feb` | ok |
|
||||
| 3948 | `v4:forth79.4th` | `0x4609d6ef54166ef8` | ok |
|
||||
| 3949 | `v4:forth79.4th` | `0x4609d6ef54166ef8` | ok |
|
||||
| 3950 | `v4:forth79.4th` | `0x4609d6ef54166ef8` | ok |
|
||||
| 3956 | `v4:starshipos.4th` | `0x1734a8f4fe7483a5` | ok |
|
||||
| 3957 | `v4:starshipos.4th` | `0x1734a8f4fe7483a5` | ok |
|
||||
| 3960 | `v4:hera.4th` | `0x78730b1d6effe892` | ok |
|
||||
| 3961 | `v4:hera.4th` | `0x78730b1d6effe892` | ok |
|
||||
| 3964 | `v4:centre.4th` | `0xea5815290d56dff3` | ok |
|
||||
| 3965 | `v4:centre.4th` | `0xea5815290d56dff3` | ok |
|
||||
| 3966 | `v4:centre.4th` | `0xea5815290d56dff3` | ok |
|
||||
| 3967 | `v4:centre.4th` | `0xea5815290d56dff3` | ok |
|
||||
| 3968 | `v4:centre.4th` | `0xea5815290d56dff3` | ok |
|
||||
| 3969 | `v4:centre.4th` | `0xea5815290d56dff3` | ok |
|
||||
| 3970 | `v4:centre.4th` | `0xea5815290d56dff3` | ok |
|
||||
| 3972 | `v4:physics.4th` | `0x5b0195fc30828bde` | ok |
|
||||
| 3973 | `v4:physics.4th` | `0x5b0195fc30828bde` | ok |
|
||||
| 3974 | `v4:physics.4th` | `0x5b0195fc30828bde` | ok |
|
||||
| 3975 | `v4:physics.4th` | `0x5b0195fc30828bde` | ok |
|
||||
| 3976 | `v4:physics.4th` | `0x5b0195fc30828bde` | ok |
|
||||
| 4000 | `ACL.4th` | `0xf8890c05c0d8f921` | ok |
|
||||
| 4001 | `ACL.4th` | `0xf8890c05c0d8f921` | ok |
|
||||
| 4002 | `ACL.4th` | `0xf8890c05c0d8f921` | ok |
|
||||
@@ -366,29 +385,6 @@
|
||||
| 5113 | `sdk.4th` | `0x008fdbbb62c94a3a` | ok |
|
||||
| 5114 | `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 |
|
||||
| 7000 | `v4:starshipos.4th` | `0xb74bfa51f8d4719a` | ok |
|
||||
| 7001 | `v4:starshipos.4th` | `0xb74bfa51f8d4719a` | ok |
|
||||
| 8000 | `v4:hera.4th` | `0x85300ad4e6e8b86b` | ok |
|
||||
| 8001 | `v4:hera.4th` | `0x85300ad4e6e8b86b` | ok |
|
||||
| 8100 | `v4:centre.4th` | `0xccd1b28a101c78b2` | ok |
|
||||
| 8101 | `v4:centre.4th` | `0xccd1b28a101c78b2` | ok |
|
||||
| 8102 | `v4:centre.4th` | `0xccd1b28a101c78b2` | ok |
|
||||
| 8104 | `v4:centre.4th` | `0xccd1b28a101c78b2` | ok |
|
||||
| 8105 | `v4:centre.4th` | `0xccd1b28a101c78b2` | ok |
|
||||
| 8106 | `v4:centre.4th` | `0xccd1b28a101c78b2` | ok |
|
||||
| 8107 | `v4:centre.4th` | `0xccd1b28a101c78b2` | ok |
|
||||
| 8200 | `v4:physics.4th` | `0x747d89ca8d57e29c` | ok |
|
||||
| 8201 | `v4:physics.4th` | `0x747d89ca8d57e29c` | ok |
|
||||
| 8202 | `v4:physics.4th` | `0x747d89ca8d57e29c` | ok |
|
||||
| 8203 | `v4:physics.4th` | `0x747d89ca8d57e29c` | ok |
|
||||
| 8204 | `v4:physics.4th` | `0x747d89ca8d57e29c` | ok |
|
||||
|
||||
## Conflicts
|
||||
|
||||
None.
|
||||
|
||||
---
|
||||
*40 capsule(s) scanned. Re-run `mkcapsule --manifest <dir>` to refresh.*
|
||||
|
||||
+13
-7
@@ -1,4 +1,4 @@
|
||||
Block 8100
|
||||
Block 3964
|
||||
( centre.4th -- what a node that births others needs. )
|
||||
( docs/v4.0.0/MESH.md 9a. Births follow v3: any node may )
|
||||
( birth on its own ports, and is its children's parent. )
|
||||
@@ -14,7 +14,8 @@ VARIABLE (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 ;
|
||||
Block 8101
|
||||
-->
|
||||
Block 3965
|
||||
: (TN) ( n -- ) 0 <# #S #> (TS) 32 (TC) ;
|
||||
: (T) ( -- baddr u ) PAD (T#) @ ;
|
||||
( The node being born: its number, its place, the port of )
|
||||
@@ -27,7 +28,8 @@ VARIABLE (KIDC) VARIABLE (PERS) VARIABLE (PERS#)
|
||||
-1 NODE-ERROR ! ;
|
||||
: (TOLD) ( how -- ) 1 - IF (FAIL) THEN ;
|
||||
: (TELL) ( baddr u -- ) (KID#) @ SEND (KID#) @ AWAIT (TOLD) ;
|
||||
Block 8102
|
||||
-->
|
||||
Block 3966
|
||||
( the system, a capsule of F18 code, cell by cell to its port )
|
||||
: (NUCLEUS) ( -- )
|
||||
S" v4:nucleus-64.f18" CAPSULE-OPEN 0= IF (FAIL) THEN
|
||||
@@ -36,7 +38,8 @@ Block 8102
|
||||
: (LINES) ( baddr u -- ) CAPSULE-OPEN 0= IF (FAIL) THEN
|
||||
BEGIN PAD CAPSULE-LINE DUP 0< 0= WHILE PAD SWAP (TELL) REPEAT
|
||||
DROP ;
|
||||
Block 8104
|
||||
-->
|
||||
Block 3967
|
||||
( Who it is, where its printing goes, which of its ports )
|
||||
( leads to everything it is not told of, and who is there. )
|
||||
: (WHO) ( -- )
|
||||
@@ -45,7 +48,8 @@ Block 8104
|
||||
(KIDC) @ (TN) S" DEFAULT-ROUTE " (TS)
|
||||
(ME) @ (TN) (KIDC) @ (TN) S" NEIGHBOUR" (TS)
|
||||
(T) 0 (KIDP) @ SEND-ON (KID#) @ AWAIT (TOLD) ;
|
||||
Block 8105
|
||||
-->
|
||||
Block 3968
|
||||
( number port childport baddr u -- place A NODE IS BORN, )
|
||||
( its port childport joined to this one's port: empty, then )
|
||||
( the system, FORTH-79, and its personality if u is not 0. )
|
||||
@@ -60,7 +64,8 @@ Block 8105
|
||||
S" (SEAL)" (TELL)
|
||||
(KID) @ (KID#) @ NODE-PARITY
|
||||
(KID) @ ;
|
||||
Block 8106
|
||||
-->
|
||||
Block 3969
|
||||
( number port childport -- place a node with no capsule )
|
||||
: BIRTH 0 0 BIRTH-AS ;
|
||||
( Two outer nodes are joined: port 3 of X to port 4 of Y, )
|
||||
@@ -74,7 +79,8 @@ VARIABLE (XP) VARIABLE (XN) VARIABLE (YP) VARIABLE (YN)
|
||||
: (JOIN) ( -- )
|
||||
(XP) @ 3 (YP) @ 4 NODE-WIRE 0= IF (FAIL) THEN
|
||||
(YN) @ 3 (XN) @ (SAY) (XN) @ 4 (YN) @ (SAY) ;
|
||||
Block 8107
|
||||
-->
|
||||
Block 3970
|
||||
( n -- A UNIT: four outer nodes, n+1 to n+4, on ports 2 )
|
||||
( to 5 of this one, each by its own port 2, and joined in a )
|
||||
( square: 1-2, 2-4, 4-3, 3-1. )
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
Block 6000
|
||||
Block 3948
|
||||
( 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. )
|
||||
( docs/v4.0.0/NUCLEUS.md. Blocks 3948 up. )
|
||||
( A word moves here from the assembled nucleus, v4/capsule, )
|
||||
( once its colon definition passes POST. )
|
||||
Block 6001
|
||||
-->
|
||||
Block 3949
|
||||
( 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. )
|
||||
@@ -14,7 +15,8 @@ Block 6001
|
||||
VARIABLE (UD)
|
||||
( u1 u2 -- ud the unsigned double product )
|
||||
: U* UM* ;
|
||||
Block 6002
|
||||
-->
|
||||
Block 3950
|
||||
( 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. )
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Block 8000
|
||||
Block 3960
|
||||
( hera.4th -- what is Hera's alone, beside centre.4th, which )
|
||||
( she loads first. docs/v4.0.0/MESH.md 9a. She decides )
|
||||
( which nodes there are and which are awake: KILL, PAUSE and )
|
||||
@@ -14,7 +14,8 @@ Block 8000
|
||||
: KILL ( n -- )
|
||||
(THERE?) 0= IF ." KILL: " (NO-NODE) THEN
|
||||
DUP NODE-KILL NO-ROUTE ;
|
||||
Block 8001
|
||||
-->
|
||||
Block 3961
|
||||
: PAUSE ( n -- )
|
||||
(THERE?) 0= IF ." PAUSE: " (NO-NODE) THEN NODE-SLEEP ;
|
||||
: RESUME ( n -- )
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Block 8200
|
||||
Block 3972
|
||||
( physics.4th -- the words of the loops, v3's physics-freeze )
|
||||
( and inference words, on a node the kernel keeps records )
|
||||
( for: each asks its kernel, which keeps every word's and )
|
||||
@@ -14,7 +14,8 @@ Block 8200
|
||||
-27 KERNEL-WORD INFER-DECAY-SLOPE ( addr u -- d )
|
||||
-28 KERNEL-WORD INFER-WINDOW-WIDTH ( addr u -- n )
|
||||
-29 KERNEL-WORD INFER-RUN ( -- )
|
||||
Block 8201
|
||||
-->
|
||||
Block 3973
|
||||
( and what the last INFER-RUN, or the heartbeat's, found; )
|
||||
( a q is a Q48.16 double, as qmath.f18's )
|
||||
-30 KERNEL-WORD INFER-WINDOW@ ( -- u )
|
||||
@@ -24,7 +25,8 @@ Block 8201
|
||||
-34 KERNEL-WORD INFER-EARLY-EXIT@ ( -- flag )
|
||||
( v3's DECAY_RATE_PER_US_Q16, its compile-time constant )
|
||||
1 CONSTANT DECAY-RATE@
|
||||
Block 8202
|
||||
-->
|
||||
Block 3974
|
||||
( v3's StarForth module: a word's execution heat, by the )
|
||||
( address ' leaves; and the hottest -- the kernel's records )
|
||||
-35 KERNEL-WORD ENTROPY@ ( addr -- n )
|
||||
@@ -40,7 +42,8 @@ Block 8202
|
||||
." ==================================" CR
|
||||
(HOT#) MIN 0 ?DO I (HOT) SWAP I 1+ 0 .R ." . "
|
||||
>NAME COUNT TYPE ." : " 0 .R CR LOOP ;
|
||||
Block 8203
|
||||
-->
|
||||
Block 3975
|
||||
( WORD-ENTROPY: every word with heat, then the totals, as v3 )
|
||||
VARIABLE (WE-T) VARIABLE (WE-N)
|
||||
: WORD-ENTROPY ( -- )
|
||||
@@ -56,7 +59,8 @@ VARIABLE (WE-T) VARIABLE (WE-N)
|
||||
." Total words: " (WE-N) @ 0 .R CR
|
||||
(WE-T) @ IF ." Average executions per word: "
|
||||
(WE-T) @ (WE-N) @ / 0 .R CR THEN ;
|
||||
Block 8204
|
||||
-->
|
||||
Block 3976
|
||||
( (- skips its input to the matching close paren, nesting, )
|
||||
( as v3's code does -- its documentation says to the line end )
|
||||
: (- ( -- ) 1
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
Block 7000
|
||||
Block 3956
|
||||
( starshipos.4th -- the StarshipOS words, in their own )
|
||||
( vocabulary, STARSHIPOS: not FORTH-79, so not in FORTH. )
|
||||
( Loaded when the system boots, after forth79.4th. )
|
||||
( Blocks 7000 up. New definitions still go into FORTH; the )
|
||||
( search starts in STARSHIPOS, then FORTH. )
|
||||
( Blocks 3956 up. New definitions still go into FORTH; the )
|
||||
( search starts in STARSHIPOS once init.4th sets it. )
|
||||
VOCABULARY STARSHIPOS STARSHIPOS DEFINITIONS
|
||||
Block 7001
|
||||
-->
|
||||
Block 3957
|
||||
( DOE baddr u -- as S" name" DOE )
|
||||
( Intended: run the DoE of that name, from the capsule of )
|
||||
( that name. As yet it only types the name back -- asked for )
|
||||
|
||||
@@ -95,6 +95,19 @@ set HDR-NFA here ", VLIST #id, #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK he
|
||||
CUT: drop -1 + a! @ (Q)+1 a! @ a! ! jump L
|
||||
DONE: drop ;
|
||||
|
||||
\ ( -- ) take off every list every entry at or above the address in (Q)+0:
|
||||
\ FORTH's, and each vocabulary's that stays; a vocabulary defined at or above
|
||||
\ it goes from the chain. FORGET does this for what it forgets, and COLD for
|
||||
\ everything since the seal, so a vocabulary sealed into the system stays.
|
||||
: (PRUNE-ALL)
|
||||
(LATEST) (PRUNE)
|
||||
V: VOC-LINK a! @ if PRUNED \ vocabularies that go
|
||||
dup (Q) a! @ inv + 1 + -if GONE drop jump KEPT
|
||||
GONE: drop 1 + a! @ VOC-LINK a! ! jump V
|
||||
KEPT: P: if PRUNED \ the lists of those that stay
|
||||
dup (PRUNE) 1 + a! @ jump P
|
||||
PRUNED: drop ;
|
||||
|
||||
\ FORGET xxx FORTH-79: remove xxx and every word defined after it, in
|
||||
\ whatever vocabulary; the space they took is free again. A vocabulary that
|
||||
\ goes is no longer CONTEXT or CURRENT: FORTH is. A word that is not there
|
||||
@@ -108,13 +121,7 @@ set HDR-NFA here ", FORGET #id, #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK h
|
||||
drop drop NODE-ERROR b! 10 !b ;
|
||||
OK: drop
|
||||
dup (Q) a! ! 4* DP a! ! \ the space from its name on
|
||||
(LATEST) (PRUNE)
|
||||
V: VOC-LINK a! @ if PRUNED \ vocabularies that go
|
||||
dup (Q) a! @ inv + 1 + -if GONE drop jump KEPT
|
||||
GONE: drop 1 + a! @ VOC-LINK a! ! jump V
|
||||
KEPT: P: if PRUNED \ the lists of those that stay
|
||||
dup (PRUNE) 1 + a! @ jump P
|
||||
PRUNED: drop
|
||||
(PRUNE-ALL)
|
||||
CONTEXT a! @ (Q) a! @ inv + 1 + -if C1 drop jump C2
|
||||
C1: drop (LATEST) CONTEXT a! !
|
||||
C2: CURRENT a! @ (Q) a! @ inv + 1 + -if C3 drop jump TOLD
|
||||
@@ -150,7 +157,7 @@ set HDR-NFA here ", WARM #id, #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK her
|
||||
jump ABORT
|
||||
|
||||
\ ( -- ) the system as it was when the capsule had just been loaded:
|
||||
\ everything defined since is gone, there is one vocabulary, numbers are
|
||||
\ everything defined since is gone, the vocabularies are as sealed, numbers are
|
||||
\ decimal, the block buffers are empty. Then as WARM.
|
||||
set HDR-NFA here ", COLD #id, #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK here
|
||||
: COLD
|
||||
@@ -158,7 +165,8 @@ set HDR-NFA here ", COLD #id, #, 0 #, HDR-NFA #, HDR-LINK set HDR-LINK her
|
||||
(BOOT)+1 a! @ (LATEST) a! !
|
||||
(BOOT) a! @ 2/ 2/ (FENCE) a! !
|
||||
(BOOT-ID) a! @ (NEXT-ID) a! !
|
||||
(LATEST) CONTEXT a! ! (LATEST) CURRENT a! ! 0 VOC-LINK a! !
|
||||
(LATEST) CONTEXT a! ! (LATEST) CURRENT a! !
|
||||
(BOOT) a! @ 2/ 2/ (Q) a! ! (PRUNE-ALL) \ the vocabularies as sealed, with what was sealed in them
|
||||
10 BASE a! ! 0 SCR a! ! 2 (LOG-LEVEL) a! ! 0 (ACL-HOOK) a! ! EMPTY-BUFFERS
|
||||
(BOOT) a! @ 2/ 2/ (FORGOTTEN) \ the kernel's records of what has gone go too (dict.f18)
|
||||
$54524F46 (EMIT4) $39372D48 (EMIT4) $6C6F4320 (EMIT4) $74532064 (EMIT4) $747261 (EMIT4) CR
|
||||
|
||||
@@ -6781,3 +6781,69 @@ runs (`logs/20261117-mechanism-a/timing.txt`).
|
||||
- test-32, the proofs, the images and the docs pass.
|
||||
- The docs stage runs longer than one foreground command; it ran in the background at Captain Bob's ruling.
|
||||
|
||||
### 27. starshipos.4th loaded; COLD keeps the vocabularies as sealed (2026-11-18)
|
||||
|
||||
**The audit of Phase 7 Tasks 5–7.** Task 8's 990 already covers their POST modules (ticked, b789d18a).
|
||||
What the record asks beyond POST, each gap put to Captain Bob one at a time:
|
||||
- **`starshipos.4th` loads before POST, after `forth79.4th`** (4137f1b7). MACHINE.md §3 step 3 says so
|
||||
(ruled 2026-10-15). A first answer, "leave it unloaded", was given before that ruling had been shown,
|
||||
and was reverted once it had.
|
||||
- **`init.4th`: designed and held** (`docs/v4.0.0/plans/2026-11-18-v4-init.md`). Captain Bob: "Capsules
|
||||
are ephemeral. We need to talk later." The loaders already keep no capsule's blocks: v4 drops the
|
||||
`Block <n>` number and sends the lines, and v3 copies the blocks from block 1. Only the build tooling
|
||||
(`mkcapsule`'s collision check, `BLOCK_MAP.md`) and the documents still treat ranges as claims.
|
||||
- **Still open:**
|
||||
- the ACL policy is not loaded by the kernel's boot;
|
||||
- `BIRTH` is not pinned;
|
||||
- the countdown "at call";
|
||||
- Artemis's writes.
|
||||
|
||||
**A fault found by checking the logic** (Captain Bob: "make sure we're not applying incorrect logic";
|
||||
295cd518).
|
||||
- **The fault:** `COLD` set `VOC-LINK` to 0, on the assumption that the sealed system has one
|
||||
vocabulary. With `STARSHIPOS` sealed in, a word defined in it and then forgotten, or COLDed away, hung
|
||||
the node.
|
||||
- **The fix:** `FORGET`'s prune is now `(PRUNE-ALL)`, and `COLD` uses it with the sealed `DP`. It adds no
|
||||
cell and no word.
|
||||
- **Test first:** the before-run hung and was stopped at 500 s; after, 109 checks pass.
|
||||
- **The docs gate refused the build** until `STARSHIPOS` had its dictionary entry (573d386b).
|
||||
|
||||
**The protocol on 573d386b** (`logs/20261118-151921/PROTOCOL.md`): **PASS**.
|
||||
- POST is 990/990 on all four boots.
|
||||
- One `dict_hash` on the three ISAs: `0xf4e9fdc94f6bfc77`, `word_count=404`.
|
||||
- `accept-aarch64`, the boot plus its session, now takes longer than one foreground command (401 to
|
||||
429 s, and over 595 s three times in the foreground).
|
||||
- **Ruled:** a long stage runs in the background, but only alone: "as long as there is no other
|
||||
background process running including docs. In fact that might generalize too" (`.claude/memory/rules.md`).
|
||||
|
||||
### 28. Capsule blocks: no claims, placed in RAM, the lowest loaded (2026-11-18)
|
||||
|
||||
**The talk** (Captain Bob): "Capsules are ephemeral." Its rulings, one at a time, are in
|
||||
`docs/v4.0.0/plans/2026-11-18-capsule-blocks.md`:
|
||||
- `Block n` is copied down by R, the RAM block count; the fixed 2048 was "THE BUG".
|
||||
- A later write overwrites: "Deterministic and final", within a capsule too.
|
||||
- Where a block lands, and any chaining, is the developer's responsibility.
|
||||
- The block map is "a convenience", and the range tables go.
|
||||
|
||||
**Built, test first, each step verified:**
|
||||
|
||||
| Step | Commit | What |
|
||||
|---|---|---|
|
||||
| 1 | 6f9900f8 | `BLK_RAM_USER_BLOCKS` is a Kconfig knob (default 2048). The kernel's block layout, `mkcapsule` and `mkartemis` follow it. |
|
||||
| 2 | f30005e1 | `mkcapsule` makes no claims. The collision gate, `capsule-reserved.txt` and the resolver go ("All of it goes"). |
|
||||
| 3 + 4, v4 | 6dcfbe67 | Every v4 loader places a capsule's blocks in RAM at `n - R`, then interprets `<lowest> LOAD`. The v4 capsules are renumbered to land at 1900 and up, and chained with `-->`. |
|
||||
|
||||
**Kept as is:**
|
||||
- v3's `INIT` ("Yeah, keep").
|
||||
- The hosted product, only kept green for the gates that run it: "Nobody cares about hosted anymore".
|
||||
|
||||
**`(-` as a build marker per block:** an open stub, until the SDK.
|
||||
|
||||
**The protocol on 53b1e98e** (`logs/20261118-204012/PROTOCOL.md`): **PASS**.
|
||||
- POST is 990/990 on all four boots.
|
||||
- `dict_hash` is `0x847bd8ef42f53e14` on all three ISAs; it changed with the block path.
|
||||
|
||||
**The line drawn here** (Captain Bob: "I want to make a delineation for new work"; ruled "Merge, then a
|
||||
tag"): PR #197 merges once its Acceptance passes, and a tag on `master` marks the line. New work starts
|
||||
after it.
|
||||
|
||||
|
||||
@@ -336,6 +336,7 @@ VARIABLE ( -- ) VARIABLE xxx: define xxx, which leaves the address of one cell.
|
||||
VERSION ( -- ) Print which system this is, and its cell width.
|
||||
VLIST ( -- ) List the names in the CONTEXT vocabulary (WORDS).
|
||||
VOCABULARY ( -- ) VOCABULARY xxx: define a vocabulary xxx; running it makes it the CONTEXT vocabulary.
|
||||
STARSHIPOS ( -- ) Make STARSHIPOS, the vocabulary of the StarshipOS words (starshipos.4th, loaded before POST), the CONTEXT vocabulary; a search of it that finds nothing searches FORTH.
|
||||
WARM ( -- ) Print the system's message and ABORT: both stacks emptied, the prompt.
|
||||
WHILE ( flag -- ) Compile-only: in BEGIN ... WHILE ... REPEAT, leave the loop if flag is zero.
|
||||
WITHIN ( n low high -- flag ) True if low <= n < high.
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 11 and column 3.
|
@@ -207,9 +207,11 @@ Phase 4).
|
||||
849 pass, 171 fail (`POST-PARITY.md` section 5).
|
||||
- [x] Ruled (2026-11-14): "v3's table, not v3's bugs" -- v3's self-disagreements held to its table, cases
|
||||
naming v3's internals held to their form with v4's values; both listed.
|
||||
- [ ] The 171, by kind: address units (rules); what v4 lacks (`SP@` `SP!` `CASE` `SKIP` `SCAN` `SEARCH`
|
||||
- [x] The 171, by kind: address units (rules); what v4 lacks (`SP@` `SP!` `CASE` `SKIP` `SCAN` `SEARCH`
|
||||
`COMPARE` `ORDER` `THRU` `FLUSH` ...); v3's self-disagreements and v3-internal output (by the ruling);
|
||||
the rest case by case. Then the whole table becomes v4's POST and its floor.: v3's whole POST as v4's; the floor raised
|
||||
**Done 2026-11-14** (`POST-PARITY.md` section 6): 990 cases, all pass on Hera; each case rewritten is
|
||||
listed with its reason in `POST.md`; the floor (`v4/system/POST_FLOOR`) is 990.
|
||||
### Task 9: acceptance -- the full protocol; ENGINE.md, V3-PARITY.md, FABRIC-3
|
||||
|
||||
Each task gets its steps when the one before it is accepted, test first, as Phase 2's did.
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
# Capsules and their blocks -- the talk, and the bug it found
|
||||
|
||||
Written 2026-11-18, from the capsules talk with Captain Bob. It records the rulings as they are given.
|
||||
**Nothing here is built.**
|
||||
|
||||
## 1. The design (Captain Bob)
|
||||
|
||||
- **A capsule is ephemeral.** "Capsules load into their respective block by the header for that
|
||||
block, `Block <n>`. Then relocated into fast ram for execution. Other than the blocks used as
|
||||
actual held data, everything else should be free for reuse."
|
||||
- **`Block <n>`** "loads 1024 bytes from the defined block number and relocated". A page shorter
|
||||
than 1024 bytes is padded; zeroes or spaces, "doesn't matter".
|
||||
- **The order in the file is irrelevant.** His example, as the pages appear in the file:
|
||||
|
||||
```
|
||||
Block 4098 \ stuff
|
||||
Block 4255 \ stuff
|
||||
Block 4096 \ program for stuff
|
||||
Block 5077 \ crappy stuff
|
||||
```
|
||||
|
||||
Each page lands by its own number, then is relocated into the VM's RAM and interpreted there.
|
||||
- **The offset is not a constant** (ruled: "That's THE BUG! #1 needs to determine that from the
|
||||
runtime and build knobs"). Where the VM's RAM ends, and so how far a page moves, comes from the
|
||||
runtime and the build's knobs, never from a fixed 2048.
|
||||
- **The order of interpretation** (ruled): "Start with lowest block loaded. The current block will
|
||||
determine the next block interpreted." The lowest page runs first. What runs next is decided by
|
||||
the page that is running, through `-->`, `LOAD` or `THRU` by number.
|
||||
|
||||
## 2. What the tree does today (read 2026-11-18)
|
||||
|
||||
| Where | What it does | Against the design |
|
||||
|---|---|---|
|
||||
| `tools/mkcapsule.c:414`, `:1094` | Refuses a page below the literal `2048`, "the VM's fast RAM (0..2047)" | The fixed number is the bug (ruled) |
|
||||
| `v3/include/block_subsystem.h:78-88` | `BLK_RAM_BLOCKS` 2080 and `BLK_FORTH_SYS_RESERVED` 32 give 2048 user blocks | The knobs exist, but nothing derives the capsule offset from them |
|
||||
| v3's `INIT` (`v3/src/word_source/starforth_words.c:300-490`) | Renumbers the pages 1, 2, 3 ... in **file order** and runs them | Places by file order, not by number; no offset from the knobs |
|
||||
| v4's loader (`v4/system/mesh.c:102-117`, `load()`) | Drops the number and sends each page's lines to Hera **in file order**; writes no block | The pages are never in blocks, so a capsule cannot `LOAD`, `THRU` or `-->` its own pages; file order is execution order |
|
||||
| `experiments/bare_metal/README.md` rule 3 | "Blocks are loaded in file order and executed top-to-bottom" | Contradicts "order is irrelevant" |
|
||||
| `mkcapsule`'s collision check (`:846-879`), `BLOCK_MAP.md`, the range tables (`experiments/bare_metal/README.md`, `.claude/CLAUDE.md`, `capsules/README.md`) | Treat each page number as a permanent claim across all capsules | Open: see section 3 |
|
||||
|
||||
## 3. Open, one at a time
|
||||
|
||||
1. ~~The `Block <n>` header~~: ruled above.
|
||||
2. ~~The collision check across capsules~~ **Ruled: "Overwrite. That's it. Deterministic and
|
||||
final."** A page written to a block number already in use overwrites it; what was there is gone.
|
||||
Which write wins follows from the load order, which is fixed, so it is deterministic. A shared
|
||||
number is not an error, so `mkcapsule`'s cross-capsule collision check (`:846-879`) goes.
|
||||
3. ~~The knobs~~ **Ruled: the RAM block count.** The offset is the VM's user RAM block count,
|
||||
`BLK_RAM_BLOCKS - BLK_FORTH_SYS_RESERVED` (2048 today, `v3/include/block_subsystem.h:78-88`).
|
||||
- It becomes a Kconfig symbol.
|
||||
- The kernel reads it.
|
||||
- `mkcapsule` is given it at build time in place of its literal 2048 (`:414`, `:1094`).
|
||||
|
||||
v4's node window (`V4_BLOCK_SLOTS`) is not the source of the offset.
|
||||
4. ~~Where the pages land~~ **Ruled: at `n`, then copied down.**
|
||||
- Each page is written to the block store at `n`, then copied to `n - R` for interpreting, where
|
||||
R is the RAM block count (ruling 3).
|
||||
- Block `n` is then free again.
|
||||
- Asked about pages whose `n - R` falls outside the RAM (`Block 4096` lands at 2048 when R is
|
||||
2048), Captain Bob ruled: **"Just copy down the specified blocks. Where they land will be
|
||||
developers responsibility."** The loader does not check where a page lands. The one rule left
|
||||
is that `n` is at least R (`mkcapsule`'s floor, from the knob).
|
||||
5. ~~The range tables and `BLOCK_MAP.md`~~ **Ruled: "Map stays, tables go".**
|
||||
- `BLOCK_MAP.md` stays, generated by `mkcapsule`, as a record of the numbers each capsule uses
|
||||
("Blocks used", not "claimed"). Captain Bob: **"Block map is a convenience"**: an aid for
|
||||
developers, with no authority and nothing checked against it.
|
||||
- The range tables go from `experiments/bare_metal/README.md`, `.claude/CLAUDE.md` and
|
||||
`capsules/README.md`. In their place: `n` is at least R, a later write overwrites, and where a
|
||||
page lands is the developer's responsibility.
|
||||
6. **Chaining.** Under "the lowest block first; the current block determines the next", only a
|
||||
capsule's lowest page runs unless it chains. No capsule in the tree chains its pages today
|
||||
(`forth79.4th` has 3 pages, `centre.4th` 7, v3's `init.4th` 3, none with `-->`, `LOAD` or
|
||||
`THRU`). **Ruled: "No 'chaining' again developer responsible."**
|
||||
- The loader interprets the capsule's lowest page and nothing more.
|
||||
- A capsule that needs its other pages chains them itself (`-->`, `LOAD`, `THRU`).
|
||||
- So each capsule in the tree is given its chaining when the loader changes, or only its lowest
|
||||
page would run.
|
||||
|
||||
## 4. The work, for ruling (nothing built)
|
||||
|
||||
Each step is test first, then POST and the protocol:
|
||||
1. **The knob. Built 2026-11-18:**
|
||||
- `BLK_RAM_USER_BLOCKS` is in `Kconfig.kernel`, default 2048, defined in `v3/include/blk_layout.h`.
|
||||
- `block_subsystem.h` derives `BLK_RAM_BLOCKS` (2080) and `BLK_DISK_START` from it.
|
||||
- `kernel/Makefile` passes it to the kernel's C code, `mkcapsule` and `mkartemis`, and
|
||||
`mkcapsule`'s two literal 2048s are the knob.
|
||||
- Tested by `scripts/test_capsule_ram_blocks.sh`, 8 checks, in `logs/20261118-ram-blocks-knob/`.
|
||||
|
||||
The plan as written: `block_subsystem.h` and the kernel read
|
||||
it, and `mkcapsule` is given it at build time in place of its literal 2048.
|
||||
2. **`mkcapsule`. Built 2026-11-18** (rulings: overwrite within a capsule too, "consistent with
|
||||
VOCABULARY FORGET & FENCE philosophy, not implementation"; of what only prevents collisions, "All of
|
||||
it goes"):
|
||||
- the cross-capsule collision gate is gone;
|
||||
- so are `tools/capsule-reserved.txt` with its check, and the interactive resolver with its claim
|
||||
registry;
|
||||
- the map says "Blocks used", and marks a shared number "the later write overwrites";
|
||||
- an unknown option is refused with the usage, so a removed mode is never taken for the capsules
|
||||
directory.
|
||||
|
||||
A repeat within one capsule had no check to remove. Tested by `scripts/test_mkcapsule_overwrite.sh`,
|
||||
9 checks, in `logs/20261118-mkcapsule-overwrite/`.
|
||||
|
||||
The plan as written:
|
||||
- Its floor comes from the knob.
|
||||
- Its cross-capsule collision check goes, since a later write overwrites.
|
||||
- `BLOCK_MAP.md` says "Blocks used".
|
||||
- Open: whether a number repeated within one capsule is still refused, or overwrites by the same
|
||||
rule.
|
||||
3. **The capsules chain their own pages.** Each multi-page capsule ends each page with `-->`, or has
|
||||
its lowest page `THRU` the rest. That keeps it working under step 4.
|
||||
4. **The loaders,** v4's `load()` and v3's `INIT`:
|
||||
- each page is written to block `n`, then copied down to `n - R`;
|
||||
- the lowest page is interpreted;
|
||||
- nothing else is done.
|
||||
5. **The documents.** The range tables go, and the rules take their place. `experiments/bare_metal/
|
||||
README.md` rule 3 ("file order") goes.
|
||||
|
||||
|
||||
## 5. `(-` marks a system blob (Captain Bob's idea, 2026-11-18; nothing built)
|
||||
|
||||
**The idea, as given:**
|
||||
- `(-` is a special comment word, terminated by `)` like any `(` comment.
|
||||
- It also "leaves behind the equivalent of a magic number".
|
||||
- "The capsule loader can differentiate a 'system capsule' from any other capsule and it can be
|
||||
diverted into 'please include in a kernel rom image'."
|
||||
|
||||
**What exists already:**
|
||||
- **v3:** `(-` is a C word (`v3/src/word_source/starforth_words.c:274`) that skips to the matching
|
||||
`)` and nests. Its own comment says it is "used for marking blocks that should be extracted to
|
||||
init.4th", so v3 already meant it as a marker.
|
||||
- **v4:** the same nesting comment, in `capsules/v4/physics.4th` block 8204.
|
||||
- **POST:** v3's 4 cases for it pass in v4.
|
||||
|
||||
**As Captain Bob put it next, which supersedes the readings below** ("(- is more of a build
|
||||
marker"):
|
||||
- **It is per block.** "this particular block number": a block that opens with `(-` is marked.
|
||||
- **At run time it loads verbatim,** like any block, "because it might be part of ongoing development
|
||||
or a required dependency". `(-` is only the nesting comment there; there is no run-time magic
|
||||
number.
|
||||
- **At build it is a request to CI:** "asking the CI to consider this particular block number be
|
||||
cleared for inclusion in the next iso image that qemu runs with".
|
||||
- **What CI does with the request** (ruled): "Open ended stubs to be hooked into after we begin the
|
||||
SDK later." So the stub is the record of the request, with nothing to act on it until the SDK.
|
||||
|
||||
**Kept:** `(-` nests, as now. v3's 4 POST cases are unchanged.
|
||||
|
||||
**Superseded** (kept as the record of how it was first understood):
|
||||
- the magic number "both" at build and at run;
|
||||
- the reading "per named blob";
|
||||
- the targets (1) a new kernel ROM image and (3) the capsule directory of system blobs only.
|
||||
|
||||
The "kernel ROM image" is now "the next iso image that qemu runs with".
|
||||
|
||||
**Nothing is built.** When the SDK begins, the hook is to be designed against these lines.
|
||||
|
||||
## 6. Steps 3 and 4 for v4, built together (2026-11-18)
|
||||
|
||||
**Why together** (ruled "Together, v4 first"): v4's `-->` is error 14 outside a block load, so
|
||||
capsule chaining added under the old line-streaming loader would have broken every boot.
|
||||
|
||||
**What is built:**
|
||||
- **`v4_blocks_place_capsule`** (`v4/system/blocks.c`, `blocks.h`). Each `Block n` is copied to RAM
|
||||
block `n - R` as 16 lines of 64 characters, padded with spaces, in any file order. A later block of
|
||||
the same number overwrites. The lowest placed is given back, and a block below R is refused.
|
||||
- **Every v4 loader places a capsule, then interprets `<lowest> LOAD`:**
|
||||
- the mesh's `load()` (Hera's boot);
|
||||
- the mesh's capsule reader (`CAPSULE-OPEN`/`(LINES)`, which is how `BIRTH` gives a child
|
||||
`forth79.4th`);
|
||||
- the hosted product's `boot.c`;
|
||||
- `test_host_unit`'s model of the kernel.
|
||||
|
||||
`mkdictionary.py` types the capsules at the hosted prompt, and skips `-->` there.
|
||||
- **The v4 capsules are renumbered into R..2R-1 and chained with `-->`.** They land at RAM 1900 and up,
|
||||
away from POST's blocks 0–5:
|
||||
|
||||
| Capsule | Blocks |
|
||||
|---|---|
|
||||
| `forth79.4th` | 3948–3950 |
|
||||
| `starshipos.4th` | 3956–3957 |
|
||||
| `hera.4th` | 3960–3961 |
|
||||
| `centre.4th` | 3964–3970 (it had a gap at 8103) |
|
||||
| `physics.4th` | 3972–3976 |
|
||||
|
||||
**Test first:**
|
||||
- `test_host_blocks.c` gained 6 placement checks (54 now). It failed to build before, with no
|
||||
`v4_blocks_place_capsule`.
|
||||
- `test_mesh_boot.c`: forth79.4th's lowest block is in RAM block 1900. It failed before, with block
|
||||
1900 empty, and passes after (110 checks).
|
||||
|
||||
**Verified** (`logs/20261118-capsule-place/`):
|
||||
- POST is 990/990;
|
||||
- all 52 tests at 64 bits, test-32, `hosted-check` (three ISAs identical), and ASan/UBSan pass;
|
||||
- the amd64 kernel builds;
|
||||
- the dictionary check has 404 words, as before.
|
||||
|
||||
**v3's `INIT`** is the next step, as ruled.
|
||||
|
||||
**v3's `INIT` is kept as it is** (Captain Bob, 2026-11-18: "Yeah, keep"). v3 is not part of acceptance
|
||||
and is being retired. Its loader still renumbers a capsule's blocks from 1, in file order, and runs
|
||||
them all. The v3 capsules are not chained.
|
||||
@@ -0,0 +1,90 @@
|
||||
# v4's `init.4th` -- design, for ruling
|
||||
|
||||
Written 2026-11-18. Captain Bob ruled: "Write v4's init.4th". That was after the audit of Phase 7
|
||||
Tasks 5–7 found that v4 has no `init.4th`.
|
||||
|
||||
**Nothing here is built.** Each point in section 5 is put to Captain Bob one at a time.
|
||||
|
||||
## 1. What the record asks
|
||||
|
||||
- **MACHINE.md §3, step 5:** "`init.4th`, the system's init (section 7, item 6). From here the boot
|
||||
is `init.4th` only. No boot policy is written in C."
|
||||
- **MACHINE.md §1.1:** "the system's init, `init.4th`, brings it up:
|
||||
- it turns on security;
|
||||
- it starts the system a module at a time and a node at a time;
|
||||
- whoever is logged in gets a prompt: Zuse, `rajames`, `00` to `09`, or whoever it is."
|
||||
- **MACHINE.md §5:** "Everything after POST is `init.4th`'s."
|
||||
- **Ruled 2026-11-18:** `init.4th` sets the search order, starting in STARSHIPOS, then FORTH. `COLD`
|
||||
stays as FORTH-79's, with one vocabulary.
|
||||
|
||||
## 2. What the boot does now (`v4/system/mesh.c`, `kernel/src/v4/sk_v4.c`)
|
||||
|
||||
1. The ROM assembles the nucleus on Hera.
|
||||
2. The kernel words are made.
|
||||
3. The capsules are loaded:
|
||||
- `forth79.4th`;
|
||||
- the kernel's list in C (`sk_v4.c:165`): `starshipos.4th`, `centre.4th`, `hera.4th`,
|
||||
`physics.4th`.
|
||||
4. Seal, then POST (990 cases), then `COLD`.
|
||||
5. The kernel's C code runs:
|
||||
- the identity gate: no identity drive means headless, and Zuse's drive gives a console
|
||||
(`sk_v4_identity.c`);
|
||||
- the prompt, `[zuse@Hera] ok>`.
|
||||
|
||||
**Security is never turned on in the kernel's boot.** The policy, `v4/capsule/ACL.fth` (v3's
|
||||
`ACL.4th` as FORTH source), is loaded only by a host test (`test_host_quit.c:1637`). It is not in
|
||||
the kernel's capsule directory, which is built from `capsules/` only.
|
||||
|
||||
## 3. The design
|
||||
|
||||
**`capsules/v4/init.4th`**, a capsule like the others:
|
||||
- It is in the kernel's directory, and `mkcapsule` checks, hashes and signs it.
|
||||
- Its blocks are 8300 up, following physics.4th's 8200 range. The range is open for ruling.
|
||||
|
||||
**The loader runs it last.** It is loaded by name after `COLD`, on Hera, through the same loader as
|
||||
the system capsules. It is the only boot policy, so the loader's one fixed step after POST is "load
|
||||
`v4:init.4th`". The list before POST stays the loader's (MACHINE.md §5).
|
||||
|
||||
**What it does, in order, each step its own task, test first:**
|
||||
1. **The search order:** `STARSHIPOS` first, then FORTH (ruled).
|
||||
2. **Security on:**
|
||||
- it loads the ACL policy, `ACL.fth` brought into `capsules/v4/` as a capsule;
|
||||
- `ACL-BOOT` runs;
|
||||
- `BIRTH` is pinned as the parent plan's Phase 4 asks (`CAPSULE-BIRTH` has no v4 counterpart:
|
||||
to be ruled).
|
||||
3. **The system a module and a node at a time:** births through Hera (`centre.4th`'s `BIRTH`).
|
||||
Which nodes, and in what order, is for ruling. Today the kernel births none at boot.
|
||||
4. **The prompt for whoever is logged in.** Today the identity gate and the prompt are the kernel's
|
||||
C code. Moving them into `init.4th` is the largest step, and comes last.
|
||||
|
||||
## 4. How each step is verified (named before it is built)
|
||||
|
||||
- `test_mesh_boot.c` checks each step on the host, seen to fail first:
|
||||
- for step 1, `S" ok" DOE` works at the prompt without naming `STARSHIPOS`;
|
||||
- for step 2, a strict word refuses as `test_host_quit.c`'s ACL cases do.
|
||||
- POST stays at 990/990 on all three ISAs. POST runs before `init.4th`, so it is unchanged.
|
||||
- The protocol runs on a clean tree. `dict_hash` changes with each step's words, and the new value is
|
||||
recorded each time.
|
||||
|
||||
## 5. For ruling, one at a time
|
||||
|
||||
1. Start with step 1 only (the search order), built and accepted, then step 2?
|
||||
2. `init.4th`'s blocks: 8300 up?
|
||||
3. `ACL.fth` into `capsules/v4/` as a capsule loaded by `init.4th`, or does `init.4th` carry the policy
|
||||
itself?
|
||||
4. `CAPSULE-BIRTH`: v4 has no such word. Is it pinned once it exists, or dropped?
|
||||
5. Which nodes `init.4th` births at boot, and in what order.
|
||||
6. Step 4: when the identity gate and the prompt move from C into `init.4th`.
|
||||
|
||||
## 6. Rulings so far (2026-11-18)
|
||||
|
||||
1. **Step 1 first** (the search order), each step accepted before the next.
|
||||
2. **Held.** Asked where `init.4th`'s blocks go, Captain Bob answered: "It shouldn't matter. Capsules
|
||||
should not occupy fixed ranges." Then: "Capsules are ephemeral. We need to talk later." This runs
|
||||
against the tree as it is:
|
||||
- every capsule's `Block NNNN` headers;
|
||||
- `mkcapsule`'s check of them;
|
||||
- the ranges in `BLOCK_MAP.md` and `experiments/bare_metal/README.md`.
|
||||
|
||||
It may also change what `init.4th` is: a capsule, or not. **Nothing of this design is built until
|
||||
that conversation.**
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user