diff --git a/lib/api.c b/lib/api.c index 240cad7b..415a227b 100644 --- a/lib/api.c +++ b/lib/api.c @@ -206,6 +206,7 @@ static int request_table_addr(ryzen_access ry) case FAM_CEZANNE: case FAM_REMBRANDT: case FAM_PHOENIX: + case FAM_HAWKPOINT: get_table_addr_msg = 0x66; break; default: @@ -219,6 +220,7 @@ static int request_table_addr(ryzen_access ry) { case FAM_REMBRANDT: case FAM_PHOENIX: + case FAM_HAWKPOINT: ry->table_addr = (uint64_t) args.arg1 << 32 | args.arg0; break; default: @@ -253,6 +255,7 @@ static int request_transfer_table(ryzen_access ry) case FAM_CEZANNE: case FAM_REMBRANDT: case FAM_PHOENIX: + case FAM_HAWKPOINT: transfer_table_msg = 0x65; break; default: @@ -440,6 +443,7 @@ EXP int CALL set_stapm_limit(ryzen_access ry, uint32_t value){ case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x14); if (err) { printf("%s: Retry with PSMU\n", __func__); @@ -468,6 +472,7 @@ EXP int CALL set_fast_limit(ryzen_access ry, uint32_t value){ case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x15); default: break; @@ -492,6 +497,7 @@ EXP int CALL set_slow_limit(ryzen_access ry, uint32_t value){ case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x16); default: break; @@ -516,6 +522,7 @@ EXP int CALL set_slow_time(ryzen_access ry, uint32_t value){ case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x17); default: break; @@ -540,6 +547,7 @@ EXP int CALL set_stapm_time(ryzen_access ry, uint32_t value){ case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x18); default: break; @@ -564,6 +572,7 @@ EXP int CALL set_tctl_temp(ryzen_access ry, uint32_t value){ case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x19); default: break; @@ -588,6 +597,7 @@ EXP int CALL set_vrm_current(ryzen_access ry, uint32_t value){ case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x1a); default: break; @@ -612,6 +622,7 @@ EXP int CALL set_vrmsoc_current(ryzen_access ry, uint32_t value){ case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x1b); default: break; @@ -661,6 +672,7 @@ EXP int CALL set_vrmmax_current(ryzen_access ry, uint32_t value){ case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x1c); break; case FAM_VANGOGH: @@ -700,6 +712,7 @@ EXP int CALL set_vrmsocmax_current(ryzen_access ry, uint32_t value){ case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x1d); default: break; @@ -954,6 +967,7 @@ EXP int CALL set_prochot_deassertion_ramp(ryzen_access ry, uint32_t value) { case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x1f); default: break; @@ -976,6 +990,7 @@ EXP int CALL set_apu_skin_temp_limit(ryzen_access ry, uint32_t value) { case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x33); break; default: @@ -999,6 +1014,7 @@ EXP int CALL set_dgpu_skin_temp_limit(ryzen_access ry, uint32_t value) { case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x34); break; default: @@ -1019,6 +1035,7 @@ EXP int CALL set_apu_slow_limit(ryzen_access ry, uint32_t value) { break; case FAM_REMBRANDT: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x23); break; default: @@ -1041,6 +1058,7 @@ EXP int CALL set_skin_temp_power_limit(ryzen_access ry, uint32_t value) { case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x4a); break; default: @@ -1061,6 +1079,7 @@ EXP int CALL set_gfx_clk(ryzen_access ry, uint32_t value) { case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust_psmu(0x89); break; default: @@ -1087,6 +1106,7 @@ EXP int CALL set_power_saving(ryzen_access ry) { case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x12); break; default: @@ -1113,6 +1133,7 @@ EXP int CALL set_max_performance(ryzen_access ry) { case FAM_REMBRANDT: case FAM_MENDOCINO: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x11); break; default: @@ -1241,6 +1262,7 @@ EXP int CALL set_coall(ryzen_access ry, uint32_t value) { case FAM_REMBRANDT: case FAM_VANGOGH: case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x4C); break; default: @@ -1259,6 +1281,8 @@ EXP int CALL set_coper(ryzen_access ry, uint32_t value) { case FAM_LUCIENNE: _do_adjust(0x54); case FAM_REMBRANDT: + case FAM_PHOENIX: + case FAM_HAWKPOINT: _do_adjust(0x4B); break; default: @@ -1278,6 +1302,8 @@ EXP int CALL set_cogfx(ryzen_access ry, uint32_t value) { _do_adjust(0x64); break; case FAM_REMBRANDT: + case FAM_PHOENIX: + case FAM_HAWKPOINT: case FAM_VANGOGH: _do_adjust_psmu(0xB7); break; diff --git a/lib/cpuid.c b/lib/cpuid.c index 706fdccb..31507b08 100644 --- a/lib/cpuid.c +++ b/lib/cpuid.c @@ -72,7 +72,7 @@ static enum ryzen_family cpuid_load_family() }; break; - case 0x19: /* Zen3 */ + case 0x19: /* Zen3, Zen4 */ switch (model) { case 80: return FAM_CEZANNE; @@ -82,11 +82,21 @@ static enum ryzen_family cpuid_load_family() case 116: case 120: return FAM_PHOENIX; + case 117: + return FAM_HAWKPOINT; default: printf("Fam%xh: unsupported model %d\n", family, model); break; }; break; + case 0x1A: /* Zen5, Zen6 */ + switch (model) { + case 32: + return FAM_STRIXPOINT; + default: + printf("Fam%xh: unsupported model %d\n", family, model); + break; + } default: printf("Unsupported family: %xh\n", family); diff --git a/lib/nb_smu_ops.c b/lib/nb_smu_ops.c index c0170b0d..513a970e 100644 --- a/lib/nb_smu_ops.c +++ b/lib/nb_smu_ops.c @@ -74,7 +74,7 @@ smu_t get_smu(nb_t nb, int smu_type) { /* Fill SMU information */ switch(smu_type){ case TYPE_MP1: - if (family == FAM_REMBRANDT || family == FAM_VANGOGH || family == FAM_MENDOCINO || family == FAM_PHOENIX) { + if (family == FAM_REMBRANDT || family == FAM_VANGOGH || family == FAM_MENDOCINO || family == FAM_PHOENIX || family == FAM_HAWKPOINT) { smu->msg = MP1_C2PMSG_MESSAGE_ADDR_2; smu->rep = MP1_C2PMSG_RESPONSE_ADDR_2; smu->arg_base = MP1_C2PMSG_ARG_BASE_2; diff --git a/lib/ryzenadj.h b/lib/ryzenadj.h index 010f4ae5..6809435c 100644 --- a/lib/ryzenadj.h +++ b/lib/ryzenadj.h @@ -25,6 +25,8 @@ enum ryzen_family { FAM_REMBRANDT, FAM_MENDOCINO, FAM_PHOENIX, + FAM_HAWKPOINT, + FAM_STRIXPOINT, FAM_END }; diff --git a/main.c b/main.c index 12f2dafa..7850f282 100644 --- a/main.c +++ b/main.c @@ -73,7 +73,9 @@ static const char *family_name(enum ryzen_family fam) case FAM_LUCIENNE: return "Lucienne"; case FAM_VANGOGH: return "Vangogh"; case FAM_REMBRANDT: return "Rembrandt"; - case FAM_PHOENIX: return "Phoenix"; + case FAM_PHOENIX: return "Phoenix Point"; + case FAM_HAWKPOINT: return "Hawk Point"; + case FAM_STRIXPOINT: return "Strix Point"; default: break; }