Jump to content
Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

PCIe Gen4 on a burned 8 GB card

From CMP Wiki

Warning The E1 writes halted a whole host; the cause is found and fixed. On the lab's dual-socket AMD EPYC server, E1 write 7 (LINK_CONFIG_0 bits 19:18 to 0) halted the whole host in 5 of 15 runs: a sync flood, and the BMC had to power cycle it. It never happened on the lab's Intel bench. The cause was the write method: Python's struct.pack_into stored 0x00000000 before each value, and on LINK_CONFIG_0 that knocked the link out. With the fixed writer there has been no halt: 12 of 12 test runs, then every boot of the boot service (found and fixed). Use a writer that makes one 32-bit store per register, never run E1 on a card whose OPT_PCIE_BOOT_GEN23_DIS reads 1, and for the first try still use a host you can power cycle.

On a glitched 8 GB card (10de:20c2) whose FF records have cleared the PCIe link-speed fuses, OPT_PCIE_BOOT_GEN23_DIS included, a cold card advertises 16 GT/s x16, but the driver still stops at Gen3 by itself: nvidia-smi reports gen max 3 (gpumax 4). The lab took card B (120 SMs, the 80 GB layout) to Gen4 x8 on its bench with the same two steps as on the 10 GB card, a runtime PHY init (E1) and one retrain from the root port, after a walk to Gen3 through the driver. Card H ran Gen4 x16 the same way on the lab's EPYC server. Since 22 November that server runs the route at every boot with the fixed writer. Six of its seven burned cards now run at Gen4 x16, the sixth since 25 November; the seventh runs at Gen3 x16 in a marginal slot where the guard keeps the Gen4 step off (at every boot). Nothing on this page is burned; the steps are redone after every boot. The fuses: the four PCIe link-speed fuses. The 10 GB route, with the E1 register table and the pass gates: PCIe Gen4 on the 10 GB card.

Reported 8 GB Card B on the bench; card H on the EPYC server, reproduced twice; five cards at every boot on that server since 22 November, a sixth since 25 November.
Source: @darkmaniac7, 2026-11-21 (lab notes)
Source: @darkmaniac7, 2026-11-22 (lab notes)
Source: @darkmaniac7, 2026-11-25 (lab notes)

Result

Card B Card H
Host the lab's Intel bench: Core i9-13900K, the card on a riser at x8, a root port that does 32 GT/s the lab's dual-socket AMD EPYC server, where E1 write 7 had halted the host in 5 of 15 runs with the first writer (found and fixed)
Fuses OPT_DISABLE_GEN3_SPEED, OPT_PCIE_BOOT_GEN3_DIS and OPT_PCIE_BOOT_GEN23_DIS 0; PCIE_MAGIC_BITS_D 0x14680000 (bit 25 cleared) the same
Route walk to Gen3 through the driver, the seven E1 writes one at a time, one retrain the same: RM walk to Gen3, the E1 writes one at a time, one retrain
Link after E1 and one retrain 16 GT/s x8 at both ends, EqualizationComplete 16 GT/s x16 at both ends, EqualizationComplete
Errors 60 s clean, 0 Xid 0 AER, 0 Xid
Pinned copies, host to device / device to host 12.24 / 13.52 GB/s 24.3 / 24.1 GB/s (about 13 GB/s at Gen3 and 6.5 GB/s at Gen2)
Repeats reproduced twice

Card B's 60 s check is short; the 10 GB route's pass gates ask for a 30-minute soak (pass gates).

Card H's runs were on the server where the E1 writes used to halt the host. With the fixed writer the same route has run there at every boot since 22 November, with no halt (below).

Reported 8 GB Card B on the bench; card H on the EPYC server, reproduced twice.
Source: @darkmaniac7, 2026-11-21 (lab notes)
Source: @darkmaniac7, 2026-11-22 (lab notes)
Source: @darkmaniac7, 2026-11-25 (lab notes)

At every boot on the EPYC server

