Fun Intel Anecdote, Qs, AMD ECC mobos?

None, if it’s an EC4 UDIMM and an EC4 RDIMM (x72). If it’s an EC8 (x80) RDIMM chipkill can be handled instead of just SECDED.

For EC4 UDIMMs, yes. The on-die EC2’s only SEC. However, since DDR5 has write CRC, read CRC, and EC2 scrubbing, SECDED is semi-redundant.

You’ve discovered why UDIMMs and RDIMMs aren’t pin compatible in DDR5. CB[3:0]_A and CB[3:0]_B are the two subchannels’ EC4s. On an RDIMM these expand to CB[7:0]_A and CB[7:0]_B (Table 4) but on EC4 (x72) RDIMMs I believe only 3:0 are used.

Edit: yeah, 3:0 (JESD305, Table 4).

1 Like

What does

cat /sys/devices/system/edac/mc/mc0/rank0/dimm_edac_mode

report?

… but wouldn’t UDIMM EC4 correspond to 4/0.5 (for DRAM Conf. x8), or 8/1 (for DRAM Conf. x4)? SECDED is not listed for those combinations.

His sticks are DDR5 UDIMMs. So I find it weird that dmidecode reports 80-bit width.

That might be it. If UDIMMs are always EC4 and RDIMMs are always EC8, and these modules were early and had some vestigial bits from an inadequate supply of special-purpose chips, or, something… there’s no contradiction then.

There’s no R on the label on the actual DIMM either.

Sounds fine to me. dmidecode also reports “Error Correction Type” as “Single-bit ECC” under “Physical Memory Array”, so nothing exciting there.

All I’ve got under /sys/devices/system/edac/mc/ is power/, subsystem/, and uevent. Looks like I neglected to have any edac modules loaded.

… looks like there’s no EDAC module for Raptor Lake aside from igen6 which is for “in-band ECC”, some different SoC thing.

1 Like

Yeah you’re right, there should have been a 8/1 entry within the x8 DRAM configuration to account for the UDIMMs; this chart is only useful for EC4 and EC8 RDIMMs. I don’t think I’ve ever seen or heard of x4 configured UDIMMs before.

There are definitely EC4 DDR5 RDIMMs in the wild. In addition the ECC ability of different DDR5 RDIMMs wildly varies depending on DRAM chip width configuration and rank.

2 Likes

Most of the DDR5 RDIMMs I’ve checked have been EC4. Anecdotal sampling but EC8 seems more the exception than the norm.

Yeah, that seems like a bug.

1 Like

I would say that is rather disconcerting. My AM4 DDR4 UDIMM ECC (72-bit) system says

# dmidecode | grep -A 3 "Physical Memory Array"
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: Multi-bit ECC

Wendell calls out the same reported width difference in that first video he linked in this thread, with Micron DIMMs reporting 80 bits. Here’s a link with the timestamp, if you’re curious: https://www.youtube.com/watch?v=RdYToqy05pI&t=730s

This is an Asus Pro WS W680-ACE.

1 Like

Looks like it’s Table 1 of Nguyen et al. 2021 who, at a glance, seem concerned solely with improvements beyond DDR5 on-die ECC. I’ll have to read it later (other things going on, ATM) but, if someone feels like taking a closer look in the meantime, wanted to mention the organizations might therefore not translate well to data bus ECC as currently implemented.

1 Like

You are correct, OBET is a scheme they invented… which probably means it isn’t actually implemented on commercial hardware.

The PDF for those that block all the xss modern websites use

(https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8708231/pdf/sensors-21-08271.pdf)

From what I’ve been tease out from some googling around (JEDEC can have their paywall or I can buy RAM, but not both) the ODEC2 (on-die EC2) is 128+8 bit Hamming. Bus EC4 looks like probably at least the 64+8 you suggested with 128+16, 256+32, or 512+64 permitting more correction possibilities.

(edit: revisions from further checking as mentioned in the original)

1 Like

I watched your videos @wendell. Few things are still not clear to me, but I must also admit that I am no expert in this field. My summary, and please correct me if I am wrong, this is just a layman assumption based on what I read and watched so far:

  • AM5 and ECC was sketchy at first, but got a lot better now
  • when buying a system, check with dmidecode if ECC is actually working
  • no hardware test, but you injected errors with rasdeamon

New questions that came up for me after that:

  1. Is it still necessary to get a Epic or Pro CPU to get ECC? AsRock B650D4U says nothing about that in the QVL or manual, but supports something like a Ryzen 7700 or a none Pro 8300G. So in theory that could work, but at the same time did AMD deleted form reddit that the 8300G supports ECC.
    AMD confirms Ryzen 8000G APUs don't support ECC RAM, despite initial claims | Tom's Hardware
    To me this looks like the typical AMD mess.

  2. Is inserting a double error in rasdeamon trustworthy? Maybe if you could explain in a video how that actually works or what actually happens when you do this, this could build trust in the process. Someone like me, who does not understand the process is a little bit skeptical and would rather like to see a hardware test like with DDR4.

  • no hardware test, but you injected errors with rasdeamon

Yes, hardware test! Hardware test is even running the memory beyond spec to generate errors, doing rowhammer tests, etc. This is the “basic” testing. Advanced testing is rasdaemon.

With the new agesa these are very much hardware tests and very much working.

Is it still necessary to get a Epic or Pro CPU to get ECC?
No. What I was saying in the video was that “end to end” ECC (full rasdaemon support) showed up in consumer boards BEFORE specifically the B650D4U which I thought was odd.

or a none Pro 8300G

