Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 1 | EDAC - Error Detection And Correction |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 2 | ===================================== |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 3 | |
Borislav Petkov | e34217c | 2015-11-26 14:12:56 +0100 | [diff] [blame] | 4 | "bluesmoke" was the name for this device driver when it |
| 5 | was "out-of-tree" and maintained at sourceforge.net - |
| 6 | bluesmoke.sourceforge.net. That site is mostly archaic now and can be |
| 7 | used only for historical purposes. |
| 8 | |
| 9 | When the subsystem was pushed into 2.6.16 for the first time, it was |
| 10 | renamed to 'EDAC'. |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 11 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 12 | PURPOSE |
| 13 | ------- |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 14 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 15 | The 'edac' kernel module's goal is to detect and report hardware errors |
| 16 | that occur within the computer system running under linux. |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 17 | |
| 18 | MEMORY |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 19 | ------ |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 20 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 21 | Memory Correctable Errors (CE) and Uncorrectable Errors (UE) are the |
| 22 | primary errors being harvested. These types of errors are harvested by |
| 23 | the 'edac_mc' device. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 24 | |
| 25 | Detecting CE events, then harvesting those events and reporting them, |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 26 | *can* but must not necessarily be a predictor of future UE events. With |
| 27 | CE events only, the system can and will continue to operate as no data |
| 28 | has been damaged yet. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 29 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 30 | However, preventive maintenance and proactive part replacement of memory |
| 31 | DIMMs exhibiting CEs can reduce the likelihood of the dreaded UE events |
| 32 | and system panics. |
| 33 | |
| 34 | OTHER HARDWARE ELEMENTS |
| 35 | ----------------------- |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 36 | |
| 37 | A new feature for EDAC, the edac_device class of device, was added in |
| 38 | the 2.6.23 version of the kernel. |
| 39 | |
| 40 | This new device type allows for non-memory type of ECC hardware detectors |
| 41 | to have their states harvested and presented to userspace via the sysfs |
| 42 | interface. |
| 43 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 44 | Some architectures have ECC detectors for L1, L2 and L3 caches, |
| 45 | along with DMA engines, fabric switches, main data path switches, |
| 46 | interconnections, and various other hardware data paths. If the hardware |
| 47 | reports it, then a edac_device device probably can be constructed to |
| 48 | harvest and present that to userspace. |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 49 | |
| 50 | |
| 51 | PCI BUS SCANNING |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 52 | ---------------- |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 53 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 54 | In addition, PCI devices are scanned for PCI Bus Parity and SERR Errors |
| 55 | in order to determine if errors are occurring during data transfers. |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 56 | |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 57 | The presence of PCI Parity errors must be examined with a grain of salt. |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 58 | There are several add-in adapters that do *not* follow the PCI specification |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 59 | with regards to Parity generation and reporting. The specification says |
| 60 | the vendor should tie the parity status bits to 0 if they do not intend |
| 61 | to generate parity. Some vendors do not do this, and thus the parity bit |
| 62 | can "float" giving false positives. |
| 63 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 64 | There is a PCI device attribute located in sysfs that is checked by |
| 65 | the EDAC PCI scanning code. If that attribute is set, PCI parity/error |
| 66 | scanning is skipped for that device. The attribute is: |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 67 | |
| 68 | broken_parity_status |
| 69 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 70 | and is located in /sys/devices/pci<XXX>/0000:XX:YY.Z directories for |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 71 | PCI devices. |
| 72 | |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 73 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 74 | VERSIONING |
| 75 | ---------- |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 76 | |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 77 | EDAC is composed of a "core" module (edac_core.ko) and several Memory |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 78 | Controller (MC) driver modules. On a given system, the CORE is loaded |
| 79 | and one MC driver will be loaded. Both the CORE and the MC driver (or |
| 80 | edac_device driver) have individual versions that reflect current |
| 81 | release level of their respective modules. |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 82 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 83 | Thus, to "report" on what version a system is running, one must report |
| 84 | both the CORE's and the MC driver's versions. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 85 | |
| 86 | |
| 87 | LOADING |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 88 | ------- |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 89 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 90 | If 'edac' was statically linked with the kernel then no loading |
| 91 | is necessary. If 'edac' was built as modules then simply modprobe |
| 92 | the 'edac' pieces that you need. You should be able to modprobe |
| 93 | hardware-specific modules and have the dependencies load the necessary |
| 94 | core modules. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 95 | |
| 96 | Example: |
| 97 | |
| 98 | $> modprobe amd76x_edac |
| 99 | |
| 100 | loads both the amd76x_edac.ko memory controller module and the edac_mc.ko |
| 101 | core module. |
| 102 | |
| 103 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 104 | SYSFS INTERFACE |
| 105 | --------------- |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 106 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 107 | EDAC presents a 'sysfs' interface for control and reporting purposes. It |
| 108 | lives in the /sys/devices/system/edac directory. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 109 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 110 | Within this directory there currently reside 2 components: |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 111 | |
| 112 | mc memory controller(s) system |
Doug Thompson | 49c0dab7 | 2006-07-10 04:45:19 -0700 | [diff] [blame] | 113 | pci PCI control and status system |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 114 | |
| 115 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 116 | |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 117 | Memory Controller (mc) Model |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 118 | ---------------------------- |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 119 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 120 | Each 'mc' device controls a set of DIMM memory modules. These modules |
| 121 | are laid out in a Chip-Select Row (csrowX) and Channel table (chX). |
| 122 | There can be multiple csrows and multiple channels. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 123 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 124 | Memory controllers allow for several csrows, with 8 csrows being a |
| 125 | typical value. Yet, the actual number of csrows depends on the layout of |
| 126 | a given motherboard, memory controller and DIMM characteristics. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 127 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 128 | Dual channels allows for 128 bit data transfers to/from the CPU from/to |
| 129 | memory. Some newer chipsets allow for more than 2 channels, like Fully |
| 130 | Buffered DIMMs (FB-DIMMs). The following example will assume 2 channels: |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 131 | |
| 132 | |
| 133 | Channel 0 Channel 1 |
| 134 | =================================== |
| 135 | csrow0 | DIMM_A0 | DIMM_B0 | |
| 136 | csrow1 | DIMM_A0 | DIMM_B0 | |
| 137 | =================================== |
| 138 | |
| 139 | =================================== |
| 140 | csrow2 | DIMM_A1 | DIMM_B1 | |
| 141 | csrow3 | DIMM_A1 | DIMM_B1 | |
| 142 | =================================== |
| 143 | |
| 144 | In the above example table there are 4 physical slots on the motherboard |
| 145 | for memory DIMMs: |
| 146 | |
| 147 | DIMM_A0 |
| 148 | DIMM_B0 |
| 149 | DIMM_A1 |
| 150 | DIMM_B1 |
| 151 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 152 | Labels for these slots are usually silk-screened on the motherboard. |
| 153 | Slots labeled 'A' are channel 0 in this example. Slots labeled 'B' are |
| 154 | channel 1. Notice that there are two csrows possible on a physical DIMM. |
| 155 | These csrows are allocated their csrow assignment based on the slot into |
| 156 | which the memory DIMM is placed. Thus, when 1 DIMM is placed in each |
| 157 | Channel, the csrows cross both DIMMs. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 158 | |
| 159 | Memory DIMMs come single or dual "ranked". A rank is a populated csrow. |
| 160 | Thus, 2 single ranked DIMMs, placed in slots DIMM_A0 and DIMM_B0 above |
| 161 | will have 1 csrow, csrow0. csrow1 will be empty. On the other hand, |
Dave Peterson | f347981 | 2006-03-26 01:38:53 -0800 | [diff] [blame] | 162 | when 2 dual ranked DIMMs are similarly placed, then both csrow0 and |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 163 | csrow1 will be populated. The pattern repeats itself for csrow2 and |
| 164 | csrow3. |
| 165 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 166 | The representation of the above is reflected in the directory |
| 167 | tree in EDAC's sysfs interface. Starting in directory |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 168 | /sys/devices/system/edac/mc each memory controller will be represented |
Raoul Bhatia | 5989f11 | 2010-11-25 17:32:47 +0100 | [diff] [blame] | 169 | by its own 'mcX' directory, where 'X' is the index of the MC. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 170 | |
| 171 | |
| 172 | ..../edac/mc/ |
| 173 | | |
| 174 | |->mc0 |
| 175 | |->mc1 |
| 176 | |->mc2 |
| 177 | .... |
| 178 | |
| 179 | Under each 'mcX' directory each 'csrowX' is again represented by a |
Raoul Bhatia | 5989f11 | 2010-11-25 17:32:47 +0100 | [diff] [blame] | 180 | 'csrowX', where 'X' is the csrow index: |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 181 | |
| 182 | |
| 183 | .../mc/mc0/ |
| 184 | | |
| 185 | |->csrow0 |
| 186 | |->csrow2 |
| 187 | |->csrow3 |
| 188 | .... |
| 189 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 190 | Notice that there is no csrow1, which indicates that csrow0 is composed |
| 191 | of a single ranked DIMMs. This should also apply in both Channels, in |
| 192 | order to have dual-channel mode be operational. Since both csrow2 and |
| 193 | csrow3 are populated, this indicates a dual ranked set of DIMMs for |
| 194 | channels 0 and 1. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 195 | |
| 196 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 197 | Within each of the 'mcX' and 'csrowX' directories are several EDAC |
| 198 | control and attribute files. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 199 | |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 200 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 201 | 'mcX' directories |
| 202 | ----------------- |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 203 | |
| 204 | In 'mcX' directories are EDAC control and attribute files for |
Mauro Carvalho Chehab | 8b6f04c | 2012-04-17 08:53:34 -0300 | [diff] [blame] | 205 | this 'X' instance of the memory controllers. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 206 | |
Mauro Carvalho Chehab | 8b6f04c | 2012-04-17 08:53:34 -0300 | [diff] [blame] | 207 | For a description of the sysfs API, please see: |
Rami Rosen | 3aae9ed | 2015-06-19 09:18:34 +0300 | [diff] [blame] | 208 | Documentation/ABI/testing/sysfs-devices-edac |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 209 | |
| 210 | |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 211 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 212 | 'csrowX' directories |
| 213 | -------------------- |
| 214 | |
| 215 | When CONFIG_EDAC_LEGACY_SYSFS is enabled, sysfs will contain the csrowX |
| 216 | directories. As this API doesn't work properly for Rambus, FB-DIMMs and |
| 217 | modern Intel Memory Controllers, this is being deprecated in favor of |
| 218 | dimmX directories. |
Mauro Carvalho Chehab | 8b6f04c | 2012-04-17 08:53:34 -0300 | [diff] [blame] | 219 | |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 220 | In the 'csrowX' directories are EDAC control and attribute files for |
Raoul Bhatia | 5989f11 | 2010-11-25 17:32:47 +0100 | [diff] [blame] | 221 | this 'X' instance of csrow: |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 222 | |
| 223 | |
| 224 | Total Uncorrectable Errors count attribute file: |
| 225 | |
| 226 | 'ue_count' |
| 227 | |
| 228 | This attribute file displays the total count of uncorrectable |
| 229 | errors that have occurred on this csrow. If panic_on_ue is set |
| 230 | this counter will not have a chance to increment, since EDAC |
| 231 | will panic the system. |
| 232 | |
| 233 | |
| 234 | Total Correctable Errors count attribute file: |
| 235 | |
| 236 | 'ce_count' |
| 237 | |
| 238 | This attribute file displays the total count of correctable |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 239 | errors that have occurred on this csrow. This count is very |
| 240 | important to examine. CEs provide early indications that a |
| 241 | DIMM is beginning to fail. This count field should be |
| 242 | monitored for non-zero values and report such information |
| 243 | to the system administrator. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 244 | |
| 245 | |
| 246 | Total memory managed by this csrow attribute file: |
| 247 | |
| 248 | 'size_mb' |
| 249 | |
Rami Rosen | 3aae9ed | 2015-06-19 09:18:34 +0300 | [diff] [blame] | 250 | This attribute file displays, in count of megabytes, the memory |
Dave Peterson | f347981 | 2006-03-26 01:38:53 -0800 | [diff] [blame] | 251 | that this csrow contains. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 252 | |
| 253 | |
| 254 | Memory Type attribute file: |
| 255 | |
| 256 | 'mem_type' |
| 257 | |
| 258 | This attribute file will display what type of memory is currently |
| 259 | on this csrow. Normally, either buffered or unbuffered memory. |
Doug Thompson | 49c0dab7 | 2006-07-10 04:45:19 -0700 | [diff] [blame] | 260 | Examples: |
| 261 | Registered-DDR |
| 262 | Unbuffered-DDR |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 263 | |
| 264 | |
| 265 | EDAC Mode of operation attribute file: |
| 266 | |
| 267 | 'edac_mode' |
| 268 | |
| 269 | This attribute file will display what type of Error detection |
| 270 | and correction is being utilized. |
| 271 | |
| 272 | |
| 273 | Device type attribute file: |
| 274 | |
| 275 | 'dev_type' |
| 276 | |
Doug Thompson | 49c0dab7 | 2006-07-10 04:45:19 -0700 | [diff] [blame] | 277 | This attribute file will display what type of DRAM device is |
| 278 | being utilized on this DIMM. |
| 279 | Examples: |
| 280 | x1 |
| 281 | x2 |
| 282 | x4 |
| 283 | x8 |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 284 | |
| 285 | |
| 286 | Channel 0 CE Count attribute file: |
| 287 | |
| 288 | 'ch0_ce_count' |
| 289 | |
| 290 | This attribute file will display the count of CEs on this |
| 291 | DIMM located in channel 0. |
| 292 | |
| 293 | |
| 294 | Channel 0 UE Count attribute file: |
| 295 | |
| 296 | 'ch0_ue_count' |
| 297 | |
| 298 | This attribute file will display the count of UEs on this |
| 299 | DIMM located in channel 0. |
| 300 | |
| 301 | |
| 302 | Channel 0 DIMM Label control file: |
| 303 | |
| 304 | 'ch0_dimm_label' |
| 305 | |
| 306 | This control file allows this DIMM to have a label assigned |
| 307 | to it. With this label in the module, when errors occur |
| 308 | the output can provide the DIMM label in the system log. |
| 309 | This becomes vital for panic events to isolate the |
| 310 | cause of the UE event. |
| 311 | |
| 312 | DIMM Labels must be assigned after booting, with information |
| 313 | that correctly identifies the physical slot with its |
| 314 | silk screen label. This information is currently very |
| 315 | motherboard specific and determination of this information |
| 316 | must occur in userland at this time. |
| 317 | |
| 318 | |
| 319 | Channel 1 CE Count attribute file: |
| 320 | |
| 321 | 'ch1_ce_count' |
| 322 | |
| 323 | This attribute file will display the count of CEs on this |
| 324 | DIMM located in channel 1. |
| 325 | |
| 326 | |
| 327 | Channel 1 UE Count attribute file: |
| 328 | |
| 329 | 'ch1_ue_count' |
| 330 | |
| 331 | This attribute file will display the count of UEs on this |
| 332 | DIMM located in channel 0. |
| 333 | |
| 334 | |
| 335 | Channel 1 DIMM Label control file: |
| 336 | |
| 337 | 'ch1_dimm_label' |
| 338 | |
| 339 | This control file allows this DIMM to have a label assigned |
| 340 | to it. With this label in the module, when errors occur |
| 341 | the output can provide the DIMM label in the system log. |
| 342 | This becomes vital for panic events to isolate the |
| 343 | cause of the UE event. |
| 344 | |
| 345 | DIMM Labels must be assigned after booting, with information |
| 346 | that correctly identifies the physical slot with its |
| 347 | silk screen label. This information is currently very |
| 348 | motherboard specific and determination of this information |
| 349 | must occur in userland at this time. |
| 350 | |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 351 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 352 | |
| 353 | SYSTEM LOGGING |
| 354 | -------------- |
| 355 | |
| 356 | If logging for UEs and CEs is enabled, then system logs will contain |
| 357 | information indicating that errors have been detected: |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 358 | |
Doug Thompson | 49c0dab7 | 2006-07-10 04:45:19 -0700 | [diff] [blame] | 359 | EDAC MC0: CE page 0x283, offset 0xce0, grain 8, syndrome 0x6ec3, row 0, |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 360 | channel 1 "DIMM_B1": amd76x_edac |
| 361 | |
Doug Thompson | 49c0dab7 | 2006-07-10 04:45:19 -0700 | [diff] [blame] | 362 | EDAC MC0: CE page 0x1e5, offset 0xfb0, grain 8, syndrome 0xb741, row 0, |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 363 | channel 1 "DIMM_B1": amd76x_edac |
| 364 | |
| 365 | |
| 366 | The structure of the message is: |
| 367 | the memory controller (MC0) |
| 368 | Error type (CE) |
| 369 | memory page (0x283) |
| 370 | offset in the page (0xce0) |
| 371 | the byte granularity (grain 8) |
| 372 | or resolution of the error |
| 373 | the error syndrome (0xb741) |
| 374 | memory row (row 0) |
| 375 | memory channel (channel 1) |
| 376 | DIMM label, if set prior (DIMM B1 |
| 377 | and then an optional, driver-specific message that may |
| 378 | have additional information. |
| 379 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 380 | Both UEs and CEs with no info will lack all but memory controller, error |
| 381 | type, a notice of "no info" and then an optional, driver-specific error |
| 382 | message. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 383 | |
| 384 | |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 385 | PCI Bus Parity Detection |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 386 | ------------------------ |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 387 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 388 | On Header Type 00 devices, the primary status is looked at for any |
| 389 | parity error regardless of whether parity is enabled on the device or |
| 390 | not. (The spec indicates parity is generated in some cases). On Header |
| 391 | Type 01 bridges, the secondary status register is also looked at to see |
| 392 | if parity occurred on the bus on the other side of the bridge. |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 393 | |
| 394 | |
| 395 | SYSFS CONFIGURATION |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 396 | ------------------- |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 397 | |
| 398 | Under /sys/devices/system/edac/pci are control and attribute files as follows: |
| 399 | |
| 400 | |
| 401 | Enable/Disable PCI Parity checking control file: |
| 402 | |
| 403 | 'check_pci_parity' |
| 404 | |
| 405 | |
| 406 | This control file enables or disables the PCI Bus Parity scanning |
| 407 | operation. Writing a 1 to this file enables the scanning. Writing |
| 408 | a 0 to this file disables the scanning. |
| 409 | |
| 410 | Enable: |
| 411 | echo "1" >/sys/devices/system/edac/pci/check_pci_parity |
| 412 | |
| 413 | Disable: |
| 414 | echo "0" >/sys/devices/system/edac/pci/check_pci_parity |
| 415 | |
| 416 | |
Arthur Jones | 327dafb | 2008-07-25 01:49:10 -0700 | [diff] [blame] | 417 | Parity Count: |
| 418 | |
| 419 | 'pci_parity_count' |
| 420 | |
| 421 | This attribute file will display the number of parity errors that |
| 422 | have been detected. |
| 423 | |
| 424 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 425 | |
Arthur Jones | 327dafb | 2008-07-25 01:49:10 -0700 | [diff] [blame] | 426 | MODULE PARAMETERS |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 427 | ----------------- |
Arthur Jones | 327dafb | 2008-07-25 01:49:10 -0700 | [diff] [blame] | 428 | |
| 429 | Panic on UE control file: |
| 430 | |
| 431 | 'edac_mc_panic_on_ue' |
| 432 | |
| 433 | An uncorrectable error will cause a machine panic. This is usually |
| 434 | desirable. It is a bad idea to continue when an uncorrectable error |
| 435 | occurs - it is indeterminate what was uncorrected and the operating |
| 436 | system context might be so mangled that continuing will lead to further |
| 437 | corruption. If the kernel has MCE configured, then EDAC will never |
| 438 | notice the UE. |
| 439 | |
| 440 | LOAD TIME: module/kernel parameter: edac_mc_panic_on_ue=[0|1] |
| 441 | |
| 442 | RUN TIME: echo "1" > /sys/module/edac_core/parameters/edac_mc_panic_on_ue |
| 443 | |
| 444 | |
| 445 | Log UE control file: |
| 446 | |
| 447 | 'edac_mc_log_ue' |
| 448 | |
| 449 | Generate kernel messages describing uncorrectable errors. These errors |
| 450 | are reported through the system message log system. UE statistics |
| 451 | will be accumulated even when UE logging is disabled. |
| 452 | |
| 453 | LOAD TIME: module/kernel parameter: edac_mc_log_ue=[0|1] |
| 454 | |
| 455 | RUN TIME: echo "1" > /sys/module/edac_core/parameters/edac_mc_log_ue |
| 456 | |
| 457 | |
| 458 | Log CE control file: |
| 459 | |
| 460 | 'edac_mc_log_ce' |
| 461 | |
| 462 | Generate kernel messages describing correctable errors. These |
| 463 | errors are reported through the system message log system. |
| 464 | CE statistics will be accumulated even when CE logging is disabled. |
| 465 | |
| 466 | LOAD TIME: module/kernel parameter: edac_mc_log_ce=[0|1] |
| 467 | |
| 468 | RUN TIME: echo "1" > /sys/module/edac_core/parameters/edac_mc_log_ce |
| 469 | |
| 470 | |
| 471 | Polling period control file: |
| 472 | |
| 473 | 'edac_mc_poll_msec' |
| 474 | |
| 475 | The time period, in milliseconds, for polling for error information. |
| 476 | Too small a value wastes resources. Too large a value might delay |
| 477 | necessary handling of errors and might loose valuable information for |
| 478 | locating the error. 1000 milliseconds (once each second) is the current |
| 479 | default. Systems which require all the bandwidth they can get, may |
| 480 | increase this. |
| 481 | |
| 482 | LOAD TIME: module/kernel parameter: edac_mc_poll_msec=[0|1] |
| 483 | |
| 484 | RUN TIME: echo "1000" > /sys/module/edac_core/parameters/edac_mc_poll_msec |
| 485 | |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 486 | |
| 487 | Panic on PCI PARITY Error: |
| 488 | |
| 489 | 'panic_on_pci_parity' |
| 490 | |
| 491 | |
Rami Rosen | 3aae9ed | 2015-06-19 09:18:34 +0300 | [diff] [blame] | 492 | This control file enables or disables panicking when a parity |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 493 | error has been detected. |
| 494 | |
| 495 | |
Arthur Jones | 327dafb | 2008-07-25 01:49:10 -0700 | [diff] [blame] | 496 | module/kernel parameter: edac_panic_on_pci_pe=[0|1] |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 497 | |
| 498 | Enable: |
Arthur Jones | 327dafb | 2008-07-25 01:49:10 -0700 | [diff] [blame] | 499 | echo "1" > /sys/module/edac_core/parameters/edac_panic_on_pci_pe |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 500 | |
| 501 | Disable: |
Arthur Jones | 327dafb | 2008-07-25 01:49:10 -0700 | [diff] [blame] | 502 | echo "0" > /sys/module/edac_core/parameters/edac_panic_on_pci_pe |
Alan Cox | da9bb1d | 2006-01-18 17:44:13 -0800 | [diff] [blame] | 503 | |
| 504 | |
| 505 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 506 | EDAC device type |
| 507 | ---------------- |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 508 | |
| 509 | In the header file, edac_core.h, there is a series of edac_device structures |
| 510 | and APIs for the EDAC_DEVICE. |
| 511 | |
| 512 | User space access to an edac_device is through the sysfs interface. |
| 513 | |
| 514 | At the location /sys/devices/system/edac (sysfs) new edac_device devices will |
| 515 | appear. |
| 516 | |
| 517 | There is a three level tree beneath the above 'edac' directory. For example, |
| 518 | the 'test_device_edac' device (found at the bluesmoke.sourceforget.net website) |
| 519 | installs itself as: |
| 520 | |
| 521 | /sys/devices/systm/edac/test-instance |
| 522 | |
| 523 | in this directory are various controls, a symlink and one or more 'instance' |
Carlos Garcia | c98be0c | 2014-04-04 22:31:00 -0400 | [diff] [blame] | 524 | directories. |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 525 | |
| 526 | The standard default controls are: |
| 527 | |
| 528 | log_ce boolean to log CE events |
| 529 | log_ue boolean to log UE events |
| 530 | panic_on_ue boolean to 'panic' the system if an UE is encountered |
| 531 | (default off, can be set true via startup script) |
| 532 | poll_msec time period between POLL cycles for events |
| 533 | |
| 534 | The test_device_edac device adds at least one of its own custom control: |
| 535 | |
| 536 | test_bits which in the current test driver does nothing but |
| 537 | show how it is installed. A ported driver can |
| 538 | add one or more such controls and/or attributes |
| 539 | for specific uses. |
| 540 | One out-of-tree driver uses controls here to allow |
| 541 | for ERROR INJECTION operations to hardware |
| 542 | injection registers |
| 543 | |
| 544 | The symlink points to the 'struct dev' that is registered for this edac_device. |
| 545 | |
| 546 | INSTANCES |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 547 | --------- |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 548 | |
| 549 | One or more instance directories are present. For the 'test_device_edac' case: |
| 550 | |
| 551 | test-instance0 |
| 552 | |
| 553 | |
| 554 | In this directory there are two default counter attributes, which are totals of |
| 555 | counter in deeper subdirectories. |
| 556 | |
| 557 | ce_count total of CE events of subdirectories |
| 558 | ue_count total of UE events of subdirectories |
| 559 | |
| 560 | BLOCKS |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 561 | ------ |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 562 | |
| 563 | At the lowest directory level is the 'block' directory. There can be 0, 1 |
| 564 | or more blocks specified in each instance. |
| 565 | |
| 566 | test-block0 |
| 567 | |
| 568 | |
| 569 | In this directory the default attributes are: |
| 570 | |
| 571 | ce_count which is counter of CE events for this 'block' |
| 572 | of hardware being monitored |
| 573 | ue_count which is counter of UE events for this 'block' |
| 574 | of hardware being monitored |
| 575 | |
| 576 | |
| 577 | The 'test_device_edac' device adds 4 attributes and 1 control: |
| 578 | |
| 579 | test-block-bits-0 for every POLL cycle this counter |
| 580 | is incremented |
| 581 | test-block-bits-1 every 10 cycles, this counter is bumped once, |
| 582 | and test-block-bits-0 is set to 0 |
| 583 | test-block-bits-2 every 100 cycles, this counter is bumped once, |
| 584 | and test-block-bits-1 is set to 0 |
| 585 | test-block-bits-3 every 1000 cycles, this counter is bumped once, |
| 586 | and test-block-bits-2 is set to 0 |
| 587 | |
| 588 | |
| 589 | reset-counters writing ANY thing to this control will |
| 590 | reset all the above counters. |
| 591 | |
| 592 | |
Rami Rosen | 3aae9ed | 2015-06-19 09:18:34 +0300 | [diff] [blame] | 593 | Use of the 'test_device_edac' driver should enable any others to create their own |
Doug Thompson | 87f24c3 | 2007-07-19 01:50:34 -0700 | [diff] [blame] | 594 | unique drivers for their hardware systems. |
| 595 | |
| 596 | The 'test_device_edac' sample driver is located at the |
| 597 | bluesmoke.sourceforge.net project site for EDAC. |
| 598 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 599 | |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 600 | NEHALEM USAGE OF EDAC APIs |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 601 | -------------------------- |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 602 | |
| 603 | This chapter documents some EXPERIMENTAL mappings for EDAC API to handle |
| 604 | Nehalem EDAC driver. They will likely be changed on future versions |
| 605 | of the driver. |
| 606 | |
| 607 | Due to the way Nehalem exports Memory Controller data, some adjustments |
| 608 | were done at i7core_edac driver. This chapter will cover those differences |
| 609 | |
Rami Rosen | 3aae9ed | 2015-06-19 09:18:34 +0300 | [diff] [blame] | 610 | 1) On Nehalem, there is one Memory Controller per Quick Patch Interconnect |
Mauro Carvalho Chehab | c344436 | 2009-09-05 05:10:15 -0300 | [diff] [blame] | 611 | (QPI). At the driver, the term "socket" means one QPI. This is |
| 612 | associated with a physical CPU socket. |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 613 | |
| 614 | Each MC have 3 physical read channels, 3 physical write channels and |
Masanari Iida | c94bed8e | 2012-04-10 00:22:13 +0900 | [diff] [blame] | 615 | 3 logic channels. The driver currently sees it as just 3 channels. |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 616 | Each channel can have up to 3 DIMMs. |
| 617 | |
| 618 | The minimum known unity is DIMMs. There are no information about csrows. |
Rami Rosen | 3aae9ed | 2015-06-19 09:18:34 +0300 | [diff] [blame] | 619 | As EDAC API maps the minimum unity is csrows, the driver sequentially |
Mauro Carvalho Chehab | c344436 | 2009-09-05 05:10:15 -0300 | [diff] [blame] | 620 | maps channel/dimm into different csrows. |
| 621 | |
Lucas De Marchi | 25985ed | 2011-03-30 22:57:33 -0300 | [diff] [blame] | 622 | For example, supposing the following layout: |
Mauro Carvalho Chehab | c344436 | 2009-09-05 05:10:15 -0300 | [diff] [blame] | 623 | Ch0 phy rd0, wr0 (0x063f4031): 2 ranks, UDIMMs |
| 624 | dimm 0 1024 Mb offset: 0, bank: 8, rank: 1, row: 0x4000, col: 0x400 |
| 625 | dimm 1 1024 Mb offset: 4, bank: 8, rank: 1, row: 0x4000, col: 0x400 |
| 626 | Ch1 phy rd1, wr1 (0x063f4031): 2 ranks, UDIMMs |
| 627 | dimm 0 1024 Mb offset: 0, bank: 8, rank: 1, row: 0x4000, col: 0x400 |
| 628 | Ch2 phy rd3, wr3 (0x063f4031): 2 ranks, UDIMMs |
| 629 | dimm 0 1024 Mb offset: 0, bank: 8, rank: 1, row: 0x4000, col: 0x400 |
| 630 | The driver will map it as: |
| 631 | csrow0: channel 0, dimm0 |
| 632 | csrow1: channel 0, dimm1 |
| 633 | csrow2: channel 1, dimm0 |
| 634 | csrow3: channel 2, dimm0 |
| 635 | |
| 636 | exports one |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 637 | DIMM per csrow. |
| 638 | |
Mauro Carvalho Chehab | c344436 | 2009-09-05 05:10:15 -0300 | [diff] [blame] | 639 | Each QPI is exported as a different memory controller. |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 640 | |
Rami Rosen | 3aae9ed | 2015-06-19 09:18:34 +0300 | [diff] [blame] | 641 | 2) Nehalem MC has the ability to generate errors. The driver implements this |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 642 | functionality via some error injection nodes: |
| 643 | |
| 644 | For injecting a memory error, there are some sysfs nodes, under |
Mauro Carvalho Chehab | c344436 | 2009-09-05 05:10:15 -0300 | [diff] [blame] | 645 | /sys/devices/system/edac/mc/mc?/: |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 646 | |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 647 | inject_addrmatch/*: |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 648 | Controls the error injection mask register. It is possible to specify |
| 649 | several characteristics of the address to match an error code: |
| 650 | dimm = the affected dimm. Numbers are relative to a channel; |
| 651 | rank = the memory rank; |
| 652 | channel = the channel that will generate an error; |
| 653 | bank = the affected bank; |
| 654 | page = the page address; |
| 655 | column (or col) = the address column. |
| 656 | each of the above values can be set to "any" to match any valid value. |
| 657 | |
| 658 | At driver init, all values are set to any. |
| 659 | |
| 660 | For example, to generate an error at rank 1 of dimm 2, for any channel, |
| 661 | any bank, any page, any column: |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 662 | echo 2 >/sys/devices/system/edac/mc/mc0/inject_addrmatch/dimm |
| 663 | echo 1 >/sys/devices/system/edac/mc/mc0/inject_addrmatch/rank |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 664 | |
| 665 | To return to the default behaviour of matching any, you can do: |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 666 | echo any >/sys/devices/system/edac/mc/mc0/inject_addrmatch/dimm |
| 667 | echo any >/sys/devices/system/edac/mc/mc0/inject_addrmatch/rank |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 668 | |
| 669 | inject_eccmask: |
| 670 | specifies what bits will have troubles, |
| 671 | |
| 672 | inject_section: |
| 673 | specifies what ECC cache section will get the error: |
| 674 | 3 for both |
| 675 | 2 for the highest |
| 676 | 1 for the lowest |
| 677 | |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 678 | inject_type: |
| 679 | specifies the type of error, being a combination of the following bits: |
| 680 | bit 0 - repeat |
| 681 | bit 1 - ecc |
| 682 | bit 2 - parity |
| 683 | |
| 684 | inject_enable starts the error generation when something different |
| 685 | than 0 is written. |
| 686 | |
| 687 | All inject vars can be read. root permission is needed for write. |
| 688 | |
| 689 | Datasheet states that the error will only be generated after a write on an |
| 690 | address that matches inject_addrmatch. It seems, however, that reading will |
| 691 | also produce an error. |
| 692 | |
| 693 | For example, the following code will generate an error for any write access |
| 694 | at socket 0, on any DIMM/address on channel 2: |
| 695 | |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 696 | echo 2 >/sys/devices/system/edac/mc/mc0/inject_addrmatch/channel |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 697 | echo 2 >/sys/devices/system/edac/mc/mc0/inject_type |
| 698 | echo 64 >/sys/devices/system/edac/mc/mc0/inject_eccmask |
| 699 | echo 3 >/sys/devices/system/edac/mc/mc0/inject_section |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 700 | echo 1 >/sys/devices/system/edac/mc/mc0/inject_enable |
| 701 | dd if=/dev/mem of=/dev/null seek=16k bs=4k count=1 >& /dev/null |
| 702 | |
Mauro Carvalho Chehab | c344436 | 2009-09-05 05:10:15 -0300 | [diff] [blame] | 703 | For socket 1, it is needed to replace "mc0" by "mc1" at the above |
| 704 | commands. |
| 705 | |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 706 | The generated error message will look like: |
| 707 | |
| 708 | EDAC MC0: UE row 0, channel-a= 0 channel-b= 0 labels "-": NON_FATAL (addr = 0x0075b980, socket=0, Dimm=0, Channel=2, syndrome=0x00000040, count=1, Err=8c0000400001009f:4000080482 (read error: read ECC error)) |
| 709 | |
| 710 | 3) Nehalem specific Corrected Error memory counters |
| 711 | |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 712 | Nehalem have some registers to count memory errors. The driver uses those |
| 713 | registers to report Corrected Errors on devices with Registered Dimms. |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 714 | |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 715 | However, those counters don't work with Unregistered Dimms. As the chipset |
| 716 | offers some counters that also work with UDIMMS (but with a worse level of |
| 717 | granularity than the default ones), the driver exposes those registers for |
| 718 | UDIMM memories. |
Mauro Carvalho Chehab | c344436 | 2009-09-05 05:10:15 -0300 | [diff] [blame] | 719 | |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 720 | They can be read by looking at the contents of all_channel_counts/ |
Mauro Carvalho Chehab | 31983a0 | 2009-08-05 21:16:56 -0300 | [diff] [blame] | 721 | |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 722 | $ for i in /sys/devices/system/edac/mc/mc0/all_channel_counts/*; do echo $i; cat $i; done |
| 723 | /sys/devices/system/edac/mc/mc0/all_channel_counts/udimm0 |
| 724 | 0 |
| 725 | /sys/devices/system/edac/mc/mc0/all_channel_counts/udimm1 |
| 726 | 0 |
| 727 | /sys/devices/system/edac/mc/mc0/all_channel_counts/udimm2 |
| 728 | 0 |
Mauro Carvalho Chehab | c344436 | 2009-09-05 05:10:15 -0300 | [diff] [blame] | 729 | |
| 730 | What happens here is that errors on different csrows, but at the same |
| 731 | dimm number will increment the same counter. |
| 732 | So, in this memory mapping: |
| 733 | csrow0: channel 0, dimm0 |
| 734 | csrow1: channel 0, dimm1 |
| 735 | csrow2: channel 1, dimm0 |
| 736 | csrow3: channel 2, dimm0 |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 737 | The hardware will increment udimm0 for an error at the first dimm at either |
| 738 | csrow0, csrow2 or csrow3; |
| 739 | The hardware will increment udimm1 for an error at the second dimm at either |
| 740 | csrow0, csrow2 or csrow3; |
| 741 | The hardware will increment udimm2 for an error at the third dimm at either |
| 742 | csrow0, csrow2 or csrow3; |
Mauro Carvalho Chehab | c344436 | 2009-09-05 05:10:15 -0300 | [diff] [blame] | 743 | |
| 744 | 4) Standard error counters |
| 745 | |
| 746 | The standard error counters are generated when an mcelog error is received |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 747 | by the driver. Since, with udimm, this is counted by software, it is |
Rami Rosen | 3aae9ed | 2015-06-19 09:18:34 +0300 | [diff] [blame] | 748 | possible that some errors could be lost. With rdimm's, they display the |
Mauro Carvalho Chehab | 35be954 | 2009-09-24 17:28:50 -0300 | [diff] [blame] | 749 | contents of the registers |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 750 | |
Aravind Gopalakrishnan | 6b7464b | 2015-09-28 06:44:31 -0500 | [diff] [blame] | 751 | AMD64_EDAC REFERENCE DOCUMENTS USED |
| 752 | ----------------------------------- |
| 753 | amd64_edac module is based on the following documents |
| 754 | (available from http://support.amd.com/en-us/search/tech-docs): |
| 755 | |
| 756 | 1. Title: BIOS and Kernel Developer's Guide for AMD Athlon 64 and AMD |
| 757 | Opteron Processors |
| 758 | AMD publication #: 26094 |
| 759 | Revision: 3.26 |
| 760 | Link: http://support.amd.com/TechDocs/26094.PDF |
| 761 | |
| 762 | 2. Title: BIOS and Kernel Developer's Guide for AMD NPT Family 0Fh |
| 763 | Processors |
| 764 | AMD publication #: 32559 |
| 765 | Revision: 3.00 |
| 766 | Issue Date: May 2006 |
| 767 | Link: http://support.amd.com/TechDocs/32559.pdf |
| 768 | |
| 769 | 3. Title: BIOS and Kernel Developer's Guide (BKDG) For AMD Family 10h |
| 770 | Processors |
| 771 | AMD publication #: 31116 |
| 772 | Revision: 3.00 |
| 773 | Issue Date: September 07, 2007 |
| 774 | Link: http://support.amd.com/TechDocs/31116.pdf |
| 775 | |
| 776 | 4. Title: BIOS and Kernel Developer's Guide (BKDG) for AMD Family 15h |
| 777 | Models 30h-3Fh Processors |
| 778 | AMD publication #: 49125 |
| 779 | Revision: 3.06 |
| 780 | Issue Date: 2/12/2015 (latest release) |
| 781 | Link: http://support.amd.com/TechDocs/49125_15h_Models_30h-3Fh_BKDG.pdf |
| 782 | |
| 783 | 5. Title: BIOS and Kernel Developer's Guide (BKDG) for AMD Family 15h |
| 784 | Models 60h-6Fh Processors |
| 785 | AMD publication #: 50742 |
| 786 | Revision: 3.01 |
| 787 | Issue Date: 7/23/2015 (latest release) |
| 788 | Link: http://support.amd.com/TechDocs/50742_15h_Models_60h-6Fh_BKDG.pdf |
| 789 | |
| 790 | 6. Title: BIOS and Kernel Developer's Guide (BKDG) for AMD Family 16h |
| 791 | Models 00h-0Fh Processors |
| 792 | AMD publication #: 48751 |
| 793 | Revision: 3.03 |
| 794 | Issue Date: 2/23/2015 (latest release) |
| 795 | Link: http://support.amd.com/TechDocs/48751_16h_bkdg.pdf |
| 796 | |
Borislav Petkov | 043b431 | 2015-06-19 11:47:17 +0200 | [diff] [blame] | 797 | CREDITS: |
| 798 | ======== |
| 799 | |
| 800 | Written by Doug Thompson <dougthompson@xmission.com> |
| 801 | 7 Dec 2005 |
| 802 | 17 Jul 2007 Updated |
| 803 | |
| 804 | (c) Mauro Carvalho Chehab |
| 805 | 05 Aug 2009 Nehalem interface |
| 806 | |
| 807 | EDAC authors/maintainers: |
| 808 | |
| 809 | Doug Thompson, Dave Jiang, Dave Peterson et al, |
| 810 | Mauro Carvalho Chehab |
| 811 | Borislav Petkov |
| 812 | original author: Thayne Harbaugh |