PORT requirements¶
Every port shall declare its properties and feature flags in Rationale: The contract is checkable data, not folklore. Status: Accepted 2026-10-07 Verification: Schema validation of every manifest; configuration tests for refused combinations. Trace: SPEC-011 §2 |
A thread’s register context shall be saved on its own stack; the TCB shall hold only the saved stack pointer and the port’s declared extension bytes. Rationale: Smallest TCB; kernel layout independent of the register set. Status: Accepted 2026-10-07 Verification: Analysis: Trace: SPEC-011 §3 |
A port shall provide Rationale: SoC startup and the kernel need fixed hooks. Status: Accepted 2026-10-07 Verification: Test: Trace: SPEC-011 §4 |
Rationale: KRN-THR-005, KRN-MM-002, SPEC-002 §6. Status: Accepted 2026-10-07 Verification: Test: Trace: SPEC-011 §5 |
A port shall implement the kernel-aware entry and exit sequence of SPEC-002 §6, Rationale: SPEC-002 made these the kernel’s expectations. Status: Accepted 2026-10-07 Verification: Trace: SPEC-011 §6; SPEC-002 |
A port shall implement the architecture timer contract of SPEC-003 §4 plus Rationale: KRN-TIM-020, 036. Status: Accepted 2026-10-07 Verification: Trace: SPEC-011 §7; SPEC-003 §4 |
Kernel atomics shall be C11 atomics through the portability layer; a port shall provide only barriers and its Rationale: One source for EmbCC, GCC, and Clang (09 §5, §6). Status: Accepted 2026-10-07 Verification: Analysis: no hand-written exclusive-access asm in Trace: SPEC-011 §8; SPEC-004 §12; SPEC-005 §9 |
Rationale: A lost wake-up in idle is an unbounded latency. Status: Accepted 2026-10-07 Verification: Test: Trace: SPEC-011 §9 |
A port shall declare stack alignment, minimum, and growth; implement the switch-out stack check and the hardware limit register where present; install or document the interrupt stack per SPEC-002 §7.2; and document handler and context frame sizes. Rationale: KRN-MEM-009 to 011, KRN-THR-023. Status: Accepted 2026-10-07 Verification: Test: Trace: SPEC-011 §10 |
A port with fault hardware shall route every synchronous fault to Rationale: SPEC-002 §9; the crash record needs the decode. Status: Accepted 2026-10-07 Verification: Test: Trace: SPEC-011 §11 |
A port with protection hardware shall implement Rationale: Isolation mechanics belong to the port; policy to the kernel and generator. Status: Accepted 2026-10-07 Verification: Isolated-profile tests on each MPU port; Trace: SPEC-011 §12; SPEC-010 |
A port shall contribute the context frame layout, TCB extension layout, fault register layout, interrupt stack bounds, and its name and variant to the debug descriptor, and shall provide Rationale: ADR-011 needs architecture facts a debugger cannot infer. Status: Accepted 2026-10-07 Verification: Descriptor consumer test on each port. Trace: SPEC-011 §14; OBS-008 |
Port code shall follow the rules of SPEC-011 §15: Rationale: One source for three compilers (09 §5, §7). Status: Accepted 2026-10-07 Verification: Build on EmbCC, GCC, and Clang for each port; CI grep for forbidden constructs. Trace: SPEC-011 §15; 09 |
A port shall be complete only with its manifest, headers and sources, Rationale: A port without its evidence is not a port (01 §6). Status: Accepted 2026-10-07 Verification: Release checklist; CI gates. Trace: SPEC-011 §16 |