@@ -75,6 +75,26 @@ static const char *f10h_nb_mce_desc[] = {
7575 "ECC Error in the Probe Filter directory"
7676};
7777
78+ static const char * const f15h_ic_mce_desc [] = {
79+ "UC during a demand linefill from L2" ,
80+ "Parity error during data load from IC" ,
81+ "Parity error for IC valid bit" ,
82+ "Main tag parity error" ,
83+ "Parity error in prediction queue" ,
84+ "PFB data/address parity error" ,
85+ "Parity error in the branch status reg" ,
86+ "PFB promotion address error" ,
87+ "Tag error during probe/victimization" ,
88+ "Parity error for IC probe tag valid bit" ,
89+ "PFB non-cacheable bit parity error" ,
90+ "PFB valid bit parity error" , /* xec = 0xd */
91+ "patch RAM" , /* xec = 010 */
92+ "uop queue" ,
93+ "insn buffer" ,
94+ "predecode buffer" ,
95+ "fetch address FIFO"
96+ };
97+
7898static bool f12h_dc_mce (u16 ec , u8 xec )
7999{
80100 bool ret = false;
@@ -241,7 +261,7 @@ static void amd_decode_dc_mce(struct mce *m)
241261 pr_emerg (HW_ERR "Corrupted DC MCE info?\n" );
242262}
243263
244- static bool k8_ic_mce (u16 ec )
264+ static bool k8_ic_mce (u16 ec , u8 xec )
245265{
246266 u8 ll = ec & 0x3 ;
247267 u8 r4 = (ec >> 4 ) & 0xf ;
@@ -276,7 +296,7 @@ static bool k8_ic_mce(u16 ec)
276296 return ret ;
277297}
278298
279- static bool f14h_ic_mce (u16 ec )
299+ static bool f14h_ic_mce (u16 ec , u8 xec )
280300{
281301 u8 ll = ec & 0x3 ;
282302 u8 tt = (ec >> 2 ) & 0x3 ;
@@ -297,6 +317,32 @@ static bool f14h_ic_mce(u16 ec)
297317 return ret ;
298318}
299319
320+ static bool f15h_ic_mce (u16 ec , u8 xec )
321+ {
322+ bool ret = true;
323+
324+ if (!MEM_ERROR (ec ))
325+ return false;
326+
327+ switch (xec ) {
328+ case 0x0 ... 0xa :
329+ pr_cont ("%s.\n" , f15h_ic_mce_desc [xec ]);
330+ break ;
331+
332+ case 0xd :
333+ pr_cont ("%s.\n" , f15h_ic_mce_desc [xec - 2 ]);
334+ break ;
335+
336+ case 0x10 ... 0x14 :
337+ pr_cont ("Decoder %s parity error.\n" , f15h_ic_mce_desc [xec - 4 ]);
338+ break ;
339+
340+ default :
341+ ret = false;
342+ }
343+ return ret ;
344+ }
345+
300346static void amd_decode_ic_mce (struct mce * m )
301347{
302348 u16 ec = m -> status & 0xffff ;
@@ -311,7 +357,7 @@ static void amd_decode_ic_mce(struct mce *m)
311357 bool k8 = (boot_cpu_data .x86 == 0xf && (m -> status & BIT_64 (58 )));
312358
313359 pr_cont ("during %s.\n" , (k8 ? "system linefill" : "NB data read" ));
314- } else if (fam_ops -> ic_mce (ec ))
360+ } else if (fam_ops -> ic_mce (ec , xec ))
315361 ;
316362 else
317363 pr_emerg (HW_ERR "Corrupted IC MCE info?\n" );
@@ -697,6 +743,7 @@ static int __init mce_amd_init(void)
697743 case 0x15 :
698744 xec_mask = 0x1f ;
699745 fam_ops -> dc_mce = f15h_dc_mce ;
746+ fam_ops -> ic_mce = f15h_ic_mce ;
700747 break ;
701748
702749 default :
0 commit comments