Guy noticed that on his ASRock X570M PRO4 motherboard, and AMD Ryzen 7 PRO 5750G APU, the ECC reporting was broken. I don’t personally have this setup, but I know some of you were looking to use recent Ryzen Pros with ECC ram.
After all this trouble, to my surprise, ECC did not work out of the box. I could not get ECC statistics:
edac-util: Error: No memory controller data found.
This error happens because the kernel module
amd64_edac.kofails to load:
$ modprobe amd64_edac
modprobe: ERROR: could not insert 'amd64_edac': No such device
Turns out the ECC reporting PCIe device ID is showing up in an unexpected location.
He created a patch which fixes it. It’s also a nice well documented example of finding and fixing issues in the kernel. Marc Bevand hasn’t officially submitted the patch yet, but plans to do so.