Migrate Hera->Artemis storage-attach to a real message round-trip
Build / build-aarch64-iso (push) Waiting to run
Build / build-amd64-iso (push) Waiting to run
Build / build-riscv64-img (push) Waiting to run

Hera still polls xHCI and sig-checks attached drives, but the storage
registration step (blk_subsys_attach_device(), now wrapped as the
BLK-ATTACH primitive) moves to Artemis's own dictionary, reached via
HERA-BLK-ATTACH-REQ/BLK-ATTACH-ACK (VM-EXEC, since Hera can't load her
own messaging.4th -- see the doc comment in repl.c). Identity birth
(Zuse genesis / WIREBIND) is deferred until the ack confirms storage
actually succeeded, instead of running synchronously underneath a
storage call that might fail ("wait for ack, safer for identity data").

Caught and fixed a real bug live during acceptance testing: Artemis's
ACK-APPEND-NUM fed a single-cell value into <# #S #> (which expects a
double-cell pair), causing a stack underflow the first time
HERA-BLK-ATTACH-REQ ran. Fixed with the same `0 SWAP` convention every
other numeric-append helper in this codebase already uses.

Verified booting clean to (zuse) ok> with no VM-EXEC errors on all
three architectures (amd64/aarch64/riscv64).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Ec88YKxxhZGG1RNnune78
This commit is contained in:
Robert Allan James
2026-09-07 21:22:04 -04:00
co-authored by Claude Sonnet 5
parent c4f94c409f
commit 63b8b3bc29
25 changed files with 149357 additions and 125 deletions
+94 -90
View File
@@ -1,5 +1,5 @@
# Capsule Block Manifest — Auto-generated # Capsule Block Manifest — Auto-generated
<!-- Generated by mkcapsule --manifest 2026-09-07T19:31:34Z --> <!-- Generated by mkcapsule --manifest 2026-09-08T01:19:50Z -->
<!-- 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. -->
@@ -10,9 +10,9 @@
|---------|----------------|----------|--------| |---------|----------------|----------|--------|
| `ACL.4th` | 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4015 | `0xd781d22148ff171d` | yes | | `ACL.4th` | 4000, 4001, 4002, 4003, 4004, 4005, 4006, 4007, 4015 | `0xd781d22148ff171d` | 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 | `0x5a622e41d1fd0bb9` | 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 | `0x5a622e41d1fd0bb9` | 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 | `0x1bb1886fc961c152` | 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, 4857, 4858 | `0xac215ecb873c4db3` | yes |
| `block-acl.4th` | 4019, 4020 | `0xf6cc2a59e3a6734e` | yes | | `block-acl.4th` | 4019, 4020 | `0xf6cc2a59e3a6734e` | yes |
| `common:messaging.4th` | 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 5039, 5040 | `0x9cb26fa2d67465db` | yes | | `common:messaging.4th` | 5003, 5004, 5005, 5006, 5007, 5008, 5009, 5010, 5011, 5012, 5013, 5014, 5015, 5016, 5017, 5018, 5019, 5020, 5021, 5022, 5023, 5024, 5025, 5026, 5027, 5028, 5029, 5030, 5031, 5032, 5033, 5034, 5035, 5036, 5037, 5038, 5039, 5040, 5041 | `0x5cfb02a42f4a8323` | yes |
| `common:msg.4th` | 4055 | `0x850a0382344ea6c4` | yes | | `common:msg.4th` | 4055 | `0x850a0382344ea6c4` | yes |
| `doe-campaign.4th` | 4060, 4061, 4062, 4063, 4064, 4065 | `0x3d4549142d91ec20` | yes | | `doe-campaign.4th` | 4060, 4061, 4062, 4063, 4064, 4065 | `0x3d4549142d91ec20` | yes |
| `doe.4th` | 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107 | `0xf154616d248e861f` | yes | | `doe.4th` | 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107 | `0xf154616d248e861f` | yes |
@@ -147,52 +147,52 @@
| 4063 | `doe-campaign.4th` | `0x3d4549142d91ec20` | ok | | 4063 | `doe-campaign.4th` | `0x3d4549142d91ec20` | ok |
| 4064 | `doe-campaign.4th` | `0x3d4549142d91ec20` | ok | | 4064 | `doe-campaign.4th` | `0x3d4549142d91ec20` | ok |
| 4065 | `doe-campaign.4th` | `0x3d4549142d91ec20` | ok | | 4065 | `doe-campaign.4th` | `0x3d4549142d91ec20` | ok |
| 4110 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4110 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4111 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4111 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4112 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4112 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4113 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4113 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4122 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4122 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4123 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4123 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4124 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4124 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4125 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4125 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4126 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4126 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4127 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4127 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4128 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4128 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4129 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4129 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4130 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4130 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4131 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4131 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4132 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4132 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4133 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4133 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4134 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4134 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4135 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4135 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4136 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4136 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4137 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4137 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4138 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4138 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4139 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4139 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4140 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4140 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4141 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4141 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4153 | `hermes:init.4th` | `0x2df61924448a6812` | ok | | 4153 | `hermes:init.4th` | `0x2df61924448a6812` | ok |
| 4160 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4160 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4161 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4161 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4162 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4162 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4163 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4163 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4164 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4164 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4165 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4165 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4166 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4166 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4167 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4167 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4168 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4168 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4169 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4169 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4170 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4170 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4171 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4171 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4172 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4172 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4173 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4173 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4174 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4174 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4177 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4177 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4178 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4178 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4179 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4179 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4180 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4180 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4181 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4181 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4182 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4182 | `artemis:init.4th` | `0xac215ecb873c4db3` | 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 |
@@ -232,11 +232,14 @@
| 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` | `0x1bb1886fc961c152` | ok | | 4851 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4852 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4852 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4853 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4853 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4854 | `artemis:init.4th` | `0x1bb1886fc961c152` | ok | | 4854 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4855 | `hermes:init.4th` | `0x2df61924448a6812` | ok | | 4855 | `hermes:init.4th` | `0x2df61924448a6812` | ok |
| 4856 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4857 | `artemis:init.4th` | `0xac215ecb873c4db3` | ok |
| 4858 | `artemis:init.4th` | `0xac215ecb873c4db3` | 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 |
@@ -326,44 +329,45 @@
| 5000 | `fabric.4th` | `0x9d9489cbeca4099b` | ok | | 5000 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
| 5001 | `fabric.4th` | `0x9d9489cbeca4099b` | ok | | 5001 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
| 5002 | `fabric.4th` | `0x9d9489cbeca4099b` | ok | | 5002 | `fabric.4th` | `0x9d9489cbeca4099b` | ok |
| 5003 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5003 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5004 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5004 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5005 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5005 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5006 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5006 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5007 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5007 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5008 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5008 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5009 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5009 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5010 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5010 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5011 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5011 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5012 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5012 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5013 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5013 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5014 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5014 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5015 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5015 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5016 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5016 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5017 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5017 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5018 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5018 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5019 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5019 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5020 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5020 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5021 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5021 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5022 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5022 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5023 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5023 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5024 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5024 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5025 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5025 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5026 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5026 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5027 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5027 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5028 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5028 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5029 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5029 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5030 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5030 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5031 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5031 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5032 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5032 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5033 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5033 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5034 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5034 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5035 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5035 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5036 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5036 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5037 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5037 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5038 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5038 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5039 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5039 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5040 | `common:messaging.4th` | `0x9cb26fa2d67465db` | ok | | 5040 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5041 | `common:messaging.4th` | `0x5cfb02a42f4a8323` | ok |
| 5100 | `turtle.4th` | `0x4d470418ca543365` | ok | | 5100 | `turtle.4th` | `0x4d470418ca543365` | ok |
| 5101 | `turtle.4th` | `0x4d470418ca543365` | ok | | 5101 | `turtle.4th` | `0x4d470418ca543365` | ok |
| 5102 | `turtle.4th` | `0x4d470418ca543365` | ok | | 5102 | `turtle.4th` | `0x4d470418ca543365` | ok |
+37
View File
@@ -500,3 +500,40 @@ MSG-CD-INIT
2 MY-CH-ID ! 2 MY-CH-ID !
S" 2 COMMON-CH @ CH-ADD-MBR" S" Hermes" VM-EXEC S" 2 COMMON-CH @ CH-ADD-MBR" S" Hermes" VM-EXEC
STARTUP-BANNER STARTUP-BANNER
Block 4856
( Storage-attach ack builder. Hera sends "<dev-addr> )
( HERA-BLK-ATTACH-REQ"; reply is "<dev-addr> <ok?> )
( BLK-ATTACH-ACK" so identity birth only proceeds once )
( storage is confirmed (repl.c's BLK-ATTACH-ACK). Bob, )
( 2026-09-07. )
CREATE ATTACH-ACK-BUF 64 ALLOT
VARIABLE ATTACH-ACK-LEN
: ACK-APPEND ( src-addr len -- )
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 (real ACL gating, same as any )
( other message payload), then replies to Hera (idx 0). )
: HERA-BLK-ATTACH-REQ ( dev-addr -- )
0 ATTACH-ACK-LEN !
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
BLK-ATTACH-EVENT 2 0 ATTACH-ACK-BUF
ATTACH-ACK-LEN @ 0 MSG-SEND ;
+11
View File
@@ -23,6 +23,17 @@ Block 5038
( carried to Zuse via CH-REQUEST. See SEND-ELEVATE- ) ( carried to Zuse via CH-REQUEST. See SEND-ELEVATE- )
( REQUEST/ELEVATE-GRANT below and in zuse-eligibility.4th. ) ( REQUEST/ELEVATE-GRANT below and in zuse-eligibility.4th. )
8 CONSTANT ELEVATE-REQUEST 8 CONSTANT ELEVATE-REQUEST
Block 5041
( BLK-ATTACH-EVENT: Hera -> Artemis storage-attach request, )
( and Artemis -> Hera ack. Payload is FORTH text, executed )
( by the receiver, same as every other message here -- see )
( HERA-BLK-ATTACH-REQ (artemis:init.4th) and BLK-ATTACH-ACK )
( (repl.c). Messaging-migration decision, Bob, 2026-09-07: )
( Hera keeps polling/sig-checking; the storage-registration )
( step (blk_subsys_attach_device) moves to a real message )
( instead of a direct C call, so identity birth only )
( proceeds once Artemis confirms storage succeeded. )
9 CONSTANT BLK-ATTACH-EVENT
Block 5004 Block 5004
( StadiumBehaviour tags, match stadium.h's enum ) ( StadiumBehaviour tags, match stadium.h's enum )
0 CONSTANT SB-MIGRATE 0 CONSTANT SB-MIGRATE
BIN
View File
Binary file not shown.
+9
View File
@@ -89,6 +89,15 @@ const homeblocks_sig_t *sk_repl_get_homeblocks_sig(void);
*/ */
struct blkio_dev *sk_repl_get_attached_blk_dev(void); struct blkio_dev *sk_repl_get_attached_blk_dev(void);
/**
* sk_repl_register_words - Registers repl.c's own FORTH-visible words
* (currently just BLK-ATTACH-ACK, Artemis's storage-attach reply target --
* see sk_word_blk_attach_ack()'s doc comment in repl.c). Call once from
* register_forth79_words() alongside the other __STARKERNEL__-only
* registration calls.
*/
void sk_repl_register_words(VM *vm);
/** /**
* sk_console_getkey - Real body of the standard dictionary's KEY word * sk_console_getkey - Real body of the standard dictionary's KEY word
* (called from shim.c's getchar()). Blocks until a key is available from * (called from shim.c's getchar()). Blocks until a key is available from
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,2 @@
UEFI firmware (version 2025.11-3ubuntu7 built at 11:11:58 on Mar 31 2026)
[=3h
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+126 -34
View File
@@ -47,6 +47,7 @@
#include "block_subsystem.h" #include "block_subsystem.h"
#include "word_source/include/keyboard_words.h" #include "word_source/include/keyboard_words.h"
#include "word_source/include/block_words.h" #include "word_source/include/block_words.h"
#include "word_registry.h"
#include "freestanding/stdio.h" #include "freestanding/stdio.h"
#include <stdint.h> #include <stdint.h>
#include <string.h> #include <string.h>
@@ -153,6 +154,87 @@ blkio_dev_t *sk_repl_get_attached_blk_dev(void) {
return g_attached_blk_dev; return g_attached_blk_dev;
} }
/* Storage-attach messaging migration (Bob, 2026-09-07): Hera keeps
* polling/sig-checking, but no longer registers a newly-attached drive
* into the block subsystem herself -- that's Artemis's own domain now,
* reached via a real message (HERA-BLK-ATTACH-REQ, artemis:init.4th)
* instead of a direct blk_subsys_attach_device() call. Hera cannot use
* her own MSG-SEND for the outbound leg (kernel_main.c's own comment,
* ~line 784: loading common:messaging.4th into her dictionary was
* already tried and confirmed to silently drop every colon-definition
* touching a STADIUM-* primitive) -- she uses VM-EXEC directly instead,
* the same mechanism she already pumps MSG-TICK through. The reply
* leg needs no such workaround: Artemis's own MSG-TICK delivers her
* ack via VM-EXEC into Hera, which only requires BLK-ATTACH-ACK below
* to exist as an ordinary word here -- not a full messaging vocabulary.
*
* usb_blk_dev_slots/usb_blk_dev_slot_count were function-local statics
* inside sk_repl_idle() until now -- promoted to file scope so
* sk_word_blk_attach_ack() below (a real dictionary word, called from a
* completely different call stack than the idle loop) can resolve an
* incoming ack's raw pointer back to the slot it belongs to. */
static blkio_dev_t *g_usb_blk_dev_slots = (void *)0;
static uint32_t g_usb_blk_dev_slot_count = 0;
/* One pending entry per slot, indexed the same way msc_slots[]/
* usb_blk_dev_slots[] already are (index 0 unused, matches precedent).
* Holds the sig-check result from the moment the storage-attach request
* was sent, so the deferred Zuse/WIREBIND birth calls -- which need that
* result -- can run once Artemis's ack confirms storage succeeded,
* without re-reading the drive a second time. */
typedef struct {
int pending;
homeblocks_sig_result_t sig_rc;
homeblocks_sig_t sig;
} sk_blk_attach_pending_t;
static sk_blk_attach_pending_t *g_blk_attach_pending = (void *)0;
/* BLK-ATTACH-ACK ( dev-addr ok? -- ): VM-EXEC'd into Hera by Artemis's
* own MSG-TICK once HERA-BLK-ATTACH-REQ's BLK-ATTACH call resolves.
* Finds which slot the raw pointer belongs to, and -- only on success --
* runs the same Zuse/WIREBIND attach logic sk_repl_idle() used to run
* immediately and synchronously, now deferred until storage is
* confirmed ("wait for ack, safer for identity data" -- Bob, 2026-09-07).
* On failure, logs the same error sk_repl_idle() already logged for a
* failed blk_subsys_attach_device() call, and simply never births
* anything for this attach. */
static void sk_word_blk_attach_ack(VM *vm) {
if (vm->dsp < 1) { vm->error = 1; return; }
cell_t ok_flag = vm_pop(vm);
cell_t dev_addr = vm_pop(vm);
blkio_dev_t *dev = (blkio_dev_t *)(uintptr_t)dev_addr;
if (!g_usb_blk_dev_slots || !g_blk_attach_pending) return;
uint32_t found_slot = 0;
for (uint32_t i = 1; i < g_usb_blk_dev_slot_count; i++) {
if (&g_usb_blk_dev_slots[i] == dev) { found_slot = i; break; }
}
if (found_slot == 0 || !g_blk_attach_pending[found_slot].pending) return;
g_blk_attach_pending[found_slot].pending = 0;
if (!ok_flag) {
log_message(LOG_ERROR, "xhci: USB MSC block-subsystem attach failed");
return;
}
xhci_dev_t *xdev = xhci_get_dev();
xhci_msc_slot_t *ms = xdev ? xhci_msc_slot_for(xdev, found_slot) : (void *)0;
if (ms) ms->bot_msc_attached = 1;
g_attached_blk_dev = dev;
homeblocks_sig_result_t sig_rc = g_blk_attach_pending[found_slot].sig_rc;
homeblocks_sig_t sig = g_blk_attach_pending[found_slot].sig;
capsule_zuse_boot_try_attach(dev, sig_rc, &sig, (VM *)sk_get_mama_vm());
if (sig_rc == HOMEBLOCKS_SIG_OK) {
capsule_wirebind_try_attach(dev, &sig, (VM *)sk_get_mama_vm());
}
}
void sk_repl_register_words(VM *vm) {
register_word(vm, "BLK-ATTACH-ACK", sk_word_blk_attach_ack);
}
/*=========================================================================== /*===========================================================================
* Idle heartbeat service * Idle heartbeat service
* *
@@ -261,22 +343,24 @@ static void sk_repl_idle(VM *active_vm)
* serviced this tick, not just one -- a single `if` here used to mean * serviced this tick, not just one -- a single `if` here used to mean
* a second device's pending flag would sit unnoticed until the first's * a second device's pending flag would sit unnoticed until the first's
* flag was consumed and cleared. */ * flag was consumed and cleared. */
static blkio_dev_t *usb_blk_dev_slots = (void *)0; if (xdev && (!g_usb_blk_dev_slots || g_usb_blk_dev_slot_count < xdev->max_slots + 1)) {
static uint32_t usb_blk_dev_slot_count = 0;
if (xdev && (!usb_blk_dev_slots || usb_blk_dev_slot_count < xdev->max_slots + 1)) {
size_t bytes = (size_t)(xdev->max_slots + 1) * sizeof(blkio_dev_t); size_t bytes = (size_t)(xdev->max_slots + 1) * sizeof(blkio_dev_t);
blkio_dev_t *fresh = (blkio_dev_t *)kmalloc_aligned(bytes, 64); blkio_dev_t *fresh = (blkio_dev_t *)kmalloc_aligned(bytes, 64);
if (fresh) { size_t pending_bytes = (size_t)(xdev->max_slots + 1) * sizeof(sk_blk_attach_pending_t);
sk_blk_attach_pending_t *fresh_pending = (sk_blk_attach_pending_t *)kmalloc_aligned(pending_bytes, 64);
if (fresh && fresh_pending) {
memset(fresh, 0, bytes); memset(fresh, 0, bytes);
usb_blk_dev_slots = fresh; memset(fresh_pending, 0, pending_bytes);
usb_blk_dev_slot_count = xdev->max_slots + 1; g_usb_blk_dev_slots = fresh;
g_usb_blk_dev_slot_count = xdev->max_slots + 1;
g_blk_attach_pending = fresh_pending;
} }
} }
for (uint32_t slot_id = 1; xdev && usb_blk_dev_slots && slot_id <= xdev->max_slots; slot_id++) { for (uint32_t slot_id = 1; xdev && g_usb_blk_dev_slots && slot_id <= xdev->max_slots; slot_id++) {
xhci_msc_slot_t *ms = xhci_msc_slot_for(xdev, slot_id); xhci_msc_slot_t *ms = xhci_msc_slot_for(xdev, slot_id);
if (!ms || !ms->bot_msc_attach_pending) continue; if (!ms || !ms->bot_msc_attach_pending) continue;
ms->bot_msc_attach_pending = 0; ms->bot_msc_attach_pending = 0;
blkio_dev_t *usb_blk_dev = &usb_blk_dev_slots[slot_id]; blkio_dev_t *usb_blk_dev = &g_usb_blk_dev_slots[slot_id];
int rc = blkio_usb_open_msc(usb_blk_dev, xdev, slot_id); int rc = blkio_usb_open_msc(usb_blk_dev, xdev, slot_id);
if (rc == 0) { if (rc == 0) {
@@ -330,33 +414,41 @@ static void sk_repl_idle(VM *active_vm)
break; break;
} }
/* FABRIC-2.md §F.20/§F.21: Zuse is thumbdrive-resident now, /* FABRIC-2.md §F.20/§F.21 / §F.5/§F.23 (WIREBIND): Zuse
* not system-resident -- this is the only point in the boot * genesis-mint/attach-authenticate and regular-identity
* lifecycle a just-attached drive's sig result is known, so * verify-then-birth-then-pair both used to run synchronously,
* genesis-mint/attach-authenticate has to happen from here, * right here, before storage was even registered. Moved
* not as a one-shot kernel_main.c step (a thumbdrive can't * (Bob, 2026-09-07, "wait for ack, safer for identity data")
* be detected before the REPL's own idle polling exists to * to sk_word_blk_attach_ack() above, run only once Artemis
* detect it). No-ops immediately if Zuse already has a real * confirms the storage-attach succeeded -- identity birth
* identity this boot. */ * no longer happens on top of storage that might not have
capsule_zuse_boot_try_attach(usb_blk_dev, sig_rc, &sig, (VM *)sk_get_mama_vm()); * registered. Stash what that deferred call needs. */
if (g_blk_attach_pending) {
g_blk_attach_pending[slot_id].pending = 1;
g_blk_attach_pending[slot_id].sig_rc = sig_rc;
g_blk_attach_pending[slot_id].sig = sig;
}
/* FABRIC-2.md §F.5/§F.23 (WIREBIND): the real thumbdrive- /* Storage-attach registration (blk_subsys_attach_device(),
* attach call site for a regular (non-Zuse) identity -- * BLK-ATTACH C primitive) is Artemis's own domain now, not
* verify-then-birth-then-pair, replacing the RUNCAP-TEST/ * Hera's -- she keeps polling/sig-checking but no longer
* PAIR-TEST diagnostic words that exercised each piece by * performs this step herself. Hera can't use her own
* hand. Only meaningful for a drive that actually checked * MSG-SEND (see g_usb_blk_dev_slots's own doc comment
* out (HOMEBLOCKS_SIG_OK); capsule_wirebind_try_attach() * above for why), so this is a direct VM-EXEC into
* itself no-ops for a genesis-mode Zuse drive (no cert * Artemis's dictionary -- the same mechanism the MSG-TICK
* region) or before Zuse has authenticated this boot. */ * pump below already uses -- rather than a real enqueued
if (sig_rc == HOMEBLOCKS_SIG_OK) { * message. HERA-BLK-ATTACH-REQ (capsules/artemis/init.4th)
capsule_wirebind_try_attach(usb_blk_dev, &sig, (VM *)sk_get_mama_vm()); * runs BLK-ATTACH then replies via her own real MSG-SEND,
* delivered back to Hera by the ordinary MSG-TICK pump. */
{
char cmd[96];
int n = snprintf(cmd, sizeof(cmd),
"S\" %llu HERA-BLK-ATTACH-REQ\" S\" Artemis\" VM-EXEC",
(unsigned long long)(uintptr_t)usb_blk_dev);
if (n > 0 && (size_t)n < sizeof(cmd)) {
vm_interpret((VM *)sk_get_mama_vm(), cmd);
} }
} }
if (rc == 0 && blk_subsys_attach_device(usb_blk_dev) == BLK_OK) {
ms->bot_msc_attached = 1;
g_attached_blk_dev = usb_blk_dev;
} else {
log_message(LOG_ERROR, "xhci: USB MSC block-subsystem attach failed");
} }
} }
@@ -369,11 +461,11 @@ static void sk_repl_idle(VM *active_vm)
* block_subsystem.c (see bot_msc_detach_pending's own doc comment). * block_subsystem.c (see bot_msc_detach_pending's own doc comment).
* Per-slot loop now (FABRIC-3.md §VII, 2026-09-05), same reasoning as * Per-slot loop now (FABRIC-3.md §VII, 2026-09-05), same reasoning as
* the attach loop above. */ * the attach loop above. */
for (uint32_t slot_id = 1; xdev && usb_blk_dev_slots && slot_id <= xdev->max_slots; slot_id++) { for (uint32_t slot_id = 1; xdev && g_usb_blk_dev_slots && slot_id <= xdev->max_slots; slot_id++) {
xhci_msc_slot_t *ms = xhci_msc_slot_for(xdev, slot_id); xhci_msc_slot_t *ms = xhci_msc_slot_for(xdev, slot_id);
if (!ms || !ms->bot_msc_detach_pending) continue; if (!ms || !ms->bot_msc_detach_pending) continue;
ms->bot_msc_detach_pending = 0; ms->bot_msc_detach_pending = 0;
blkio_dev_t *usb_blk_dev = &usb_blk_dev_slots[slot_id]; blkio_dev_t *usb_blk_dev = &g_usb_blk_dev_slots[slot_id];
blk_subsys_detach_device(usb_blk_dev); blk_subsys_detach_device(usb_blk_dev);
if (g_homeblocks_dev == usb_blk_dev) { if (g_homeblocks_dev == usb_blk_dev) {
+2
View File
@@ -79,6 +79,7 @@
#include "word_source/include/scroll_words.h" #include "word_source/include/scroll_words.h"
#ifdef __STARKERNEL__ #ifdef __STARKERNEL__
#include "starkernel/doe_log.h" #include "starkernel/doe_log.h"
#include "starkernel/repl.h"
#endif #endif
/** /**
@@ -141,6 +142,7 @@ void register_forth79_words(VM *vm) {
register_scroll_words(vm); /* Module 31: REPL scrollback (FABRIC-0.md 4.4q) */ register_scroll_words(vm); /* Module 31: REPL scrollback (FABRIC-0.md 4.4q) */
#ifdef __STARKERNEL__ #ifdef __STARKERNEL__
register_doe_log_words(vm); /* Module 32: DoE instrumentation runtime toggle (HB-ON/HB-OFF) */ register_doe_log_words(vm); /* Module 32: DoE instrumentation runtime toggle (HB-ON/HB-OFF) */
sk_repl_register_words(vm); /* Module 33: BLK-ATTACH-ACK, Artemis's storage-attach reply target */
#endif #endif
log_message(LOG_INFO, "FORTH-79 Standard word set registration complete"); log_message(LOG_INFO, "FORTH-79 Standard word set registration complete");
+23
View File
@@ -613,6 +613,28 @@ static void block_word_owner_fetch(VM *vm) {
vm_push(vm, packed); vm_push(vm, packed);
} }
/* BLK-ATTACH ( dev-addr -- ok? ) : registers an already-open blkio_dev_t
* (its raw C pointer, passed as a cell -- the same "embed a pointer as a
* number in generated FORTH text" pattern VM-EXEC/the console relay
* already use) into the block subsystem's unified LBN address space via
* blk_subsys_attach_device(). This is the storage/persistence half of a
* USB drive attach -- Artemis's own domain -- split out from repl.c's
* attach loop so it can run as a message target (capsules/artemis/
* init.4th's HERA-BLK-ATTACH-REQ) instead of a direct C call, per Captain
* Bob's 2026-09-07 messaging-migration decision: Hera keeps polling and
* sig-checking, but no longer performs this step herself. dev-addr is
* trusted as a valid blkio_dev_t* from a live attach in progress -- there
* is no way to validate an arbitrary pointer from FORTH space, matching
* every other raw-pointer word this driver already exposes (e.g.
* dictionary_manipulation_words.c's >LINK/LINK>/CFA). */
static void block_word_blk_attach(VM *vm) {
if (vm->dsp < 0) { vm->error = 1; return; }
cell_t dev_addr = vm_pop(vm);
struct blkio_dev *dev = (struct blkio_dev *)(uintptr_t)dev_addr;
int rc = blk_subsys_attach_device(dev);
vm_push(vm, (rc == BLK_OK) ? 1 : 0);
}
/* --- Registration ----------------------------------------------------- */ /* --- Registration ----------------------------------------------------- */
/* /*
@@ -638,4 +660,5 @@ void register_block_words(VM *vm) {
register_word(vm, "BLK-ACL-TTL@", block_word_acl_ttl_fetch); register_word(vm, "BLK-ACL-TTL@", block_word_acl_ttl_fetch);
register_word(vm, "BLK-ACL-TTL!", block_word_acl_ttl_store); register_word(vm, "BLK-ACL-TTL!", block_word_acl_ttl_store);
register_word(vm, "BLK-OWNER@", block_word_owner_fetch); register_word(vm, "BLK-OWNER@", block_word_owner_fetch);
register_word(vm, "BLK-ATTACH", block_word_blk_attach);
} }