Since 22 November the lab's EPYC server runs the route at every boot from a boot service, one card at a time: it walks each burned card (10de:20c2) to Gen3 through the driver, then, on the cards whose OPT_PCIE_BOOT_GEN23_DIS reads 0, makes the seven E1 writes and one retrain to Gen4. In the three automatic boots up to 25 November, five of its seven burned cards reached Gen4 x16 each time, with 0 Xid, 0 AER and no halt; the other two sat in slots where the guard had disabled the Gen4 step during testing. On 25 November the lab re-enabled the step in one of those two slots and took that card to Gen4 x16 by hand; the service gives it Gen4 from the next boot on, so six of the seven now run at Gen4 x16. The seventh sits in a marginal slot: it shares a fan shroud, logs correctable RxErr and replay timeouts even at Gen3, passes all seven E1 writes and then drops the card with Xid 79 when the root port retrains to 16 GT/s. The guard keeps that slot at Gen3 x16.

Per card, on the EPYC server Gen2 x16 Gen3 x16 Gen4 x16
Pinned host copies about 6.5 GB/s about 13 GB/s 22.4 to 25.1 GB/s
GPU to GPU (P2P), per pair 13.15 GB/s 20.2 to 26.2 GB/s

What it is worth: a large model's cold prefill ran 15 percent faster at Gen4 than at Gen3, and decode 0.3 to 1 percent faster; decode is not link bound. Gen4 is volatile: the service redoes the walk, the E1 writes and the retrain after every boot.

Reported 8 GB One host: five cards at every boot since 22 November, a sixth since 25 November.
Source: @darkmaniac7, 2026-11-25 (lab notes)
Source: repo github.com/darkmaniac7/cmp170hx-8gb-vfi-tools by darkmaniac7 on GitHub

Steps

One card at a time, one attempt per boot.

  1. Cold boot, then read DSOV (0x820084) before the driver binds. Go on only if it reads 1.
  2. Load the driver with RMPcieLinkSpeed=0x15 in its NVreg_RegistryDwords string, or as the lab's EPYC server does it: cmpunlocker's NVreg_RegistryDwords line without its RMPcieLinkSpeed=0x1, that is NVreg_RegistryDwords="RmForceEnableGen2=1", and RMPcieLinkSpeed=0x5 for each burned card in NVreg_RegistryDwordsPerDevice. Both values give gen max 3; no other driver change is needed for Gen3 on a burned card.
  3. Walk the link to Gen3 through the driver: RM speed 1, then 2, then target link speed 3 at both ends and RM speed 3, as in PCIe Gen3 on the 10 GB card. Go on only with 8 GT/s at both ends.
  4. Run the seven E1 PHY writes one at a time, with the driver bound and the link at Gen3, each register as one aligned 32-bit store (below). The registers and values are the A100 PHY init that CMPGlitch worked out (the E1 table); the seventh write is LINK_CONFIG_0 bits 19:18 to 0.
  5. Retrain once from the root port (target link speed 4 at both ends, then Retrain Link on the root port, as in the 10 GB steps). One retrain only.
  6. Check the link at both ends with LnkSta, a pinned copy test in both directions and the Xid log (pass gates).
  7. To try again, reboot. Never unbind and rebind the driver at Gen4 (below).

At every boot, with the public kit. The lab's EPYC server runs these steps at every boot (result) with the kit now public as tools/pcie/ in darkmaniac7/cmp170hx-8gb-vfi-tools: the boot service cmp-pcie-boot, cmp-rmwalk (the walk to Gen3 through the driver), cmp-e1steps (the seven E1 writes), cmp-gen4retrain (the one retrain), cmp-gen23read, cmp-gen-switch (Gen3 or Gen4 by a config-space retrain on links that had E1 this boot) and cmp-linkmon (a read-only AER and LnkSta monitor). cmp-e1steps refuses a card whose OPT_PCIE_BOOT_GEN23_DIS reads 1 or whose DSOV bit 0 reads 0. The service writes a marker per card before each step and removes it after; a marker left by a step that took the host down disables that step for that card. Since 25 November (commit 2abb3ed) the service also disables Gen4 on a slot when the Gen4 retrain loses the link without a host halt (rc 2: Xid 79 or an unreadable LnkSta). The public copy had not run on a card in exactly that form when published. The whole route for one card, before, during and after the glitch: docs/GUIDE.md, PCIe in section 4.4.

