1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

amdsmn(4), amdtemp(4): add support for AMD Ryzen 7 "Phoenix" processors

Adds support for AMD Ryzen 7 "Phoenix" processors (family 0x19,
model 0x70-0x7f) to the amdsmn(4) and amdtemp(4) drivers. This
enables temperature readings of these CPUs via sysctl.

The sensors function identically to those for the "Raphael" processors
(model 0x60-0x6f); only the PCI device ID differs.

PR:		kern/280942
Relnotes:	yes
MFC after:	3 days
This commit is contained in:
Oliver Fromme 2024-08-22 21:46:19 -07:00 committed by Xin LI
parent 101afbc6ee
commit ef3f8aa0a0
2 changed files with 10 additions and 0 deletions

View File

@ -60,6 +60,7 @@
#define PCI_DEVICE_ID_AMD_17H_M60H_ROOT 0x1630
#define PCI_DEVICE_ID_AMD_19H_M10H_ROOT 0x14a4
#define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8
#define PCI_DEVICE_ID_AMD_19H_M70H_ROOT 0x14e8
struct pciid;
struct amdsmn_softc {
@ -115,6 +116,12 @@ static const struct pciid {
.amdsmn_addr_reg = F17H_SMN_ADDR_REG,
.amdsmn_data_reg = F17H_SMN_DATA_REG,
},
{
.amdsmn_vendorid = CPU_VENDOR_AMD,
.amdsmn_deviceid = PCI_DEVICE_ID_AMD_19H_M70H_ROOT,
.amdsmn_addr_reg = F17H_SMN_ADDR_REG,
.amdsmn_data_reg = F17H_SMN_DATA_REG,
},
};
/*

View File

@ -115,6 +115,7 @@ struct amdtemp_softc {
#define DEVICEID_AMD_HOSTB17H_M60H_ROOT 0x1630
#define DEVICEID_AMD_HOSTB19H_M10H_ROOT 0x14a4
#define DEVICEID_AMD_HOSTB19H_M60H_ROOT 0x14d8
#define DEVICEID_AMD_HOSTB19H_M70H_ROOT 0x14e8
static const struct amdtemp_product {
uint16_t amdtemp_vendorid;
@ -141,6 +142,7 @@ static const struct amdtemp_product {
{ VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M60H_ROOT, false },
{ VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M10H_ROOT, false },
{ VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M60H_ROOT, false },
{ VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M70H_ROOT, false },
};
/*
@ -873,6 +875,7 @@ amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model)
_Static_assert((int)NUM_CCDS >= 12, "");
break;
case 0x60 ... 0x6f: /* Zen4 Ryzen "Raphael" */
case 0x70 ... 0x7f: /* Zen4 Ryzen "Phoenix" */
sc->sc_temp_base = AMDTEMP_ZEN4_CCD_TMP_BASE;
maxreg = 8;
_Static_assert((int)NUM_CCDS >= 8, "");