Skip to content

Commit cd6a81d

Browse files
yghannamjfvogel
authored andcommitted
x86/MCE/AMD, EDAC/mce_amd: Add new McaTypes for CS, PSP, and SMU units
The existing CS, PSP, and SMU SMCA bank types will see new versions (as indicated by their McaTypes) in future SMCA systems. Add the new (HWID, MCATYPE) tuples for these new versions. Reuse the same names as the older versions, since they are logically the same to the user. SMCA systems won't mix and match IP blocks with different McaType versions in the same system, so there isn't a need to distinguish them. The MCA_IPID register is saved when logging an MCA error, and that can be used to triage the error. Also, add the new error descriptions to edac_mce_amd. Some error types (positions in the list) are overloaded compared to the previous McaTypes. Therefore, just create new lists of the error descriptions to keep things simple even if some of the error descriptions are the same between versions. Signed-off-by: Yazen Ghannam <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Kees Cook <[email protected]> Cc: linux-edac <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Pu Wen <[email protected]> Cc: Qiuxu Zhuo <[email protected]> Cc: Shirish S <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Tony Luck <[email protected]> Cc: Vishal Verma <[email protected]> Cc: x86-ml <[email protected]> Link: https://lkml.kernel.org/r/[email protected] (cherry picked from commit 3ad7e74) Orabug: 29547647 Signed-off-by: Somasundaram Krishnasamy <[email protected]> Reviewed-by: John Donnelly <[email protected]>
1 parent 5537b44 commit cd6a81d

File tree

3 files changed

+64
-0
lines changed

3 files changed

+64
-0
lines changed

