ToDo:
Host Bus BridgeのPCI DeviceIDとCPU ModelIDを追加すると、一様それっぽい値が読めるようになった
--- sys/dev/amdsmn/amdsmn.c.orig +++ sys/dev/amdsmn/amdsmn.c @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0 #define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480 /* Also M70H, F19H M00H/M20H */ #define PCI_DEVICE_ID_AMD_17H_M60H_ROOT 0x1630 +#define PCI_DEVICE_ID_AMD_19H_M60H_ROOT 0x14d8 struct pciid; struct amdsmn_softc { @@ -104,6 +105,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_M60H_ROOT, + .amdsmn_addr_reg = F17H_SMN_ADDR_REG, + .amdsmn_data_reg = F17H_SMN_DATA_REG, + }, }; /*
--- sys/dev/amdtemp/amdtemp.c.orig +++ sys/dev/amdtemp/amdtemp.c @@ -111,6 +111,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_HOSTB17H_M10H_ROOT 0x15d0 #define DEVICEID_AMD_HOSTB17H_M30H_ROOT 0x1480 /* Also M70H, F19H M00H/M20H */ #define DEVICEID_AMD_HOSTB17H_M60H_ROOT 0x1630 +#define DEVICEID_AMD_HOSTB19H_M60H_ROOT 0x14d8 static const struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -135,6 +136,7 @@ static const struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M10H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M30H_ROOT, false }, { VENDORID_AMD, DEVICEID_AMD_HOSTB17H_M60H_ROOT, false }, + { VENDORID_AMD, DEVICEID_AMD_HOSTB19H_M60H_ROOT, false }, }; /* @@ -845,6 +847,7 @@ amdtemp_probe_ccd_sensors19h(device_t dev, uint32_t model) switch (model) { case 0x00 ... 0x0f: /* Zen3 EPYC "Milan" */ case 0x20 ... 0x2f: /* Zen3 Ryzen "Vermeer" */ + case 0x60 ... 0x6f: /* Zen4 Ryzen "Raphael" */ maxreg = 8; _Static_assert((int)NUM_CCDS >= 8, ""); break;
Linuxのk10temp driver側の変更を流し読みしたが、Ryzen 7000系の温度換算式はRyzen 5000とオフセットが違うみたいだ…(読み違え 2022/11/02修正)CCD毎のTdieの格納位置がRyzen 5000(AMDTEMP_17H_CCD_TMP_BASE)とRyzen 7000で異なる。(Tctlの格納位置AMDTEMP_17H_CUR_TMPは同じ模様)
https://www.coelacanth-dream.com/posts/2022/07/10/fam19h-60h-70h/
カテゴリー: Admin | Emacs | EPICS | Fortran | FreeBSD | GCC | hgsubversion | IPv6 | KEKB | LHC | Lisp | LLVM | MADX | Ryzen | SAD | samba | tDiary | unix | WWW | YaSAI | お仕事 | イベント | 出張 | 宴会 | 数学 | 艦これ | 買いもの | 追記 | 雑記
_ Y氏 [本当に残念... ]