Files
LithosAnanke/kernel/include/starkernel/v4/sk_v4_marker.h
T
Claude 3bd81097e1 chore(license): an SPDX header on every source file that had none (LicenseRef-Starship-1.0) [skip ci]
The header scan (Captain Bob, 2026-11-10): 788 source files -- 351 with the
SL-1.0 header, 12 with the old name (docs/working/experiments, kept by
ruling), 31 under someone else's licence (tools/kconfig, Linux's, GPL-2.0:
kept), and 394 with none. Ruled: the SPDX form; capsules (.4th, .f18) and
proofs (.thy) left for a ruling of their own (mkcapsule's 64x16 block format,
content-addressed capsules).

253 files now begin
    SPDX-License-Identifier: LicenseRef-Starship-1.0
    Copyright (c) 2023-2026 Robert A. James
as a /* */ block (C, headers, assembly, linker scripts) or # lines (scripts,
Makefiles, Kconfig; below a shebang or a coding line); tools/mkcapsule.c,
which had the copyright line, gets the SPDX line only.

Not touched: docs/working/ (archive and old campaign material, as the
ruling kept the experiments); v4/system/post_cases.c (generated by
v4/tools/mkpost.py, "do not edit" -- the generator has the header).

Comments only: the kernel builds on amd64, aarch64, riscv64; make -C v4
test-32: 39 programs, 0 failures; every changed script parses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
2026-11-10 04:12:49 +00:00

34 lines
1.3 KiB
C

/* SPDX-License-Identifier: LicenseRef-Starship-1.0
* Copyright (c) 2023-2026 Robert A. James
*/
/* 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 <stdint.h>
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 */