Skip to content

Commit 2190b99

Browse files
committed
[AMD][EPYC][Rome] Attempt to detect unusual CCD topology
1 parent 10f3991 commit 2190b99

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

x86_64/corefreqk.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2344,7 +2344,18 @@ static void Map_AMD_Topology(void *arg)
23442344
switch (PUBLIC(RO(Proc))->ArchID) {
23452345
case AMD_EPYC_Rome_CPK:
23462346
switch (leaf80000008.ECX.NC) {
2347+
case 0x5f:
23472348
case 0x2f:
2349+
if (!strncmp(PUBLIC(RO(Proc))->Architecture,
2350+
Arch[PUBLIC(RO(Proc))->ArchID].Architecture[CN_ROME_75_2],
2351+
CODENAME_LEN)
2352+
|| !strncmp(PUBLIC(RO(Proc))->Architecture,
2353+
Arch[PUBLIC(RO(Proc))->ArchID].Architecture[CN_ROME_7K_2],
2354+
CODENAME_LEN))
2355+
{
2356+
ApicID_SHR = 5;
2357+
}
2358+
fallthrough;
23482359
case 0x17: /* Type[4:EPYC Rome; 7:ThreadRipper Castle Peak] */
23492360
case 0x0b:
23502361
ApicID_SHL = \

x86_64/corefreqk.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3698,7 +3698,9 @@ enum {
36983698
enum {
36993699
CN_ROME,
37003700
CN_CASTLE_PEAK,
3701-
CN_ROME_7F_2
3701+
CN_ROME_7F_2,
3702+
CN_ROME_75_2,
3703+
CN_ROME_7K_2
37023704
};
37033705
enum {
37043706
CN_RENOIR,
@@ -3836,7 +3838,9 @@ static char *Arch_AMD_Zen_Dali[] = ZLIST(
38363838
static char *Arch_AMD_EPYC_Rome_CPK[] = ZLIST(
38373839
[CN_ROME] = "Zen2/EPYC/Rome",
38383840
[CN_CASTLE_PEAK] = "Zen2/Castle Peak",
3839-
[CN_ROME_7F_2] = "Zen2/EPYC/Rome/7Fx2"
3841+
[CN_ROME_7F_2] = "Zen2/EPYC/Rome/7Fx2",
3842+
[CN_ROME_75_2] = "Zen2/EPYC/Rome/75x2",
3843+
[CN_ROME_7K_2] = "Zen2/EPYC/Rome/7Kx2"
38403844
);
38413845
static char *Arch_AMD_Zen2_Renoir[] = ZLIST(
38423846
[CN_RENOIR] = "Zen2/Renoir",
@@ -6266,7 +6270,7 @@ static PROCESSOR_SPECIFIC AMD_EPYC_Rome_CPK_Specific[] = {
62666270
"AMD EPYC 7552" ),
62676271
.Boost = {+11, 0},
62686272
.Param.Offset = {0, 0, 0},
6269-
.CodeNameIdx = CN_ROME,
6273+
.CodeNameIdx = CN_ROME_75_2,
62706274
.TgtRatioUnlocked = 1,
62716275
.ClkRatioUnlocked = 0b10,
62726276
.TurboUnlocked = 0,
@@ -6379,7 +6383,7 @@ static PROCESSOR_SPECIFIC AMD_EPYC_Rome_CPK_Specific[] = {
63796383
.Brand = ZLIST("AMD EPYC 7K62"),
63806384
.Boost = {+7, 0},
63816385
.Param.Offset = {0, 0, 0},
6382-
.CodeNameIdx = CN_ROME,
6386+
.CodeNameIdx = CN_ROME_7K_2,
63836387
.TgtRatioUnlocked = 1,
63846388
.ClkRatioUnlocked = 0b10,
63856389
.TurboUnlocked = 0,

0 commit comments

Comments
 (0)