Skip to content

Commit

Permalink
[AMD][Raphael] Adding device DIDs to probe UMC and IOMMU
Browse files Browse the repository at this point in the history
  • Loading branch information
cyring authored and CyrIng committed Dec 1, 2022
1 parent 6794d6c commit 6a4b450
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 3 additions & 1 deletion corefreq-api.h
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,8 @@ typedef struct
#define DID_AMD_17H_ARDEN_NB_IOMMU 0x1627 /* Arden */
/* Source: AMD Ryzen 5 6600H [ Zen3+ Rembrandt ] */
#define DID_AMD_19H_ZEN3_RMB_NB_IOMMU 0x14b6 /* Rembrandt */

/* Source: AMD Ryzen 9 7950X [ Zen4/Raphael ] */
#define DID_AMD_19H_ZEN4_RPL_NB_IOMMU 0x14d9 /* Raphael */
/* Source: /include/linux/pci_ids.h */
#define DID_AMD_17H_ZEPPELIN_DF_UMC 0x1460 /* Zeppelin */
#define DID_AMD_17H_RAVEN_DF_UMC 0x15e8 /* Raven */
Expand All @@ -1435,3 +1436,4 @@ typedef struct
#define DID_AMD_19H_VERMEER_DF_UMC 0x1650 /* Vermeer */
#define DID_AMD_19H_CEZANNE_DF_UMC 0x166a /* Cezanne */
#define DID_AMD_19H_REMBRANDT_DF_UMC 0x1679 /* Rembrandt */
#define DID_AMD_19H_RAPHAEL_DF_UMC 0x14e0 /* Raphael */
2 changes: 2 additions & 0 deletions corefreqd.c
Original file line number Diff line number Diff line change
Expand Up @@ -6572,6 +6572,7 @@ void PCI_AMD(RO(SHM_STRUCT) *RO(Shm), RO(PROC) *RO(Proc), RO(CORE) *RO(Core),
case DID_AMD_17H_FIREFLIGHT_NB_IOMMU:
case DID_AMD_17H_ARDEN_NB_IOMMU:
case DID_AMD_19H_ZEN3_RMB_NB_IOMMU:
case DID_AMD_19H_ZEN4_RPL_NB_IOMMU:
AMD_17h_IOMMU(RO(Shm), RO(Proc));
break;
case DID_AMD_17H_ZEPPELIN_DF_UMC:
Expand All @@ -6586,6 +6587,7 @@ void PCI_AMD(RO(SHM_STRUCT) *RO(Shm), RO(PROC) *RO(Proc), RO(CORE) *RO(Core),
case DID_AMD_19H_VERMEER_DF_UMC:
case DID_AMD_19H_CEZANNE_DF_UMC:
case DID_AMD_19H_REMBRANDT_DF_UMC:
case DID_AMD_19H_RAPHAEL_DF_UMC:
AMD_17h_UMC(RO(Shm), RO(Proc));
AMD_17h_CAP(RO(Shm), RO(Proc), RO(Core));
SET_CHIPSET(IC_ZEN);
Expand Down
14 changes: 12 additions & 2 deletions corefreqk.h
Original file line number Diff line number Diff line change
Expand Up @@ -1693,6 +1693,7 @@ static void Query_Hygon_F18h(unsigned int cpu);
#define InitTimer_AMD_F19h_Zen3_SP InitTimer_AMD_F17h_Zen2_SP
#define InitTimer_AMD_F19h_Zen3_MP InitTimer_AMD_F17h_Zen2_MP
#define InitTimer_AMD_F19h_Zen3_APU InitTimer_AMD_F17h_Zen2_APU
#define InitTimer_AMD_Zen4_RPL InitTimer_AMD_Zen3Plus_RMB
#define Start_Uncore_AMD_Family_19h Start_Uncore_AMD_Family_17h
#define Stop_Uncore_AMD_Family_19h Stop_Uncore_AMD_Family_17h

Expand Down Expand Up @@ -2050,6 +2051,7 @@ static PCI_CALLBACK AMD_DataFabric_Arden(struct pci_dev *pdev) ;
static PCI_CALLBACK AMD_DataFabric_Vermeer(struct pci_dev *pdev) ;
static PCI_CALLBACK AMD_DataFabric_Cezanne(struct pci_dev *pdev) ;
static PCI_CALLBACK AMD_DataFabric_Rembrandt(struct pci_dev *pdev) ;
#define AMD_DataFabric_Raphael AMD_DataFabric_Rembrandt

static struct pci_device_id PCI_Void_ids[] = {
{0, }
Expand Down Expand Up @@ -2849,6 +2851,10 @@ static struct pci_device_id PCI_AMD_17h_ids[] = {
PCI_VDEVICE(AMD, DID_AMD_19H_ZEN3_RMB_NB_IOMMU),
.driver_data = (kernel_ulong_t) AMD_Zen_IOMMU
},
{
PCI_VDEVICE(AMD, DID_AMD_19H_ZEN4_RPL_NB_IOMMU),
.driver_data = (kernel_ulong_t) AMD_Zen_IOMMU
},
/* Source: HYGON: PCI list */
{
PCI_VDEVICE(HYGON, DID_AMD_17H_ZEN_PLUS_NB_IOMMU),
Expand Down Expand Up @@ -2905,6 +2911,10 @@ static struct pci_device_id PCI_AMD_17h_ids[] = {
PCI_VDEVICE(AMD, DID_AMD_19H_REMBRANDT_DF_UMC),
.driver_data = (kernel_ulong_t) AMD_DataFabric_Rembrandt
},
{
PCI_VDEVICE(AMD, DID_AMD_19H_RAPHAEL_DF_UMC),
.driver_data = (kernel_ulong_t) AMD_DataFabric_Raphael
},
{0, }
};

Expand Down Expand Up @@ -9835,14 +9845,14 @@ static ARCH Arch[ARCHITECTURES] = {
.Start = Start_AMD_Family_19h,
.Stop = Stop_AMD_Family_19h,
.Exit = Exit_AMD_F19h,
.Timer = InitTimer_AMD_F19h_Zen3_SP,
.Timer = InitTimer_AMD_Zen4_RPL,
.BaseClock = BaseClock_AMD_Family_19h,
.ClockMod = ClockMod_AMD_Zen,
.TurboClock = TurboClock_AMD_Zen,
.thermalFormula = THERMAL_FORMULA_AMD_ZEN3,
.voltageFormula = VOLTAGE_FORMULA_AMD_19h,
.powerFormula = POWER_FORMULA_AMD_19h,
.PCI_ids = PCI_Void_ids,
.PCI_ids = PCI_AMD_19h_ids,
.Uncore = {
.Start = Start_Uncore_AMD_Family_19h,
.Stop = Stop_Uncore_AMD_Family_19h,
Expand Down

0 comments on commit 6a4b450

Please sign in to comment.