diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2009-06-25 13:32:38 -0400 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2009-09-14 12:57:48 -0400 |
commit | b70ef01016850de87b9a28a6af19fed8801df076 (patch) | |
tree | 78159c6e177c5557f2cc9342f8bc0833645d8da5 /drivers/edac/edac_mce_amd.c | |
parent | 74fca6a42863ffacaf7ba6f1936a9f228950f657 (diff) |
EDAC: move MCE error descriptions to EDAC core
This is in preparation of adding AMD-specific MCE decoding functionality
to the EDAC core. The error decoding macros originate from the AMD64
EDAC driver albeit in a simplified and cleaned up version here.
While at it, add macros to generate the error description strings and
use them in the error type decoders directly which removes a bunch of
code and makes the decoding functions much more readable. Also, fix
strings and shorten macro names.
Remove superfluous htlink_msgs.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac/edac_mce_amd.c')
-rw-r--r-- | drivers/edac/edac_mce_amd.c | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/drivers/edac/edac_mce_amd.c b/drivers/edac/edac_mce_amd.c new file mode 100644 index 000000000000..cf8465450b32 --- /dev/null +++ b/drivers/edac/edac_mce_amd.c | |||
@@ -0,0 +1,101 @@ | |||
1 | #include <linux/module.h> | ||
2 | #include "edac_mce_amd.h" | ||
3 | |||
4 | /* | ||
5 | * string representation for the different MCA reported error types, see F3x48 | ||
6 | * or MSR0000_0411. | ||
7 | */ | ||
8 | const char *tt_msgs[] = { /* transaction type */ | ||
9 | "instruction", | ||
10 | "data", | ||
11 | "generic", | ||
12 | "reserved" | ||
13 | }; | ||
14 | EXPORT_SYMBOL_GPL(tt_msgs); | ||
15 | |||
16 | const char *ll_msgs[] = { /* cache level */ | ||
17 | "L0", | ||
18 | "L1", | ||
19 | "L2", | ||
20 | "L3/generic" | ||
21 | }; | ||
22 | EXPORT_SYMBOL_GPL(ll_msgs); | ||
23 | |||
24 | const char *rrrr_msgs[] = { | ||
25 | "generic", | ||
26 | "generic read", | ||
27 | "generic write", | ||
28 | "data read", | ||
29 | "data write", | ||
30 | "inst fetch", | ||
31 | "prefetch", | ||
32 | "evict", | ||
33 | "snoop", | ||
34 | "reserved RRRR= 9", | ||
35 | "reserved RRRR= 10", | ||
36 | "reserved RRRR= 11", | ||
37 | "reserved RRRR= 12", | ||
38 | "reserved RRRR= 13", | ||
39 | "reserved RRRR= 14", | ||
40 | "reserved RRRR= 15" | ||
41 | }; | ||
42 | EXPORT_SYMBOL_GPL(rrrr_msgs); | ||
43 | |||
44 | const char *pp_msgs[] = { /* participating processor */ | ||
45 | "local node originated (SRC)", | ||
46 | "local node responded to request (RES)", | ||
47 | "local node observed as 3rd party (OBS)", | ||
48 | "generic" | ||
49 | }; | ||
50 | EXPORT_SYMBOL_GPL(pp_msgs); | ||
51 | |||
52 | const char *to_msgs[] = { | ||
53 | "no timeout", | ||
54 | "timed out" | ||
55 | }; | ||
56 | EXPORT_SYMBOL_GPL(to_msgs); | ||
57 | |||
58 | const char *ii_msgs[] = { /* memory or i/o */ | ||
59 | "mem access", | ||
60 | "reserved", | ||
61 | "i/o access", | ||
62 | "generic" | ||
63 | }; | ||
64 | EXPORT_SYMBOL_GPL(ii_msgs); | ||
65 | |||
66 | /* Map the 5 bits of Extended Error code to the string table. */ | ||
67 | const char *ext_msgs[] = { /* extended error */ | ||
68 | "K8 ECC error/F10 reserved", /* 0_0000b */ | ||
69 | "CRC error", /* 0_0001b */ | ||
70 | "sync error", /* 0_0010b */ | ||
71 | "mst abort", /* 0_0011b */ | ||
72 | "tgt abort", /* 0_0100b */ | ||
73 | "GART error", /* 0_0101b */ | ||
74 | "RMW error", /* 0_0110b */ | ||
75 | "Wdog timer error", /* 0_0111b */ | ||
76 | "F10-ECC/K8-Chipkill error", /* 0_1000b */ | ||
77 | "DEV Error", /* 0_1001b */ | ||
78 | "Link Data error", /* 0_1010b */ | ||
79 | "Link or L3 Protocol error", /* 0_1011b */ | ||
80 | "NB Array error", /* 0_1100b */ | ||
81 | "DRAM Parity error", /* 0_1101b */ | ||
82 | "Link Retry/GART Table Walk/DEV Table Walk error", /* 0_1110b */ | ||
83 | "Res 0x0ff error", /* 0_1111b */ | ||
84 | "Res 0x100 error", /* 1_0000b */ | ||
85 | "Res 0x101 error", /* 1_0001b */ | ||
86 | "Res 0x102 error", /* 1_0010b */ | ||
87 | "Res 0x103 error", /* 1_0011b */ | ||
88 | "Res 0x104 error", /* 1_0100b */ | ||
89 | "Res 0x105 error", /* 1_0101b */ | ||
90 | "Res 0x106 error", /* 1_0110b */ | ||
91 | "Res 0x107 error", /* 1_0111b */ | ||
92 | "Res 0x108 error", /* 1_1000b */ | ||
93 | "Res 0x109 error", /* 1_1001b */ | ||
94 | "Res 0x10A error", /* 1_1010b */ | ||
95 | "Res 0x10B error", /* 1_1011b */ | ||
96 | "L3 Cache Data error", /* 1_1100b */ | ||
97 | "L3 CacheTag error", /* 1_1101b */ | ||
98 | "L3 Cache LRU error", /* 1_1110b */ | ||
99 | "Res 0x1FF error" /* 1_1111b */ | ||
100 | }; | ||
101 | EXPORT_SYMBOL_GPL(ext_msgs); | ||