ECC enabled?

Recently I ordered a new workstation from Alternate to replace my (slightly) aging Core 2 Duo based system. After the positive experience with my Xeon E3 based Dell PowerEdge T110-II I decided to get another Xeon E3 based machine. I chose an Asus P8C-WS motherboard, which is based on the Intel C216 chipset. This chipset supports USB 3.0, SATA 6 Gbps and ECC memory. For extra reliability I got 16 GiB of Kingston ECC memory. On first boot I immediately noticed that the BIOS Setup didn't have an option to enable ECC, nor was it showing whether ECC is enabled. After updating the BIOS to the latest version an ECC option became available, but it can only be set to "automatic" and "disabled".

Not trusting "automatic", it still wasn't clear whether ECC really is enabled. I then decided to check the Intel datasheet for the 3rd generation Core processor to identify the register that controls the ECC functionality. It turns out there are two registers controlling this, one for each memory channel. I then programmed a simple Linux C program to read these registers (directly via /dev/mem). It turns out the ECC functionality is enabled on my system when set to "automatic" in the BIOS setup.

The source code for the tool is available in the downloads section of this website. You can compile it with:

gcc -Wall c2xx_memory_status.c -o c2xx_memory_status

You can then run it as root, the output should look something like this:

Intel C2xx memory status

Channel 0
-------------------------------------------------------------------------------
Size of DIMM A:            4096 MiB
Size of DIMM B:            4096 MiB
DIMM A DDR width:          X8 chips
DIMM B DDR width:          X8 chips
DIMM A number of ranks:    Dual rank
DIMM B number of ranks:    Dual rank
DIMM A select:             DIMM 0
Enhanced Interleave Mode:  On
Rank Interleave:           On
ECC:                       On
Error status:              No ECC errors detected

Channel 1
-------------------------------------------------------------------------------
Size of DIMM A:            4096 MiB
Size of DIMM B:            4096 MiB
DIMM A DDR width:          X8 chips
DIMM B DDR width:          X8 chips
DIMM A number of ranks:    Dual rank
DIMM B number of ranks:    Dual rank
DIMM A select:             DIMM 0
Enhanced Interleave Mode:  On
Rank Interleave:           On
ECC:                       On
Error status:              No ECC errors detected
Posted: 2013-02-06 keywords: programming, hardware