forked from pool/mcelog
1c1607eb66
- Add mce decoding support for latest AMD CPUs (bnc#871881). - Implementation done by Borislav Petkov <bp@suse.de> * Add patches/Start-consolidating-AMD-specific-stuff.patch * Add add-defines.patch * Add add-f10h-support.patch * Add add-f11h-support.patch * Add add-f12h-support.patch * Add add-f14h-support.patch * Add add-f15h-support.patch * Add add-f16h-support.patch OBS-URL: https://build.opensuse.org/request/show/234343 OBS-URL: https://build.opensuse.org/package/show/Base:System/mcelog?expand=0&rev=35
91 lines
2.3 KiB
Diff
91 lines
2.3 KiB
Diff
Add F12h decoding support
|
|
|
|
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Index: mcelog-1.0.1/amd.c
|
|
===================================================================
|
|
--- mcelog-1.0.1.orig/amd.c
|
|
+++ mcelog-1.0.1/amd.c
|
|
@@ -157,6 +157,8 @@ enum cputype select_amd_cputype(u32 fami
|
|
return CPU_F10H;
|
|
case 0x11:
|
|
return CPU_F11H;
|
|
+ case 0x12:
|
|
+ return CPU_F12H;
|
|
default:
|
|
break;
|
|
}
|
|
@@ -648,6 +650,12 @@ struct amd_decoder_ops fam_ops[] = {
|
|
.mc1_mce = k8_mc1_mce,
|
|
.mc2_mce = k8_mc2_mce,
|
|
},
|
|
+ [AMD_F12H] = {
|
|
+ .cpu = AMD_F12H,
|
|
+ .mc0_mce = f12h_mc0_mce,
|
|
+ .mc1_mce = k8_mc1_mce,
|
|
+ .mc2_mce = k8_mc2_mce,
|
|
+ },
|
|
};
|
|
|
|
static void __decode_amd_mc(enum cputype cpu, struct mce *mce)
|
|
@@ -661,6 +669,9 @@ static void __decode_amd_mc(enum cputype
|
|
case CPU_F11H:
|
|
ops = &fam_ops[AMD_F11H];
|
|
break;
|
|
+ case CPU_F12H:
|
|
+ ops = &fam_ops[AMD_F12H];
|
|
+ break;
|
|
default:
|
|
Eprintf("Huh? What family is it: 0x%x?!\n", cpu);
|
|
return;
|
|
Index: mcelog-1.0.1/amd.h
|
|
===================================================================
|
|
--- mcelog-1.0.1.orig/amd.h
|
|
+++ mcelog-1.0.1/amd.h
|
|
@@ -9,6 +9,7 @@ enum amdcpu {
|
|
AMD_K8 = 0,
|
|
AMD_F10H,
|
|
AMD_F11H,
|
|
+ AMD_F12H,
|
|
AMD_F14H,
|
|
AMD_F15H,
|
|
AMD_F16H,
|
|
@@ -94,4 +95,5 @@ enum rrrr_ids {
|
|
#define CASE_AMD_CPUS \
|
|
case CPU_K8: \
|
|
case CPU_F10H: \
|
|
- case CPU_F11H
|
|
+ case CPU_F11H: \
|
|
+ case CPU_F12H
|
|
Index: mcelog-1.0.1/mcelog.h
|
|
===================================================================
|
|
--- mcelog-1.0.1.orig/mcelog.h
|
|
+++ mcelog-1.0.1/mcelog.h
|
|
@@ -109,6 +109,7 @@ enum cputype {
|
|
CPU_K8,
|
|
CPU_F10H,
|
|
CPU_F11H,
|
|
+ CPU_F12H,
|
|
CPU_P4,
|
|
CPU_NEHALEM,
|
|
CPU_DUNNINGTON,
|
|
Index: mcelog-1.0.1/mcelog.c
|
|
===================================================================
|
|
--- mcelog-1.0.1.orig/mcelog.c
|
|
+++ mcelog-1.0.1/mcelog.c
|
|
@@ -224,6 +224,7 @@ static char *cputype_name[] = {
|
|
[CPU_K8] = "AMD K8 and derivates",
|
|
[CPU_F10H] = "AMD Greyhound",
|
|
[CPU_F11H] = "AMD Griffin",
|
|
+ [CPU_F12H] = "AMD Llano",
|
|
[CPU_P4] = "Intel P4",
|
|
[CPU_NEHALEM] = "Intel Xeon 5500 series / Core i3/5/7 (\"Nehalem/Westmere\")",
|
|
[CPU_DUNNINGTON] = "Intel Xeon 7400 series",
|
|
@@ -244,6 +245,7 @@ static struct config_choice cpu_choices[
|
|
{ "k8", CPU_K8 },
|
|
{ "f10h", CPU_F10H },
|
|
{ "f11h", CPU_F11H },
|
|
+ { "f12h", CPU_F12H },
|
|
{ "p4", CPU_P4 },
|
|
{ "dunnington", CPU_DUNNINGTON },
|
|
{ "xeon74xx", CPU_DUNNINGTON },
|