aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/amd64_edac.h
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2009-09-24 05:05:30 -0400
committerBorislav Petkov <borislav.petkov@amd.com>2009-10-07 10:51:28 -0400
commit94baaee4947d84809b289d5ca03677525ffc6da9 (patch)
tree61134e2d9fc2e639d4dfc4ec50f90730d2f21f75 /drivers/edac/amd64_edac.h
parent66216a7a15e75d517dddd0ac6514924b15071e4c (diff)
amd64_edac: beef up DRAM error injection
When injecting DRAM ECC errors (F3xBC_x8), EccVector[15:0] is a bitmask of which bits should be error injected when written to and holds the payload of 16-bit DRAM word when read, respectively. Add /sysfs members to show the DRAM ECC section/word/vector. Fail wrong injection values entered over /sysfs instead of truncating them. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/amd64_edac.h')
-rw-r--r--drivers/edac/amd64_edac.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index 64193927a05a..c6f359a85207 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -372,13 +372,11 @@ enum {
372 372
373#define SET_NB_DRAM_INJECTION_WRITE(word, bits) \ 373#define SET_NB_DRAM_INJECTION_WRITE(word, bits) \
374 (BIT(((word) & 0xF) + 20) | \ 374 (BIT(((word) & 0xF) + 20) | \
375 BIT(17) | \ 375 BIT(17) | bits)
376 ((bits) & 0xF))
377 376
378#define SET_NB_DRAM_INJECTION_READ(word, bits) \ 377#define SET_NB_DRAM_INJECTION_READ(word, bits) \
379 (BIT(((word) & 0xF) + 20) | \ 378 (BIT(((word) & 0xF) + 20) | \
380 BIT(16) | \ 379 BIT(16) | bits)
381 ((bits) & 0xF))
382 380
383#define K8_NBCAP 0xE8 381#define K8_NBCAP 0xE8
384#define K8_NBCAP_CORES (BIT(12)|BIT(13)) 382#define K8_NBCAP_CORES (BIT(12)|BIT(13))