feat(kernel): sk_v4_mint_zuse -- the real Zuse minted onto a second stick, read back before the marker names her (#92, 4.5) [skip ci]

Asks for a stick, shows its size, writes nothing until YES; then gpt_write_one, the partition's first devblocks zeroed, a fresh Zuse minted, read back, and only then the marker's real key. Any failure before the marker: 'failed -- nothing changed'. The gate remembers the last stick it turned away as a spare, offered first by the next mint. Builds on three ISAs; not yet called.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
This commit is contained in:
Claude
2026-11-08 18:14:54 +00:00
parent cfa60fd0ec
commit 8b83e0a72d
6 changed files with 206 additions and 4 deletions
@@ -9,6 +9,7 @@
#include "uefi.h" /* BootDisk */
#include "blkio.h"
#include "starkernel/v4/sk_v4_marker.h"
/* After POST and the block chain: every xHCI controller brought up, and the
* heartbeat started, as the v3 path does before its headless wait. `boot_disk`
@@ -38,6 +39,16 @@ void sk_v4_identity_check_now(void);
* leaves: 0. */
int sk_v4_identity_offer_wait(blkio_dev_t **raw, uint64_t *bytes);
/* For the mint: the system stick's Artemis is attached; the offered stick is
* still plugged in; the offered stick handed back unused (a mint refused or
* stopped -- the next mint offers it again); the genesis marker as read, and
* as the mint has just written it. */
int sk_v4_identity_stick_in(void);
int sk_v4_identity_offered_present(void);
void sk_v4_identity_release_offered(void);
const sk_v4_marker_t *sk_v4_identity_marker(void);
void sk_v4_identity_set_marker(const sk_v4_marker_t *m);
/* The arrival check run again on the offered stick, now that the mint has
* written its GPT and identity (it is then recognised as the real Zuse's). */
void sk_v4_identity_recheck_offered(void);
+16
View File
@@ -0,0 +1,16 @@
/* sk_v4_mint.h -- MINT-ZUSE: the real Zuse minted onto a second stick
* (docs/v4.0.0/STICK.md 6a; plan 2026-10-29-stick-5, Task 4).
*
* Built only with STARFORTH_V4=1 (Kconfig.kernel).
*/
#ifndef STARKERNEL_V4_SK_V4_MINT_H
#define STARKERNEL_V4_SK_V4_MINT_H
/* The whole of STICK.md 6a's minting: asks for a stick, shows its size, writes
* nothing until YES, then a GPT and a fresh Zuse identity on it, read back,
* and only then the real key in the genesis marker. 0 when she is minted;
* -1 otherwise, with its line said and the marker as it was. Run by the
* MINT-ZUSE word, and (Task 5) the fixed screen's R. */
int sk_v4_mint_zuse(void);
#endif /* STARKERNEL_V4_SK_V4_MINT_H */