§H.12 step 18: zuse_eligibility.c -- read/add/membership-check
is_member() (fail-closed) and add() (idempotent, chains new devblocks onto the tail as needed) over the item-17 eligibility-list devblock chain, mirroring capsule_zuse_boot.c's magic/version/CRC-64 validation convention. No callers yet. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QgooKd5hJNtTYqB6CyK5f9
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
21ad5f7373
commit
f4615cf605
+13
-1
@@ -4111,7 +4111,19 @@ work, not new invention.
|
||||
confirms the header is syntactically clean (verified via a standalone `gcc -fsyntax-only`
|
||||
compile, and via the struct-size static assert) and doesn't break the build. Verified
|
||||
3-arch boot to `ok>` (amd64/aarch64/riscv64).
|
||||
- [ ] **18.** Implement read/add/membership-check functions in C.
|
||||
- [x] **18. DONE 2026-09-03.** `include/starkernel/zuse_eligibility.h` +
|
||||
`src/starkernel/capsule/zuse_eligibility.c`: `zuse_eligibility_is_member()`/
|
||||
`zuse_eligibility_add()` over the item-17 devblock chain, mirroring
|
||||
`capsule_zuse_boot.c`'s own magic/version/CRC-64 validation convention exactly (the fence
|
||||
region is never zeroed at format time, so blank and corrupt devblocks are indistinguishable
|
||||
and handled identically — merged into a single "absent" read failure). `is_member()` is
|
||||
fail-closed (any read/chain error reads as "not eligible," never permissive). `add()` is
|
||||
idempotent (re-adding an existing entry is a no-op success) and chains a fresh devblock onto
|
||||
the tail when the current one fills, relying on `blk_meta_zone_write()`'s own existing
|
||||
bounds check against `meta_fence_blocks` to surface an exhausted fence budget as an ordinary
|
||||
write failure rather than duplicating that check here. No callers yet (that's item 19).
|
||||
Verified 3-arch boot to `ok>` (amd64/aarch64/riscv64), each run in the foreground per
|
||||
CLAUDE.md's QEMU rule.
|
||||
- [ ] **19.** Add a Zuse-only FORTH word to add an entry, gated by `zuse_session`.
|
||||
|
||||
**Phase 7 — Message card gate + `ELEVATE-REQUEST` (H.8)**
|
||||
|
||||
Reference in New Issue
Block a user