Skip to content

Commit 5537b44

Browse files
yghannamjfvogel
authored andcommitted
x86/MCE/AMD, EDAC/mce_amd: Add new MP5, NBIO, and PCIE SMCA bank types
Add the (HWID, MCATYPE) tuples and names for the new MP5, NBIO, and PCIE SMCA bank types. Also, add their respective error descriptions to the MCE decoding module edac_mce_amd. 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 cbfa447) Orabug: 29547647 Signed-off-by: Somasundaram Krishnasamy <[email protected]> Reviewed-by: John Donnelly <[email protected]>
1 parent 2f97ce1 commit 5537b44

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

arch/x86/include/asm/mce.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ enum smca_bank_types {
307307
SMCA_PB, /* Parameter Block */
308308
SMCA_PSP, /* Platform Security Processor */
309309
SMCA_SMU, /* System Management Unit */
310+
SMCA_MP5, /* Microprocessor 5 Unit */
311+
SMCA_NBIO, /* Northbridge IO Unit */
312+
SMCA_PCIE, /* PCI Express Unit */
310313
N_SMCA_BANK_TYPES
311314
};
312315

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ static struct smca_bank_name smca_names[] = {
9292
[SMCA_PB] = { "param_block", "Parameter Block" },
9393
[SMCA_PSP] = { "psp", "Platform Security Processor" },
9494
[SMCA_SMU] = { "smu", "System Management Unit" },
95+
[SMCA_MP5] = { "mp5", "Microprocessor 5 Unit" },
96+
[SMCA_NBIO] = { "nbio", "Northbridge IO Unit" },
97+
[SMCA_PCIE] = { "pcie", "PCI Express Unit" },
9598
};
9699

97100
static u32 smca_bank_addrs[MAX_NR_BANKS][NR_BLOCKS] __ro_after_init =
@@ -161,6 +164,15 @@ static struct smca_hwid smca_hwid_mcatypes[] = {
161164

162165
/* System Management Unit MCA type */
163166
{ SMCA_SMU, HWID_MCATYPE(0x01, 0x0), 0x1 },
167+
168+
/* Microprocessor 5 Unit MCA type */
169+
{ SMCA_MP5, HWID_MCATYPE(0x01, 0x2), 0x3FF },
170+
171+
/* Northbridge IO Unit MCA type */
172+
{ SMCA_NBIO, HWID_MCATYPE(0x18, 0x0), 0x1F },
173+
174+
/* PCI Express Unit MCA type */
175+
{ SMCA_PCIE, HWID_MCATYPE(0x46, 0x0), 0x1F },
164176
};
165177

166178
struct smca_bank smca_banks[MAX_NR_BANKS];

drivers/edac/mce_amd.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,35 @@ static const char * const smca_smu_mce_desc[] = {
285285
"SMU RAM ECC or parity error",
286286
};
287287

288+
static const char * const smca_mp5_mce_desc[] = {
289+
"High SRAM ECC or parity error",
290+
"Low SRAM ECC or parity error",
291+
"Data Cache Bank A ECC or parity error",
292+
"Data Cache Bank B ECC or parity error",
293+
"Data Tag Cache Bank A ECC or parity error",
294+
"Data Tag Cache Bank B ECC or parity error",
295+
"Instruction Cache Bank A ECC or parity error",
296+
"Instruction Cache Bank B ECC or parity error",
297+
"Instruction Tag Cache Bank A ECC or parity error",
298+
"Instruction Tag Cache Bank B ECC or parity error",
299+
};
300+
301+
static const char * const smca_nbio_mce_desc[] = {
302+
"ECC or Parity error",
303+
"PCIE error",
304+
"SDP ErrEvent error",
305+
"SDP Egress Poison Error",
306+
"IOHC Internal Poison Error",
307+
};
308+
309+
static const char * const smca_pcie_mce_desc[] = {
310+
"CCIX PER Message logging",
311+
"CCIX Read Response with Status: Non-Data Error",
312+
"CCIX Write Response with Status: Non-Data Error",
313+
"CCIX Read Response with Status: Data Error",
314+
"CCIX Non-okay write response with data error",
315+
};
316+
288317
struct smca_mce_desc {
289318
const char * const *descs;
290319
unsigned int num_descs;
@@ -304,6 +333,9 @@ static struct smca_mce_desc smca_mce_descs[] = {
304333
[SMCA_PB] = { smca_pb_mce_desc, ARRAY_SIZE(smca_pb_mce_desc) },
305334
[SMCA_PSP] = { smca_psp_mce_desc, ARRAY_SIZE(smca_psp_mce_desc) },
306335
[SMCA_SMU] = { smca_smu_mce_desc, ARRAY_SIZE(smca_smu_mce_desc) },
336+
[SMCA_MP5] = { smca_mp5_mce_desc, ARRAY_SIZE(smca_mp5_mce_desc) },
337+
[SMCA_NBIO] = { smca_nbio_mce_desc, ARRAY_SIZE(smca_nbio_mce_desc) },
338+
[SMCA_PCIE] = { smca_pcie_mce_desc, ARRAY_SIZE(smca_pcie_mce_desc) },
307339
};
308340

309341
static bool f12h_mc0_mce(u16 ec, u8 xec)

0 commit comments

Comments
 (0)