sysclk + loader: add erista middle freqs and fix configurator

This commit is contained in:
souldbminersmwc
2025-12-19 19:50:27 -05:00
parent c6ac1d60bf
commit 7ac134aa47
6 changed files with 121 additions and 28 deletions

View File

@@ -105,33 +105,33 @@ volatile CustomizeTable C = {
/* AUTO only works up to 1305 GPU */
/* You can overwrite auto with any voltage (in mv) of your choice - offset will not be applied. */
.eristaGpuVoltArray = {
AUTO /* 76 */,
// AUTO /* 115 */,
AUTO /* 153 */,
// AUTO /* 192 */,
AUTO /* 230 */,
// AUTO /* 269 */,
AUTO /* 307 */,
// AUTO /* 346 */,
AUTO /* 384 */,
// AUTO /* 422 */,
AUTO /* 460 */,
// AUTO /* 499 */,
AUTO /* 537 */,
// AUTO /* 576 */,
AUTO /* 614 */,
// AUTO /* 652 */,
AUTO /* 691 */,
// AUTO /* 729 */,
AUTO /* 768 */,
// AUTO /* 806 */,
AUTO /* 844 */,
// AUTO /* 883 */,
AUTO /* 921 */,
// DEACTIVATED_GPU_FREQ /* 960 (Disabled by default) */,
DEACTIVATED_GPU_FREQ /* 998 (Disabled by default) */,
// DEACTIVATED_GPU_FREQ /* 1036 (Disabled by default) */,
DEACTIVATED_GPU_FREQ /* 1075 (Disabled by default) */,
AUTO /* 76 */,
AUTO /* 115 */,
AUTO /* 153 */,
AUTO /* 192 */,
AUTO /* 230 */,
AUTO /* 269 */,
AUTO /* 307 */,
AUTO /* 346 */,
AUTO /* 384 */,
AUTO /* 422 */,
AUTO /* 460 */,
AUTO /* 499 */,
AUTO /* 537 */,
AUTO /* 576 */,
AUTO /* 614 */,
AUTO /* 652 */,
AUTO /* 691 */,
AUTO /* 729 */,
AUTO /* 768 */,
AUTO /* 806 */,
AUTO /* 844 */,
AUTO /* 883 */,
AUTO /* 921 */,
DEACTIVATED_GPU_FREQ /* 960 (Disabled by default) */,
DEACTIVATED_GPU_FREQ /* 998 (Disabled by default) */,
DEACTIVATED_GPU_FREQ /* 1036 (Disabled by default) */,
DEACTIVATED_GPU_FREQ /* 1075 (Disabled by default) */,
},
.marikoGpuVoltArray = {
@@ -347,50 +347,85 @@ volatile CustomizeTable C = {
.eristaGpuDvfsTable = {
{ 76800, { }, { 814294, 8144, -940, 808, -21583, 226, } },
{ 115200, { }, { 856185, 8144, -940, 808, -21583, 226, } },
{ 153600, { }, { 856185, 8144, -940, 808, -21583, 226, } },
{ 192000, { }, { 898077, 8144, -940, 808, -21583, 226, } },
{ 230400, { }, { 898077, 8144, -940, 808, -21583, 226, } },
{ 268800, { }, { 939968, 8144, -940, 808, -21583, 226, } },
{ 307200, { }, { 939968, 8144, -940, 808, -21583, 226, } },
{ 345600, { }, { 981860, 8144, -940, 808, -21583, 226, } },
{ 384000, { }, { 981860, 8144, -940, 808, -21583, 226, } },
{ 422400, { }, { 1023751, 8144, -940, 808, -21583, 226, } },
{ 460800, { }, { 1023751, 8144, -940, 808, -21583, 226, } },
{ 499200, { }, { 1065642, 8144, -940, 808, -21583, 226, } },
{ 537600, { }, { 1065642, 8144, -940, 808, -21583, 226, } },
{ 576000, { }, { 1107534, 8144, -940, 808, -21583, 226, } },
{ 614400, { }, { 1107534, 8144, -940, 808, -21583, 226, } },
{ 652800, { }, { 1149425, 8144, -940, 808, -21583, 226, } },
{ 691200, { }, { 1149425, 8144, -940, 808, -21583, 226, } },
{ 729600, { }, { 1191317, 8144, -940, 808, -21583, 226, } },
{ 768000, { }, { 1191317, 8144, -940, 808, -21583, 226, } },
{ 806400, { }, { 1233208, 8144, -940, 808, -21583, 226, } },
{ 844800, { }, { 1233208, 8144, -940, 808, -21583, 226, } },
{ 883200, { }, { 1275100, 8144, -940, 808, -21583, 226, } },
{ 921600, { }, { 1275100, 8144, -940, 808, -21583, 226, } },
// { 998400, { }, { 1316991, 8144, -940, 808, -21583, 226, } },
},
.eristaGpuDvfsTableSLT = {
{ 76800, { }, { 814294, 8144, -940, 0, 0, 226, } },
{ 115200, { }, { 856185, 8144, -940, 0, 0, 226, } },
{ 153600, { }, { 856185, 8144, -940, 0, 0, 226, } },
{ 192000, { }, { 908077, 8144, -940, 0, 0, 226, } },
{ 230400, { }, { 908077, 8144, -940, 0, 0, 226, } },
{ 268800, { }, { 934968, 8144, -940, 0, 0, 226, } },
{ 307200, { }, { 934968, 8144, -940, 0, 0, 226, } },
{ 345600, { }, { 952860, 8144, -940, 0, 0, 226, } },
{ 384000, { }, { 952860, 8144, -940, 0, 0, 226, } },
{ 422400, { }, { 978751, 8144, -940, 0, 0, 226, } },
{ 460800, { }, { 978751, 8144, -940, 0, 0, 226, } },
{ 499200, { }, { 990642, 8144, -940, 0, 0, 226, } },
{ 537600, { }, { 990642, 8144, -940, 0, 0, 226, } },
{ 576000, { }, { 1017534, 8144, -940, 0, 0, 226, } },
{ 614400, { }, { 1017534, 8144, -940, 0, 0, 226, } },
{ 652800, { }, { 1042425, 8144, -940, 0, 0, 226, } },
{ 691200, { }, { 1042425, 8144, -940, 0, 0, 226, } },
{ 729600, { }, { 1066317, 8144, -940, 0, 0, 226, } },
{ 768000, { }, { 1066317, 8144, -940, 0, 0, 226, } },
{ 806400, { }, { 1093208, 8144, -940, 0, 0, 226, } },
{ 844800, { }, { 1093208, 8144, -940, 0, 0, 226, } },
{ 883200, { }, { 1118100, 8144, -940, 0, 0, 226, } },
{ 921600, { }, { 1118100, 8144, -940, 0, 0, 226, } },
// { 998400, { }, { 1156991, 8144, -940, 0, 0, 226, } },
{ 960000, { }, { 1156991, 8144, -940, 0, 0, 226, } },
},
.eristaGpuDvfsTableHiOPT = {
{ 76800, { }, { 814294, 8144, -940, 0, 0, 226, } },
{ 115200, { }, { 856185, 8144, -940, 0, 0, 226, } },
{ 153600, { }, { 856185, 8144, -940, 0, 0, 226, } },
{ 192000, { }, { 908077, 8144, -940, 0, 0, 226, } },
{ 230400, { }, { 908077, 8144, -940, 0, 0, 226, } },
{ 268800, { }, { 934968, 8144, -940, 0, 0, 226, } },
{ 307200, { }, { 934968, 8144, -940, 0, 0, 226, } },
{ 345600, { }, { 952860, 8144, -940, 0, 0, 226, } },
{ 384000, { }, { 952860, 8144, -940, 0, 0, 226, } },
{ 422400, { }, { 978751, 8144, -940, 0, 0, 226, } },
{ 460800, { }, { 978751, 8144, -940, 0, 0, 226, } },
{ 499200, { }, { 990642, 8144, -940, 0, 0, 226, } },
{ 537600, { }, { 990642, 8144, -940, 0, 0, 226, } },
{ 576000, { }, { 1017534, 8144, -940, 0, 0, 226, } },
{ 614400, { }, { 1017534, 8144, -940, 0, 0, 226, } },
{ 652800, { }, { 1042425, 8144, -940, 0, 0, 226, } },
{ 691200, { }, { 1042425, 8144, -940, 0, 0, 226, } },
{ 729600, { }, { 1066317, 8144, -940, 0, 0, 226, } },
{ 768000, { }, { 1066317, 8144, -940, 0, 0, 226, } },
{ 806400, { }, { 1093208, 8144, -940, 0, 0, 226, } },
{ 844800, { }, { 1093208, 8144, -940, 0, 0, 226, } },
{ 883200, { }, { 1118100, 8144, -940, 0, 0, 226, } },
{ 921600, { }, { 1118100, 8144, -940, 0, 0, 226, } },
{ 960000, { }, { 1156991, 8144, -940, 0, 0, 226, } },
{ 998400, { }, { 1156991, 8144, -940, 0, 0, 226, } },
{ 1036800, { }, { } },
{ 1075200, { }, { } },
// { 1152000, { }, { } },
},

View File

@@ -87,7 +87,9 @@ typedef enum {
KipConfigValue_mem_burst_write_latency,
KipConfigValue_eristaCpuUV,
KipConfigValue_eristaCpuVmin,
KipConfigValue_eristaCpuMaxVolt,
KipConfigValue_eristaCpuUnlock,
KipConfigValue_marikoCpuUVLow,
KipConfigValue_marikoCpuUVHigh,
@@ -281,8 +283,12 @@ static inline const char* sysclkFormatConfigValue(SysClkConfigValue val, bool pr
// CPU Erista
case KipConfigValue_eristaCpuUV:
return pretty ? "Erista CPU Undervolt" : "erista_cpu_uv";
case KipConfigValue_eristaCpuVmin:
return pretty ? "Erista CPU vMin" : "erista_cpu_vmin";
case KipConfigValue_eristaCpuMaxVolt:
return pretty ? "Erista CPU Max Voltage" : "erista_cpu_max_volt";
case KipConfigValue_eristaCpuUnlock:
return pretty ? "Erista CPU Unlock" : "erista_cpu_unlock";
// CPU Mariko
case KipConfigValue_marikoCpuUVLow:
@@ -554,6 +560,8 @@ static inline uint64_t sysclkValidConfigValue(SysClkConfigValue val, uint64_t in
case KipConfigValue_g_volt_e_998400:
case KipConfigValue_g_volt_e_1036800:
case KipConfigValue_g_volt_e_1075200:
case KipConfigValue_eristaCpuVmin:
case KipConfigValue_eristaCpuUnlock:
return true;
case HorizonOCConfigValue_BatteryChargeCurrent:
return ((input >= 1024) && (input <= 3072)) || !input;

View File

@@ -588,6 +588,17 @@ void MiscGui::listUI()
{},
false
);
addConfigButton(
KipConfigValue_eristaCpuVmin,
"CPU VMIN",
ValueRange(700, 900, 5, "mV", 1),
"CPU VMIN",
&thresholdsDisabled,
{},
{},
false
);
addConfigToggle(KipConfigValue_eristaCpuUnlock, "CPU Unlock");
} else {
std::vector<NamedValue> marikoTableConf = {
NamedValue("Auto", 0),
@@ -656,7 +667,30 @@ void MiscGui::listUI()
maxClkOptions,
false
);
addConfigButton(
KipConfigValue_marikoCpuLowVmin,
"CPU Low VMIN",
ValueRange(550, 750, 5, "mV", 1),
"CPU VMIN",
&thresholdsDisabled,
{},
{},
false
);
addConfigButton(
KipConfigValue_marikoCpuHighVmin,
"CPU High VMIN",
ValueRange(650, 850, 5, "mV", 1),
"CPU VMIN",
&thresholdsDisabled,
{},
{},
false
);
}
// ========== GPU CATEGORY ==========
this->listElement->addItem(new tsl::elm::CategoryHeader("GPU Settings"));

View File

@@ -558,7 +558,9 @@ void ClockManager::SetKipData() {
CUST_WRITE_FIELD_BATCH(&table, mem_burst_write_latency, this->config->GetConfigValue(KipConfigValue_mem_burst_write_latency));
CUST_WRITE_FIELD_BATCH(&table, eristaCpuUV, this->config->GetConfigValue(KipConfigValue_eristaCpuUV));
CUST_WRITE_FIELD_BATCH(&table, eristaCpuVmin, this->config->GetConfigValue(KipConfigValue_eristaCpuVmin));
CUST_WRITE_FIELD_BATCH(&table, eristaCpuMaxVolt, this->config->GetConfigValue(KipConfigValue_eristaCpuMaxVolt));
CUST_WRITE_FIELD_BATCH(&table, eristaCpuUnlock, this->config->GetConfigValue(KipConfigValue_eristaCpuUnlock));
CUST_WRITE_FIELD_BATCH(&table, marikoCpuUVLow, this->config->GetConfigValue(KipConfigValue_marikoCpuUVLow));
CUST_WRITE_FIELD_BATCH(&table, marikoCpuUVHigh, this->config->GetConfigValue(KipConfigValue_marikoCpuUVHigh));
@@ -630,7 +632,11 @@ void ClockManager::GetKipData() {
configValues.values[KipConfigValue_mem_burst_write_latency] = cust_get_burst_write_lat(&table);
configValues.values[KipConfigValue_eristaCpuUV] = cust_get_erista_cpu_uv(&table);
configValues.values[KipConfigValue_eristaCpuVmin] = cust_get_eristaCpuVmin(&table);
configValues.values[KipConfigValue_eristaCpuMaxVolt] = cust_get_erista_cpu_max_volt(&table);
configValues.values[KipConfigValue_eristaCpuUnlock] = cust_get_eristaCpuUnlock(&table);
configValues.values[KipConfigValue_marikoCpuUVLow] = cust_get_mariko_cpu_uv_low(&table);
configValues.values[KipConfigValue_marikoCpuUVHigh] = cust_get_mariko_cpu_uv_high(&table);
configValues.values[KipConfigValue_tableConf] = cust_get_table_conf(&table);

View File

@@ -27,8 +27,12 @@ typedef struct {
u32 t8_tREFI;
u32 mem_burst_read_latency;
u32 mem_burst_write_latency;
u32 eristaCpuUV;
u32 eristaCpuVmin;
u32 eristaCpuMaxVolt;
u32 eristaCpuUnlock;
u32 marikoCpuUVLow;
u32 marikoCpuUVHigh;
u32 tableConf;
@@ -174,7 +178,10 @@ static inline bool cust_set_burst_read_lat(const char* p, u32 v) { CUST_WRITE_FI
static inline bool cust_set_burst_write_lat(const char* p, u32 v) { CUST_WRITE_FIELD(p, mem_burst_write_latency, v); }
static inline bool cust_set_erista_cpu_uv(const char* p, u32 v) { CUST_WRITE_FIELD(p, eristaCpuUV, v); }
static inline bool cust_set_eristaCpuVmin(const char* p, u32 v) { CUST_WRITE_FIELD(p, eristaCpuVmin, v); }
static inline bool cust_set_erista_cpu_max_volt(const char* p, u32 v) { CUST_WRITE_FIELD(p, eristaCpuMaxVolt, v); }
static inline bool cust_set_eristaCpuUnlock(const char* p, u32 v) { CUST_WRITE_FIELD(p, eristaCpuUnlock, v); }
static inline bool cust_set_mariko_cpu_uv_low(const char* p, u32 v) { CUST_WRITE_FIELD(p, marikoCpuUVLow, v); }
static inline bool cust_set_mariko_cpu_uv_high(const char* p, u32 v) { CUST_WRITE_FIELD(p, marikoCpuUVHigh, v); }
static inline bool cust_set_mariko_cpu_low_vmin(const char* p, u32 v) { CUST_WRITE_FIELD(p, marikoCpuLowVmin, v); }
@@ -239,7 +246,10 @@ static inline u32 cust_get_burst_read_lat(const CustomizeTable* t) { return CUST
static inline u32 cust_get_burst_write_lat(const CustomizeTable* t) { return CUST_GET_FIELD(t, mem_burst_write_latency); }
static inline u32 cust_get_erista_cpu_uv(const CustomizeTable* t) { return CUST_GET_FIELD(t, eristaCpuUV); }
static inline u32 cust_get_eristaCpuVmin(const CustomizeTable* t) { return CUST_GET_FIELD(t, eristaCpuVmin); }
static inline u32 cust_get_erista_cpu_max_volt(const CustomizeTable* t) { return CUST_GET_FIELD(t, eristaCpuMaxVolt); }
static inline u32 cust_get_eristaCpuUnlock(const CustomizeTable* t) { return CUST_GET_FIELD(t, eristaCpuUnlock); }
static inline u32 cust_get_mariko_cpu_uv_low(const CustomizeTable* t) { return CUST_GET_FIELD(t, marikoCpuUVLow); }
static inline u32 cust_get_mariko_cpu_uv_high(const CustomizeTable* t) { return CUST_GET_FIELD(t, marikoCpuUVHigh); }
static inline u32 cust_get_mariko_cpu_low_vmin(const CustomizeTable* t) { return CUST_GET_FIELD(t, marikoCpuLowVmin); }