File tree Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Expand file tree Collapse file tree 2 files changed +22
-7
lines changed Original file line number Diff line number Diff line change 81
81
#define X86_FEATURE_K6_MTRR ( 3*32+ 1) /* AMD K6 nonstandard MTRRs */
82
82
#define X86_FEATURE_CYRIX_ARR ( 3*32+ 2) /* Cyrix ARRs (= MTRRs) */
83
83
#define X86_FEATURE_CENTAUR_MCR ( 3*32+ 3) /* Centaur MCRs (= MTRRs) */
84
-
85
- /* CPU types for specific tunings: */
86
84
#define X86_FEATURE_K8 ( 3*32+ 4) /* "" Opteron, Athlon64 */
87
- /* FREE, was #define X86_FEATURE_K7 ( 3*32+ 5) "" Athlon */
85
+ #define X86_FEATURE_ZEN5 ( 3*32+ 5) /* "" CPU based on Zen5 microarchitecture */
88
86
#define X86_FEATURE_P3 ( 3*32+ 6) /* "" P3 */
89
87
#define X86_FEATURE_P4 ( 3*32+ 7) /* "" P4 */
90
88
#define X86_FEATURE_CONSTANT_TSC ( 3*32+ 8) /* TSC ticks at a constant rate */
Original file line number Diff line number Diff line change @@ -538,7 +538,7 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
538
538
539
539
/* Figure out Zen generations: */
540
540
switch (c -> x86 ) {
541
- case 0x17 : {
541
+ case 0x17 :
542
542
switch (c -> x86_model ) {
543
543
case 0x00 ... 0x2f :
544
544
case 0x50 ... 0x5f :
@@ -554,8 +554,8 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
554
554
goto warn ;
555
555
}
556
556
break ;
557
- }
558
- case 0x19 : {
557
+
558
+ case 0x19 :
559
559
switch (c -> x86_model ) {
560
560
case 0x00 ... 0x0f :
561
561
case 0x20 ... 0x5f :
@@ -569,7 +569,17 @@ static void bsp_init_amd(struct cpuinfo_x86 *c)
569
569
goto warn ;
570
570
}
571
571
break ;
572
- }
572
+
573
+ case 0x1a :
574
+ switch (c -> x86_model ) {
575
+ case 0x00 ... 0x0f :
576
+ setup_force_cpu_cap (X86_FEATURE_ZEN5 );
577
+ break ;
578
+ default :
579
+ goto warn ;
580
+ }
581
+ break ;
582
+
573
583
default :
574
584
break ;
575
585
}
@@ -1039,6 +1049,11 @@ static void init_amd_zen4(struct cpuinfo_x86 *c)
1039
1049
msr_set_bit (MSR_ZEN4_BP_CFG , MSR_ZEN4_BP_CFG_SHARED_BTB_FIX_BIT );
1040
1050
}
1041
1051
1052
+ static void init_amd_zen5 (struct cpuinfo_x86 * c )
1053
+ {
1054
+ init_amd_zen_common ();
1055
+ }
1056
+
1042
1057
static void init_amd (struct cpuinfo_x86 * c )
1043
1058
{
1044
1059
u64 vm_cr ;
@@ -1084,6 +1099,8 @@ static void init_amd(struct cpuinfo_x86 *c)
1084
1099
init_amd_zen3 (c );
1085
1100
else if (boot_cpu_has (X86_FEATURE_ZEN4 ))
1086
1101
init_amd_zen4 (c );
1102
+ else if (boot_cpu_has (X86_FEATURE_ZEN5 ))
1103
+ init_amd_zen5 (c );
1087
1104
1088
1105
/*
1089
1106
* Enable workaround for FXSAVE leak on CPUs
You can’t perform that action at this time.
0 commit comments