Add homeblocks_sig.h: drive signature header struct (Phase 8 kickoff)

Implements the design from the previous commit as-is: homeblocks_sig_t
(4096 bytes, magic+version+drive_uuid+timestamp+cert/blockmap offset
reservations+real hdr_crc), HOMEBLOCKS_SIG_PACK/_GET_MAGIC/_GET_VERSION
macros mirroring CAPSULE_MAGIC_PACK's bit layout, and a C99
compile-time size assertion matching stadium.h's own discipline.

Verified standalone (sizeof == 4096, clean under -std=c99 -Wall
-Wextra -Werror) -- nothing consumes this header yet, so no
functional kernel change and no 3-arch acceptance boot needed for this
step.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CXjAPTEKrgY2Mrk25KoLDn
This commit is contained in:
Robert Allan James
2026-08-26 06:55:59 -04:00
co-authored by Claude Sonnet 5
parent 7cbf92ac8f
commit 10b96870c5
2 changed files with 133 additions and 1 deletions
+8 -1
View File
@@ -203,7 +203,14 @@ decisions get added here, not to `FABRIC-2.md`. Follow the same discipline `FABR
generated yet (Milestone 6), so this reserves the *shape* of where a cert will attach
without committing to a cert format that doesn't exist. Same reasoning for
`blockmap_offset`/`blockmap_devblocks` against Milestone 3's still-open block-map design.
Not yet written to a header file — presented for confirmation before implementation.
**Implemented (2026-08-26):** `include/starkernel/homeblocks_sig.h` — `homeblocks_sig_t` +
`HOMEBLOCKS_SIG_PACK`/`_GET_MAGIC`/`_GET_VERSION` macros, a C99 compile-time size assertion
(same discipline `stadium.h`'s own header-size checks use), and the identical field layout
shown above. Verified standalone: `sizeof(homeblocks_sig_t) == 4096`, compiles clean under
`-std=c99 -Wall -Wextra -Werror`. Not yet consumed by any code — nothing in the block
subsystem or xHCI driver reads or writes it yet, so no functional kernel change and no
3-arch acceptance boot needed for this step; that starts with the signature-check
implementation, the next punch-list item below.
- [ ] Implement the signature check, called before any write path touches a newly-inserted
drive.