Skip to content

Commit 293e0f9

Browse files
committed
[Intel] Grant MSR_FLEX_RATIO access to Alder Lake/H (06_9A)
* Removed function condition to access the Flex Ratio register
1 parent 5a3c396 commit 293e0f9

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

x86_64/corefreqk.c

+11-13
Original file line numberDiff line numberDiff line change
@@ -2686,9 +2686,8 @@ static PROCESSOR_SPECIFIC *LookupProcessor(void)
26862686
return NULL;
26872687
}
26882688

2689-
static void Intel_FlexRatio(bool OC_ENABLED)
2689+
static void Intel_FlexRatio(void)
26902690
{
2691-
if (OC_ENABLED) {
26922691
static struct {
26932692
struct SIGNATURE Arch;
26942693
unsigned short grantFlex : 1-0,
@@ -2724,7 +2723,7 @@ static void Intel_FlexRatio(bool OC_ENABLED)
27242723
{_Nehalem_EX, 1, 1, 0, 1}, /* 06_2E */
27252724

27262725
{_Westmere, 1, 1, 0, 1}, /* 06_25 */
2727-
{_Westmere_EP, 1, 0, 0, 1}, /* 06_2C */
2726+
{_Westmere_EP, 1, 0, 0, 1}, /* 06_2C : R/W */
27282727
{_Westmere_EX, 1, 1, 0, 1}, /* 06_2F */
27292728

27302729
{_SandyBridge, 1, 1, 0, 0}, /* 06_2A */
@@ -2761,7 +2760,7 @@ static void Intel_FlexRatio(bool OC_ENABLED)
27612760
{_Icelake_D, 1, 1, 0, 0},
27622761
{_Sunny_Cove, 1, 1, 0, 0},
27632762
{_Tigerlake, 1, 1, 0, 0},
2764-
{_Tigerlake_U, 1, 0, 0, 0}, /* 06_8C */
2763+
{_Tigerlake_U, 1, 0, 0, 0}, /* 06_8C : R/W */
27652764
{_Cometlake, 1, 1, 0, 0},
27662765
{_Cometlake_UY, 1, 1, 0, 0},
27672766
{_Atom_Denverton, 1, 1, 0, 0},
@@ -2778,7 +2777,7 @@ static void Intel_FlexRatio(bool OC_ENABLED)
27782777
{_Rocketlake, 1, 1, 0, 0},
27792778
{_Rocketlake_U, 1, 1, 0, 0},
27802779
{_Alderlake_S, 1, 0, 0, 0}, /* 06_97 */
2781-
{_Alderlake_H, 1, 1, 0, 0},
2780+
{_Alderlake_H, 1, 0, 0, 0}, /* 06_9A */
27822781
{_Alderlake_N, 1, 1, 0, 0},
27832782
{_Meteorlake_M, 1, 1, 0, 0},
27842783
{_Meteorlake_N, 1, 1, 0, 0},
@@ -2830,7 +2829,6 @@ static void Intel_FlexRatio(bool OC_ENABLED)
28302829
break;
28312830
}
28322831
}
2833-
}
28342832
}
28352833

28362834
static int Intel_MaxBusRatio(PLATFORM_ID *PfID)
@@ -6040,7 +6038,7 @@ static PCI_CALLBACK X58_QPI(struct pci_dev *dev)
60406038
pci_read_config_dword(dev, 0xd0,
60416039
&PUBLIC(RO(Proc))->Uncore.Bus.QuickPath.value);
60426040

6043-
Intel_FlexRatio(true);
6041+
Intel_FlexRatio();
60446042

60456043
return (PCI_CALLBACK) 0;
60466044
}
@@ -6089,7 +6087,7 @@ static PCI_CALLBACK IVB_IMC(struct pci_dev *dev)
60896087
pci_read_config_dword(dev, 0xe8,
60906088
&PUBLIC(RO(Proc))->Uncore.Bus.IVB_Cap.value);
60916089

6092-
Intel_FlexRatio(PUBLIC(RO(Proc))->Uncore.Bus.IVB_Cap.OC_ENABLED == 1);
6090+
Intel_FlexRatio();
60936091

60946092
PUBLIC(RO(Proc))->Uncore.CtrlCount = 1;
60956093

@@ -6291,7 +6289,7 @@ static PCI_CALLBACK HSW_HOST(struct pci_dev *dev, ROUTER Query)
62916289
pci_read_config_dword(dev, 0xe8,
62926290
&PUBLIC(RO(Proc))->Uncore.Bus.IVB_Cap.value);
62936291

6294-
Intel_FlexRatio(PUBLIC(RO(Proc))->Uncore.Bus.IVB_Cap.OC_ENABLED == 1);
6292+
Intel_FlexRatio();
62956293

62966294
PUBLIC(RO(Proc))->Uncore.CtrlCount = 1;
62976295

@@ -6534,7 +6532,7 @@ static PCI_CALLBACK SKL_HOST( struct pci_dev *dev,
65346532
pci_read_config_dword(dev, 0xec,
65356533
&PUBLIC(RO(Proc))->Uncore.Bus.SKL_Cap_C.value);
65366534

6537-
Intel_FlexRatio(PUBLIC(RO(Proc))->Uncore.Bus.SKL_Cap_B.OC_ENABLED == 1);
6535+
Intel_FlexRatio();
65386536

65396537
SoC_SKL_VTD();
65406538

@@ -6599,7 +6597,7 @@ static PCI_CALLBACK ADL_HOST( struct pci_dev *dev,
65996597
pci_read_config_dword(dev, 0xf0,
66006598
&PUBLIC(RO(Proc))->Uncore.Bus.ADL_Cap_E.value);
66016599

6602-
Intel_FlexRatio(PUBLIC(RO(Proc))->Uncore.Bus.ADL_Cap_B.OC_ENABLED == 1);
6600+
Intel_FlexRatio();
66036601

66046602
SoC_SKL_VTD();
66056603

@@ -6656,7 +6654,7 @@ static PCI_CALLBACK MTL_HOST( struct pci_dev *dev,
66566654
pci_read_config_dword(dev, 0xf0,
66576655
&PUBLIC(RO(Proc))->Uncore.Bus.MTL_Cap_E.value);
66586656

6659-
Intel_FlexRatio(PUBLIC(RO(Proc))->Uncore.Bus.MTL_Cap_B.OC_ENABLED == 1);
6657+
Intel_FlexRatio();
66606658

66616659
SoC_SKL_VTD();
66626660

@@ -6706,7 +6704,7 @@ static PCI_CALLBACK GLK_IMC(struct pci_dev *dev)
67066704
pci_read_config_dword(dev, 0xe8,
67076705
&PUBLIC(RO(Proc))->Uncore.Bus.GLK_Cap_B.value);
67086706

6709-
Intel_FlexRatio(PUBLIC(RO(Proc))->Uncore.Bus.GLK_Cap_B.OC_ENABLED == 1);
6707+
Intel_FlexRatio();
67106708

67116709
SoC_SKL_VTD();
67126710

0 commit comments

Comments
 (0)