Reported 8 GB Card B on the bench; card H on the EPYC server with the same walk, E1 writes and retrain; the EPYC server at every boot since 22 November.
Source: @darkmaniac7, 2026-11-21 (lab notes)
Source: @darkmaniac7, 2026-11-22 (lab notes)
Source: @darkmaniac7, 2026-11-25 (lab notes)
Source: repo github.com/darkmaniac7/cmp170hx-8gb-vfi-tools by darkmaniac7 on GitHub

Never unbind or rebind the driver at Gen4

Warning With the link at Gen4, unbinding and rebinding the driver failed: the probe returned -5, BAR0 read 0xbadf1020, and the driver logged Xid 140. Reboot for each attempt instead.

8 GB One card.
Source: @darkmaniac7, 2026-11-22 (lab notes)

One store per register write

The E1 writes went through Python's struct.pack_into on a BAR0 mapping. pack_into zeroes its destination before it packs, so every E1 write first stored 0x00000000 and then the value: LINK_CONFIG_0 was 0 for a moment on each write. The fix is one aligned 32-bit store per register (a memoryview cast to 32-bit words). It is public since 22 November: cmp_gen4_e1.py in darkmaniac7/cmp170hx-10gb-pcie-gen4 (commit 0a5882e on main), and Bar0.wr32 in the CiMP tools (patch 0012 in darkmaniac7/cmp170hx-8gb-vfi-tools). Update any copy from before that; the 8 GB boot kit's cmp-e1steps (tools/pcie/, 25 November) writes the same way. It was the cause of the host halts on the EPYC server: with the fixed writer there has been no halt since (below).

The same write pattern in community tools (files in five cmpunlocker forks and a member's fuse calculator hosted here), with the files and the fix: Cmpunlocker forks#Warning: BAR0 register access through struct.pack_into.

Reported 8 GB and 10 GB The 10 GB route's cmp_gen4_e1.py had the same zero store.
Source: @darkmaniac7, 2026-11-22 (lab notes)
Source: @darkmaniac7, 2026-11-25 (lab notes)
Source: repo github.com/darkmaniac7/cmp170hx-10gb-pcie-gen4 by darkmaniac7 on GitHub
Source: repo github.com/darkmaniac7/cmp170hx-8gb-vfi-tools by darkmaniac7 on GitHub

The host halts: found and fixed

On the EPYC server the E1 writes halted the whole host in 5 of 15 runs, at write 7 (LINK_CONFIG_0): a sync flood, and the BMC had to power cycle it. The cause was the BAR0 write method. Python's struct.pack_into zeroes its destination before it packs, so each E1 write first stored 0x00000000; on LINK_CONFIG_0 that knocked the link out, and the platform answered with a sync flood. The lab's Intel bench never halted.

The fixed writer (v3, 22 November) combines the three changes the lab was testing:

  • one aligned 32-bit store per register (a memoryview cast), so no zero is written first;
  • Hardware Autonomous Speed Disable (LnkCtl2 bit 5) set on the card and on the root port before write 7;
  • after write 7, 3 s with no BAR0 access, then the root port read before the card.

With v3: 12 of 12 clean E1 runs in testing, then every boot of the boot service since (three automatic boots, five cards at Gen4 x16 each time, 0 Xid, 0 AER, no halt). This page said earlier that single stores were a cause not yet shown to be the only one; with v3 there has been no halt. For the first try on another host, still use one you can power cycle.

Two traps stay. Never run the E1 writes on a card whose OPT_PCIE_BOOT_GEN23_DIS reads 1: card A, whose GEN23 still read 1, halted the host at write 7 with the first writer, so its halt does not separate the two causes; the lab has not tried such a card with the fixed writer, and the boot kit refuses one. And one retrain per boot: Gen4 is volatile, so the route is redone after every boot.

Reported 8 GB One host: 12 of 12 test runs, then every boot since 22 November.
Source: @darkmaniac7, 2026-11-21 (lab notes)
Source: @darkmaniac7, 2026-11-22 (lab notes)
Source: @darkmaniac7, 2026-11-25 (lab notes)

Open questions

  • Why the driver stops at Gen3. The lab suspects the PCIE_MAGIC_BITS_D bits still set (19, 22, 26 and 28); unproven. Whether a burn of the whole word to the A100 value 0x00200000 (cmp170hx-ffcalc --a100) lifts the cap is open; a community member has burned it, and the result is pending (the four fuses).

Related