This is something else; non-pro APUs don’t get ECC enablement for whatever reason, but this explicitly shows in the tooling. (It might have been the case in the past that 1 bit errors were being silently corrected, but I don’t see how that would be the case on APUs… perhaps older AM5 cpus

Is inserting a double error in rasdeamon trustworthy?

Yes, so the whole world of DDR5 ecc is far more insane than I think you might realize. Most RDImms in the field are 80 bits for example. Lot of x4 and x8 ranks “in hardware” support things like row remapping? Which is only juist now getting platform enablement “in general” vs "ODM specific (read as: dell/hp/lenovo/quanta/etc specific). DDR5 ecc taken full tilt is really something special.

Ecc udimm on am5 is still not quite as special though.

The “hardware test” is easy – overclock the memory till you get errors. But imho this isn’t as sane as just using rasdaemon to check the plumbing end to end.

2 Likes

Thank you wendell for taking the time and answering me!
That is such interesting information.

My outdated DDR4 knowledge was that you can’t really test ECC, because it would take months or even years for some error to show up. I did not know that you can provoke en error simply by running them out of spec and stress them with rowhammer.

Cheers mate!

Is there something similar to intel Ark grom the AMD side? I find it to be a pita to check for CPU and Chipset support for ECC

Thinking a bit more about this, concatenating transfers for wider codewords like this seems dangerous: any errors affecting multiple transfers (stuck bits etc) would become multi-bit errors in the codeword.

I’m really curious to see the linux kernel EDAC output from someone running DDR5 ECC UDIMMs. Both the number of syndromes reported (should correspond to the number of check bits used in the ECC calculation or maybe not, still don’t think I understand this) and what kind of error correction mode the memory controller claims:

# dmesg | grep -i EDAC
[    0.362165] EDAC MC: Ver: 3.0.0
[    2.536624] EDAC amd64: MCT channel count: 2
[    2.537297] EDAC MC0: Giving out device to module amd64_edac controller F17h_M60h: DEV 0000:00:18.3 (INTERRUPT)
[    2.537717] EDAC amd64: F17h_M60h detected (node 0).
[    2.538100] EDAC MC: UMC0 chip selects:
[    2.538101] EDAC amd64: MC: 0: 16384MB 1:     0MB
[    2.538471] EDAC amd64: MC: 2:     0MB 3:     0MB
[    2.538839] EDAC MC: UMC1 chip selects:
[    2.538840] EDAC amd64: MC: 0: 16384MB 1:     0MB
[    2.539199] EDAC amd64: MC: 2:     0MB 3:     0MB
[    2.539558] EDAC amd64: using x8 syndromes.
# cat /sys/devices/system/edac/mc/mc0/rank0/dimm_edac_mode
1 Like

I found this interesting document: BIOS and Kernel Developer’s Guide (BKDG) for AMD Family 15h Models 30h-3Fh Processors.

It predates the Zen architecture, but it says this about ECC:

The DRAM error correcting code features an ECC word formed by a symbol based code. The x4 code uses thirty-six 4-bit symbols to make a 144-bit ECC word made up of 128 data bits and 16 check bits.

The x4 code is a single symbol correcting (SSC) and a double symbol detecting (DSD) code. This means the x4 code is able to correct 100% of single symbol errors (any bit error combination within one symbol), and detect 100% of double symbol errors (any bit error combination within two symbols).

(Using Reed-Solomon codes maybe?) So it corrects up to 4 bit-errors if they are all within the same 4-bit symbol? I guess this is where the dmidecode-reported “Multi-bit ECC” comes from?

Later:

The error address maps to the two DIMMs composing the 128-bit line

Hmm, so what is done in a system with a single DIMM? And what if the DIMMs are on different channels, working on unrelated lines? (Or different subchannels as applied to DDR5? A 144-bit codeword made up of four transfers from the same DIMM with, say, a single stuck column, would be both uncorrectable and undetectable with this technique?) The questions just keep coming! :slight_smile:

It also distinguishes between error simulation and DRAM error injection, where the latter intends to “cause a discrepancy between the stored data and the stored ECC value.” It goes on:

Therefore, DRAM error injection is only possible on DRAM which supports ECC.

Interesting!

2 Likes

It’s in Table 67 of the 19h processor programming reference as well (for whatever reason I’m getting no 1Ah hits).

WriteDataPoisonErr. Read-write. Reset: 0. Data poison error. The system tried to write poison data to DRAM and either DRAM does not support ECC or UMC_CH.EccCtrl.WrEccEn is cleared.

L1, L2, L3, and PCIe ECC’s also poisonable. I’d expect to see the same for GDDR in RDNA documentation, though ECC GDDR6 starts with the W7700.

DDR4 and 5 ECC’s multi-transfer, I think, though perhaps not for UDIMMs. AMD appears cryptic for processors but the AMDC tech note suggests a 512+64 code for EC4 DDR4 RDIMMs. Subsequent documentation indicates AMDC remains available for EC4 DDR5, though probably superseded by bounded fault EC4 and EC8. I’m not having luck tying that back to Ryzen via EPYC 4004, though as a default I’d expect an EC4 block reused across IO dies. In AMD’s FPGA portfolio extended Hamming/Hsiao’s common at narrower widths.

AMDC and the bounded fault implementations seem likely Reed-Solomon, which enables 32-64 bit correction and appears minimally necessary to EC8 chipkill support. Criss et al. 2020 offer context on bounding, of which I think your stuck bit concern’s a subset. Hamburg et al.'s preprint may also be of interest, notably the remark about beyond bound correction in Skylake, but more for discussion of optimizing decoding across two transfers, motivations for lockstep, and comparison to other large codeword approaches.

2 Likes