arch/x86/include/asm/mce.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,11 +302,14 @@ enum smca_bank_types {
302302
SMCA_FP, /* Floating Point */
303303
SMCA_L3_CACHE, /* L3 Cache */
304304
SMCA_CS, /* Coherent Slave */
305+
SMCA_CS_V2, /* Coherent Slave */
305306
SMCA_PIE, /* Power, Interrupts, etc. */
306307
SMCA_UMC, /* Unified Memory Controller */
307308
SMCA_PB, /* Parameter Block */
308309
SMCA_PSP, /* Platform Security Processor */
310+
SMCA_PSP_V2, /* Platform Security Processor */
309311
SMCA_SMU, /* System Management Unit */
312+
SMCA_SMU_V2, /* System Management Unit */
310313
SMCA_MP5, /* Microprocessor 5 Unit */
311314
SMCA_NBIO, /* Northbridge IO Unit */
312315
SMCA_PCIE, /* PCI Express Unit */

arch/x86/kernel/cpu/mce/amd.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,14 @@ static struct smca_bank_name smca_names[] = {
8787
[SMCA_FP] = { "floating_point", "Floating Point Unit" },
8888
[SMCA_L3_CACHE] = { "l3_cache", "L3 Cache" },
8989
[SMCA_CS] = { "coherent_slave", "Coherent Slave" },
90+
[SMCA_CS_V2] = { "coherent_slave", "Coherent Slave" },
9091
[SMCA_PIE] = { "pie", "Power, Interrupts, etc." },
9192
[SMCA_UMC] = { "umc", "Unified Memory Controller" },
9293
[SMCA_PB] = { "param_block", "Parameter Block" },
9394
[SMCA_PSP] = { "psp", "Platform Security Processor" },
95+
[SMCA_PSP_V2] = { "psp", "Platform Security Processor" },
9496
[SMCA_SMU] = { "smu", "System Management Unit" },
97+
[SMCA_SMU_V2] = { "smu", "System Management Unit" },
9598
[SMCA_MP5] = { "mp5", "Microprocessor 5 Unit" },
9699
[SMCA_NBIO] = { "nbio", "Northbridge IO Unit" },
97100
[SMCA_PCIE] = { "pcie", "PCI Express Unit" },
@@ -152,6 +155,7 @@ static struct smca_hwid smca_hwid_mcatypes[] = {
152155
/* Data Fabric MCA types */
153156
{ SMCA_CS, HWID_MCATYPE(0x2E, 0x0), 0x1FF },
154157
{ SMCA_PIE, HWID_MCATYPE(0x2E, 0x1), 0xF },
158+
{ SMCA_CS_V2, HWID_MCATYPE(0x2E, 0x2), 0x3FFF },
155159

156160
/* Unified Memory Controller MCA type */
157161
{ SMCA_UMC, HWID_MCATYPE(0x96, 0x0), 0x3F },
@@ -161,9 +165,11 @@ static struct smca_hwid smca_hwid_mcatypes[] = {
161165

162166
/* Platform Security Processor MCA type */
163167
{ SMCA_PSP, HWID_MCATYPE(0xFF, 0x0), 0x1 },
168+
{ SMCA_PSP_V2, HWID_MCATYPE(0xFF, 0x1), 0x3FFFF },
164169

165170
/* System Management Unit MCA type */
166171
{ SMCA_SMU, HWID_MCATYPE(0x01, 0x0), 0x1 },
172+
{ SMCA_SMU_V2, HWID_MCATYPE(0x01, 0x1), 0x7FF },
167173

168174
/* Microprocessor 5 Unit MCA type */
169175
{ SMCA_MP5, HWID_MCATYPE(0x01, 0x2), 0x3FF },

drivers/edac/mce_amd.c

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,23 @@ static const char * const smca_cs_mce_desc[] = {
257257
"ECC error on probe filter access",
258258
};
259259

260+
static const char * const smca_cs2_mce_desc[] = {
261+
"Illegal Request",
262+
"Address Violation",
263+
"Security Violation",
264+
"Illegal Response",
265+
"Unexpected Response",
266+
"Request or Probe Parity Error",
267+
"Read Response Parity Error",
268+
"Atomic Request Parity Error",
269+
"SDP read response had no match in the CS queue",
270+
"Probe Filter Protocol Error",
271+
"Probe Filter ECC Error",
272+
"SDP read response had an unexpected RETRY error",
273+
"Counter overflow error",
274+
"Counter underflow error",
275+
};
276+
260277
static const char * const smca_pie_mce_desc[] = {
261278
"HW assert",
262279
"Internal PIE register security violation",
@@ -281,10 +298,45 @@ static const char * const smca_psp_mce_desc[] = {
281298
"PSP RAM ECC or parity error",
282299
};
283300

301+
static const char * const smca_psp2_mce_desc[] = {
302+
"High SRAM ECC or parity error",
303+
"Low SRAM ECC or parity error",
304+
"Instruction Cache Bank 0 ECC or parity error",
305+
"Instruction Cache Bank 1 ECC or parity error",
306+
"Instruction Tag Ram 0 parity error",
307+
"Instruction Tag Ram 1 parity error",
308+
"Data Cache Bank 0 ECC or parity error",
309+
"Data Cache Bank 1 ECC or parity error",
310+
"Data Cache Bank 2 ECC or parity error",
311+
"Data Cache Bank 3 ECC or parity error",
312+
"Data Tag Bank 0 parity error",
313+
"Data Tag Bank 1 parity error",
314+
"Data Tag Bank 2 parity error",
315+
"Data Tag Bank 3 parity error",
316+
"Dirty Data Ram parity error",
317+
"TLB Bank 0 parity error",
318+
"TLB Bank 1 parity error",
319+
"System Hub Read Buffer ECC or parity error",
320+
};
321+
284322
static const char * const smca_smu_mce_desc[] = {
285323
"SMU RAM ECC or parity error",
286324
};
287325

326+
static const char * const smca_smu2_mce_desc[] = {
327+
"High SRAM ECC or parity error",
328+
"Low SRAM ECC or parity error",
329+
"Data Cache Bank A ECC or parity error",
330+
"Data Cache Bank B ECC or parity error",
331+
"Data Tag Cache Bank A ECC or parity error",
332+
"Data Tag Cache Bank B ECC or parity error",
333+
"Instruction Cache Bank A ECC or parity error",
334+
"Instruction Cache Bank B ECC or parity error",
335+
"Instruction Tag Cache Bank A ECC or parity error",
336+
"Instruction Tag Cache Bank B ECC or parity error",
337+
"System Hub Read Buffer ECC or parity error",
338+
};
339+
288340
static const char * const smca_mp5_mce_desc[] = {
289341
"High SRAM ECC or parity error",
290342
"Low SRAM ECC or parity error",
@@ -328,11 +380,14 @@ static struct smca_mce_desc smca_mce_descs[] = {
328380
[SMCA_FP] = { smca_fp_mce_desc, ARRAY_SIZE(smca_fp_mce_desc) },
329381
[SMCA_L3_CACHE] = { smca_l3_mce_desc, ARRAY_SIZE(smca_l3_mce_desc) },
330382
[SMCA_CS] = { smca_cs_mce_desc, ARRAY_SIZE(smca_cs_mce_desc) },
383+
[SMCA_CS_V2] = { smca_cs2_mce_desc, ARRAY_SIZE(smca_cs2_mce_desc) },
331384
[SMCA_PIE] = { smca_pie_mce_desc, ARRAY_SIZE(smca_pie_mce_desc) },
332385
[SMCA_UMC] = { smca_umc_mce_desc, ARRAY_SIZE(smca_umc_mce_desc) },
333386
[SMCA_PB] = { smca_pb_mce_desc, ARRAY_SIZE(smca_pb_mce_desc) },
334387
[SMCA_PSP] = { smca_psp_mce_desc, ARRAY_SIZE(smca_psp_mce_desc) },
388+
[SMCA_PSP_V2] = { smca_psp2_mce_desc, ARRAY_SIZE(smca_psp2_mce_desc) },
335389
[SMCA_SMU] = { smca_smu_mce_desc, ARRAY_SIZE(smca_smu_mce_desc) },
390+
[SMCA_SMU_V2] = { smca_smu2_mce_desc, ARRAY_SIZE(smca_smu2_mce_desc) },
336391
[SMCA_MP5] = { smca_mp5_mce_desc, ARRAY_SIZE(smca_mp5_mce_desc) },
337392
[SMCA_NBIO] = { smca_nbio_mce_desc, ARRAY_SIZE(smca_nbio_mce_desc) },
338393
[SMCA_PCIE] = { smca_pcie_mce_desc, ARRAY_SIZE(smca_pcie_mce_desc) },

0 commit comments

Comments
 (0)