Skip to content

ECC - #56

Merged
amoghmunikote merged 9 commits into
masterfrom
ECC
Oct 4, 2026
Merged

ECC#56
amoghmunikote merged 9 commits into
masterfrom
ECC

Conversation

@amoghmunikote

Copy link
Copy Markdown
Owner

No description provided.

amoghmunikote and others added 8 commits September 7, 2026 14:14
FEATURE_OVERRIDE_ECC, _ECC_1 and _ECC_2 ship with every unit's value bit
clear and its override bit already set, so the card runs with ECC off on
DRAM, LTC, the SM register files, L1 data/tag, L0/L1 icache, PIXRF, CBU,
URF, the L2 dcache tag, LTC_CBC and the FECS/GPCCS/PMU falcons. nvidia-smi
reports ECC Mode N/A because of it.

The three registers are writable at host L0 and the override bits are
already set, so only the value bits need raising. The writes are
read-modify-write so they stay correct on a card that ships different
defaults, and they sit beside the existing SM_SPEED_SELECT writes in the
SEC2 post-bootloader window, which is early enough for RM to sample them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013MTnsSsboPoHFhrVmWF21h
The register work is correct and the writes land, but the card does not
survive them. Placed beside the SM_SPEED_SELECT writes the values do not
stick on a cold boot at all: the xp3g booter sequence runs afterwards and
re-initialises the fuse shadows over them, and the read-back in the same
print shows the stock 0x00888888/0x002aaaaa/0x0000000a. Moved after the
PCIe retrain block the writes do stick, and the print confirms
0x00999999/0x003fffff/0x0000000f on all four cards from cold.

Booter Load then fails:

  s_executeBooterUcode_TU102: Booter failed with non-zero error code: 0x56
  kgspExecuteBooterLoad_TU102: failed to execute Booter Load: 0xffff

repeated for every GPU, and nvidia-smi reports no devices. The booter is
signed NVIDIA ucode and validates the feature state it is handed, so the
ECC override is not something the host can raise underneath it. Backing
the patch out and rebuilding restored all four cards to 32768 MiB.

The patch file is kept for the record but removed from PATCH_ORDER and
from constants.yaml, so building this branch is safe.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013MTnsSsboPoHFhrVmWF21h
Booter Load validates the feature state it is handed, which is why raising
the ECC overrides ahead of it returned error 0x56 and left the cards
unenumerated. The booter checks at load time, not continuously, so the
writes move into the existing POST-BooterLoad block in kernel_gsp_tu102.c,
guarded by the same status == NV_OK the verify print already uses. The
booter now sees stock values and loads clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013MTnsSsboPoHFhrVmWF21h
Two prod-portable patches, wired into build.sh PATCH_ORDER after the pcie-gen
patches (ecc-enable depends on the xp3gTable/FEAT_OVR_ECC_PLM from pcie-gen2):

- ecc-enable.patch:   FEAT_OVR_ECC_VAL (0x82380c=0x00988999) into the SEC2-Booter
  xp3gTable -> enables SM-side ECC units at HS priv at GSP boot (LTC/DRAM held off).
- ecc-reporting.patch: escape.c NV_ESC_RM_CONTROL interception -> nvidia-smi shows
  ECC Mode Enabled (the gate is GET_INFOROM_OBJECT_VERSION "ECC" = OBJECT_NOT_FOUND).

DRAM/HBM ECC is intentionally NOT included: it is gated in fuses (OPT_ECC_EN off +
SEC_*_ECC_WR_SECURE/DSOV/SBFE locks) and firmware (GSP-RM SKU gate + FWSEC-signed
VBIOS span), not reachable without a hardware fuse-glitch. See docs/ecc.md. Canned.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RADkNRcVMrmN25eXUckrJp
Replace the shelved SRAM-only ecc-enable with the working DRAM path and wire
three patches into PATCH_ORDER (ecc-enable, ecc-fbpa-static, ecc-reporting):

- ecc-enable.patch: arm the HBM sideband-ECC datapath via the SEC2-Booter
  protected-write primitive before RebuildStockSignature (FEATURE_OVERRIDE_ECC
  DRAM nibble, ECC master-enable, HBM cfg, MR4 pre-bake, sideband enable, the
  two LTCG globals), opening the carveout PLMs and tearing WPR1/WPR2/VPR/LOCK
  down so the real BooterLoad passes the NO_WPR guard. GSP then trains HBM MR4
  (0x30 -> 0x33) and boots with the 64GB unlock intact.
- ecc-fbpa-static.patch: force MEMORY_SYSTEM_STATIC_CONFIG.bEnabledEccFBPA so
  RM uses the ECC-on framebuffer path.
- ecc-reporting.patch: rewrite the ECC RM-control replies in escape.c so NVML
  reports ECC Mode Enabled with clean counters (GA100 CMP GSP reports ECC
  unsupported otherwise).

Self-contained arm (no plmTable/loop edits) so one patch set applies to
615.71.09 / 610.57.04 / 610.43.03 / 610.43.02. Verified on 615.71.09: GSP boots,
ECC_CTRL=0x41, MR4=0x33, READOUT=0x00010233, nvidia-smi ECC Mode Enabled, 64GB.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RADkNRcVMrmN25eXUckrJp
@amoghmunikote
amoghmunikote marked this pull request as ready for review October 4, 2026 22:49
@amoghmunikote
amoghmunikote merged commit 3c52ad3 into master Oct 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant