/* sk_v4_marker.h -- the genesis marker, as the v4 boot reads and writes it: * version 2, the stick's proxy Zuse and the real Zuse (docs/v4.0.0/STICK.md 6, * 6a; plan 2026-10-29-stick-5, Task 1). On Artemis's metadata fence, * devblock 0 from the top (blk_meta_zone_read/write), as v3's version 1. * * Built only with STARFORTH_V4=1 (Kconfig.kernel). */ #ifndef STARKERNEL_V4_SK_V4_MARKER_H #define STARKERNEL_V4_SK_V4_MARKER_H #include typedef struct { int present; /* a marker is on the fence: genesis has happened */ uint8_t proxy[32]; /* the stick's proxy Zuse */ int has_real; /* the real Zuse is minted, on a second stick */ uint8_t real[32]; /* her key, when has_real */ } sk_v4_marker_t; /* The marker on the first disk slot's fence. A version 1 marker (v3's, the * minted pair's) reads as a proxy with no real Zuse. Returns 0 with @p m * filled in; -1 when there is none or it fails its checks (@p m then reads * present = 0). */ int sk_v4_marker_read(sk_v4_marker_t *m); /* Write @p m to the fence, always as version 2. Returns 0, or -1 on a write * error. */ int sk_v4_marker_write(const sk_v4_marker_t *m); #endif /* STARKERNEL_V4_SK_V4_MARKER_H */