Skip to content

Commit cbfa447

Browse files
yghannamsuryasaimadhu
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]
1 parent 6e1849e commit cbfa447

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
@@ -312,6 +312,9 @@ enum smca_bank_types {
312312
SMCA_PB, /* Parameter Block */
313313
SMCA_PSP, /* Platform Security Processor */
314314
SMCA_SMU, /* System Management Unit */
315+
SMCA_MP5, /* Microprocessor 5 Unit */
316+
SMCA_NBIO, /* Northbridge IO Unit */
317+
SMCA_PCIE, /* PCI Express Unit */
315318
N_SMCA_BANK_TYPES
316319
};
317320

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

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

98101
static u32 smca_bank_addrs[MAX_NR_BANKS][NR_BLOCKS] __ro_after_init =
@@ -162,6 +165,15 @@ static struct smca_hwid smca_hwid_mcatypes[] = {
162165

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

167179
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)