nx_attest_silicon.nx
buildroot/runtime/nx_attest_silicon.nx
about
nx_attest_silicon.nx -- per-chip trust declaration.
Per [[feedback-captain-moroni-doctrine]] Phase M4 and
[[feedback-reclamation-doctrine-captain-moroni]]: every supported
chip declares its known threat surface (Intel ME, AMD PSP, Apple
T2, Qualcomm baseband, vendor BMC) + the mitigations available
against that surface + the resulting trust ceiling.
This is the LOOKUP TABLE that turns the reclamation doctrine into
runtime data: given a chip family, what xenocells need to be
instantiated, what budget caps apply, what operations remain
unsafe even after all mitigations are applied.
Composes:
nx_xenocell -- the threat surfaces listed here become
xenocells the substrate instantiates
nx_organism -- xenocells from attest_silicon get registered
with the organism so they're counted in
host pressure aggregation
nx_budget -- trust ceiling influences how much RAM/VRAM
budget the substrate will accept declarations
for (low-trust hardware refuses big budgets)
nx_reclaim -- the composed operation that consumes this
attestation to produce a safety envelope
V1 ships a hard-coded chip family enum + threat-surface bitmask +
trust_score per family. V2 will read from a content-addressed
chip-attestation database (peer-sharable so the community can
extend coverage without recompiling substrate).
Gap list (V1 honest perf verdict):
- chip family enum is HARDCODED (V2 makes it data-driven)
- no actual silicon probe to AUTO-DETECT chip family (the host
OS's /proc/cpuinfo or DMI tables are queued; today the caller
supplies the chip family ID)
- mitigation_applied is a bitmask; partial application not
representable (mitigation either applied or not)
- sovereign-Nishi silicon entry is a stub
genealogy_id: cardinal_2026-05-07_captain_moroni_doctrine +
dependencies 2 imports · 4 importers
imports: nx_syscalls.nxnx_tier.nx
imported by: nx_attest_silicon_test.nxnx_reclaim.nxnx_reclaim_test.nxnx_sovereign_compose_test.nx
structs
| 118 | struct NxSiliconAttestation |
consts
| 56 | const NX_MAGIC_1024: i64 = 1024 |
| 65 | const NX_CHIP_UNKNOWN: nx_int = 0 |
| 66 | const NX_CHIP_INTEL_ME: nx_int = 1 |
| 67 | const NX_CHIP_AMD_PSP: nx_int = 2 |
| 68 | const NX_CHIP_APPLE_T2: nx_int = 3 |
| 69 | const NX_CHIP_APPLE_SECURE_ENCLAVE: nx_int = 4 |
| 70 | const NX_CHIP_QUALCOMM_BASEBAND: nx_int = 5 |
| 71 | const NX_CHIP_MEDIATEK_MODEM: nx_int = 6 |
| 72 | const NX_CHIP_BROADCOM_WIFI: nx_int = 7 |
| 73 | const NX_CHIP_VENDOR_BMC: nx_int = 8 // server out-of-band |
| 74 | const NX_CHIP_NXP_SE: nx_int = 9 // smartcard SE |
| 75 | const NX_CHIP_INFINEON_TPM: nx_int = 10 |
| 76 | const NX_CHIP_RISCV_OPEN: nx_int = 11 // SiFive/T-Head/etc open RISC-V |
| 77 | const NX_CHIP_SOVEREIGN_NISHI: nx_int = 12 |
| 78 | const NX_CHIP_N_FAMILIES: nx_int = 13 |
| 86 | const NX_TS_NONE: nx_int = 0 |
| 87 | const NX_TS_RAM_READ: nx_int = 1 // can read user RAM out-of-band |
| 88 | const NX_TS_DMA: nx_int = 2 // direct memory access bypass |
| 89 | const NX_TS_NET_EGRESS: nx_int = 4 // can phone home |
| 90 | const NX_TS_RADIO_ACTIVATE: nx_int = 8 // can turn on transponder |
| 91 | const NX_TS_FIRMWARE_PERSIST: nx_int = 16 // survives OS reinstall |
| 92 | const NX_TS_MICROCODE_PATCH: nx_int = 32 // can flash CPU microcode |
| 93 | const NX_TS_BOOT_INTERPOSE: nx_int = 64 // pre-OS boot hook |
| 94 | const NX_TS_KEY_ESCROW: nx_int = 128 // vendor holds master keys |
| 102 | const NX_MIT_NONE: nx_int = 0 |
| 103 | const NX_MIT_ME_CLEANER_HAP: nx_int = 1 // me_cleaner + HAP bit |
| 104 | const NX_MIT_COREBOOT: nx_int = 2 // libreboot/coreboot |
| 105 | const NX_MIT_EGRESS_FILTER: nx_int = 4 // host firewall vendor endpoints |
| 106 | const NX_MIT_KILL_SWITCH: nx_int = 8 // physical disconnect |
| 107 | const NX_MIT_SILICON_TRUST_ENF: nx_int = 16 // per-cell trust enforced |
| 108 | const NX_MIT_CRYPTO_COMPART: nx_int = 32 // hardware-security-key |
| 109 | const NX_MIT_MEMORY_HYGIENE: nx_int = 64 // swap-encrypt + no-hibernate |
| 110 | const NX_MIT_DMA_DISCIPLINE: nx_int = 128 // IOMMU + thunderbolt off |
functions
| 129 | func nx_chip_family_is_valid(f: nx_int) -> nx_int |
| 140 | func nx_chip_threat_surface(f: nx_int) -> nx_int |
| 183 | func nx_chip_available_mitigations(f: nx_int) -> nx_int called by 1: nx_attestation_new |
| 223 | func nx_chip_base_trust_q10(f: nx_int) -> nx_int |
| 246 | func nx_attestation_new(chip_family: nx_int, name: *u8) -> *NxSiliconAttestation |
| 259 | func nx_attestation_apply_mitigation(a: *NxSiliconAttestation, called by 1: main |
| 272 | func _popcount8(x: nx_int) -> nx_int called by 1: nx_attestation_effective_trust_q10 |
| 292 | func nx_attestation_effective_trust_q10(a: *NxSiliconAttestation) -> nx_int called by 4: nx_attestation_safe_for_secretsnx_attestation_safe_for_gameplaymainnx_reclaim calls 1: _popcount8 |
| 307 | func nx_attestation_safe_for_secrets(a: *NxSiliconAttestation) -> nx_int |
| 319 | func nx_attestation_safe_for_gameplay(a: *NxSiliconAttestation) -> nx_int |