Compare commits
2 Commits
main
...
custom-soc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
624952ca49 | ||
|
|
a32f42290f |
@@ -48,6 +48,15 @@ volatile CustomizeTable C = {
|
||||
.marikoEmcVddqVolt = 600000,
|
||||
|
||||
.emcDvbShift = 0,
|
||||
|
||||
.marikoSocVoltArray = {
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
900,
|
||||
},
|
||||
|
||||
.marikoSocVmax = 0, /* 0 = stock limits (1450 - 1597 is 1050mV, 1598-1708 is 1025mV, 1709+ is 1000mV). */
|
||||
|
||||
/* Primary. */
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#define CUST_REV 2
|
||||
#define CUST_REV 3
|
||||
#define KIP_VERSION 220
|
||||
|
||||
#include "oc_common.hpp"
|
||||
@@ -93,6 +93,7 @@ struct CustomizeTable {
|
||||
u32 marikoEmcMaxClock;
|
||||
u32 marikoEmcVddqVolt;
|
||||
u32 emcDvbShift;
|
||||
u32 marikoSocVoltArray[pcv::DvfsTableEntryLimit - 3]; /* Don't overwrite default tables. */
|
||||
u32 marikoSocVmax;
|
||||
// advanced config
|
||||
u32 t1_tRCD;
|
||||
|
||||
@@ -90,6 +90,35 @@ typedef enum {
|
||||
KipConfigValue_emcDvbShift,
|
||||
KipConfigValue_marikoSocVmax,
|
||||
|
||||
KipConfigValue_s_volt_1666000,
|
||||
KipConfigValue_s_volt_1733000,
|
||||
KipConfigValue_s_volt_1800000,
|
||||
KipConfigValue_s_volt_1866000,
|
||||
KipConfigValue_s_volt_1933000,
|
||||
KipConfigValue_s_volt_2000000,
|
||||
KipConfigValue_s_volt_2066000,
|
||||
KipConfigValue_s_volt_2133000,
|
||||
KipConfigValue_s_volt_2200000,
|
||||
KipConfigValue_s_volt_2266000,
|
||||
KipConfigValue_s_volt_2333000,
|
||||
KipConfigValue_s_volt_2400000,
|
||||
KipConfigValue_s_volt_2466000,
|
||||
KipConfigValue_s_volt_2533000,
|
||||
KipConfigValue_s_volt_2600000,
|
||||
KipConfigValue_s_volt_2666000,
|
||||
KipConfigValue_s_volt_2733000,
|
||||
KipConfigValue_s_volt_2800000,
|
||||
KipConfigValue_s_volt_2866000,
|
||||
KipConfigValue_s_volt_2933000,
|
||||
KipConfigValue_s_volt_3000000,
|
||||
KipConfigValue_s_volt_3066000,
|
||||
KipConfigValue_s_volt_3133000,
|
||||
KipConfigValue_s_volt_3200000,
|
||||
KipConfigValue_s_volt_3266000,
|
||||
KipConfigValue_s_volt_3333000,
|
||||
KipConfigValue_s_volt_3400000,
|
||||
KipConfigValue_s_volt_3466000,
|
||||
|
||||
KipConfigValue_t1_tRCD,
|
||||
KipConfigValue_t2_tRP,
|
||||
KipConfigValue_t3_tRAS,
|
||||
@@ -317,6 +346,36 @@ static inline const char* hocclkFormatConfigValue(HocClkConfigValue val, bool pr
|
||||
return pretty ? "Mariko EMC VDDQ Voltage" : "mariko_emc_vddq_volt";
|
||||
case KipConfigValue_emcDvbShift:
|
||||
return pretty ? "EMC DVB Shift" : "emc_dvb_shift";
|
||||
|
||||
case KipConfigValue_s_volt_1666000: return pretty ? "Mariko Soc Volt 1666 MHz" : "s_volt_1666000";
|
||||
case KipConfigValue_s_volt_1733000: return pretty ? "Mariko Soc Volt 1733 MHz" : "s_volt_1733000";
|
||||
case KipConfigValue_s_volt_1800000: return pretty ? "Mariko Soc Volt 1800 MHz" : "s_volt_1800000";
|
||||
case KipConfigValue_s_volt_1866000: return pretty ? "Mariko Soc Volt 1866 MHz" : "s_volt_1866000";
|
||||
case KipConfigValue_s_volt_1933000: return pretty ? "Mariko Soc Volt 1933 MHz" : "s_volt_1933000";
|
||||
case KipConfigValue_s_volt_2000000: return pretty ? "Mariko Soc Volt 2000 MHz" : "s_volt_2000000";
|
||||
case KipConfigValue_s_volt_2066000: return pretty ? "Mariko Soc Volt 2066 MHz" : "s_volt_2066000";
|
||||
case KipConfigValue_s_volt_2133000: return pretty ? "Mariko Soc Volt 2133 MHz" : "s_volt_2133000";
|
||||
case KipConfigValue_s_volt_2200000: return pretty ? "Mariko Soc Volt 2200 MHz" : "s_volt_2200000";
|
||||
case KipConfigValue_s_volt_2266000: return pretty ? "Mariko Soc Volt 2266 MHz" : "s_volt_2266000";
|
||||
case KipConfigValue_s_volt_2333000: return pretty ? "Mariko Soc Volt 2333 MHz" : "s_volt_2333000";
|
||||
case KipConfigValue_s_volt_2400000: return pretty ? "Mariko Soc Volt 2400 MHz" : "s_volt_2400000";
|
||||
case KipConfigValue_s_volt_2466000: return pretty ? "Mariko Soc Volt 2466 MHz" : "s_volt_2466000";
|
||||
case KipConfigValue_s_volt_2533000: return pretty ? "Mariko Soc Volt 2533 MHz" : "s_volt_2533000";
|
||||
case KipConfigValue_s_volt_2600000: return pretty ? "Mariko Soc Volt 2600 MHz" : "s_volt_2600000";
|
||||
case KipConfigValue_s_volt_2666000: return pretty ? "Mariko Soc Volt 2666 MHz" : "s_volt_2666000";
|
||||
case KipConfigValue_s_volt_2733000: return pretty ? "Mariko Soc Volt 2733 MHz" : "s_volt_2733000";
|
||||
case KipConfigValue_s_volt_2800000: return pretty ? "Mariko Soc Volt 2800 MHz" : "s_volt_2800000";
|
||||
case KipConfigValue_s_volt_2866000: return pretty ? "Mariko Soc Volt 2866 MHz" : "s_volt_2866000";
|
||||
case KipConfigValue_s_volt_2933000: return pretty ? "Mariko Soc Volt 2933 MHz" : "s_volt_2933000";
|
||||
case KipConfigValue_s_volt_3000000: return pretty ? "Mariko Soc Volt 3000 MHz" : "s_volt_3000000";
|
||||
case KipConfigValue_s_volt_3066000: return pretty ? "Mariko Soc Volt 3066 MHz" : "s_volt_3066000";
|
||||
case KipConfigValue_s_volt_3133000: return pretty ? "Mariko Soc Volt 3133 MHz" : "s_volt_3133000";
|
||||
case KipConfigValue_s_volt_3200000: return pretty ? "Mariko Soc Volt 3200 MHz" : "s_volt_3200000";
|
||||
case KipConfigValue_s_volt_3266000: return pretty ? "Mariko Soc Volt 3266 MHz" : "s_volt_3266000";
|
||||
case KipConfigValue_s_volt_3333000: return pretty ? "Mariko Soc Volt 3333 MHz" : "s_volt_3333000";
|
||||
case KipConfigValue_s_volt_3400000: return pretty ? "Mariko Soc Volt 3400 MHz" : "s_volt_3400000";
|
||||
case KipConfigValue_s_volt_3466000: return pretty ? "Mariko Soc Volt 3466 MHz" : "s_volt_3466000";
|
||||
|
||||
case KipConfigValue_marikoSocVmax:
|
||||
return pretty ? "SOC Vmax" : "soc_vmax";
|
||||
// Memory timings
|
||||
@@ -578,6 +637,34 @@ static inline uint64_t hocclkValidConfigValue(HocClkConfigValue val, uint64_t in
|
||||
case KipConfigValue_marikoEmcMaxClock:
|
||||
case KipConfigValue_marikoEmcVddqVolt:
|
||||
case KipConfigValue_emcDvbShift:
|
||||
case KipConfigValue_s_volt_1666000:
|
||||
case KipConfigValue_s_volt_1733000:
|
||||
case KipConfigValue_s_volt_1800000:
|
||||
case KipConfigValue_s_volt_1866000:
|
||||
case KipConfigValue_s_volt_1933000:
|
||||
case KipConfigValue_s_volt_2000000:
|
||||
case KipConfigValue_s_volt_2066000:
|
||||
case KipConfigValue_s_volt_2133000:
|
||||
case KipConfigValue_s_volt_2200000:
|
||||
case KipConfigValue_s_volt_2266000:
|
||||
case KipConfigValue_s_volt_2333000:
|
||||
case KipConfigValue_s_volt_2400000:
|
||||
case KipConfigValue_s_volt_2466000:
|
||||
case KipConfigValue_s_volt_2533000:
|
||||
case KipConfigValue_s_volt_2600000:
|
||||
case KipConfigValue_s_volt_2666000:
|
||||
case KipConfigValue_s_volt_2733000:
|
||||
case KipConfigValue_s_volt_2800000:
|
||||
case KipConfigValue_s_volt_2866000:
|
||||
case KipConfigValue_s_volt_2933000:
|
||||
case KipConfigValue_s_volt_3000000:
|
||||
case KipConfigValue_s_volt_3066000:
|
||||
case KipConfigValue_s_volt_3133000:
|
||||
case KipConfigValue_s_volt_3200000:
|
||||
case KipConfigValue_s_volt_3266000:
|
||||
case KipConfigValue_s_volt_3333000:
|
||||
case KipConfigValue_s_volt_3400000:
|
||||
case KipConfigValue_s_volt_3466000:
|
||||
case KipConfigValue_marikoSocVmax:
|
||||
case KipConfigValue_t1_tRCD:
|
||||
case KipConfigValue_t2_tRP:
|
||||
|
||||
@@ -57,6 +57,7 @@ class SafetySubMenuGui;
|
||||
class RamSubmenuGui;
|
||||
class RamTimingsSubmenuGui;
|
||||
class RamLatenciesSubmenuGui;
|
||||
class SocCustomTableSubmenuGui;
|
||||
class CpuSubmenuGui;
|
||||
class GpuSubmenuGui;
|
||||
class GpuCustomTableSubmenuGui;
|
||||
@@ -615,7 +616,7 @@ protected:
|
||||
false
|
||||
|
||||
);
|
||||
|
||||
|
||||
addConfigButton(
|
||||
HocClkConfigValue_PollingIntervalMs,
|
||||
"Polling Interval",
|
||||
@@ -932,8 +933,8 @@ protected:
|
||||
|
||||
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader("RAM Settings"));
|
||||
|
||||
addConfigTrackbar(KipConfigValue_emcDvbShift, "SoC DVB Shift", ValueRange(0, 16, 1)); // yes, DVB 16 is nessesary
|
||||
|
||||
addConfigTrackbar(KipConfigValue_emcDvbShift, "SoC DVB Shift", ValueRange(0, 16, 1)); // yes, DVB 16 is nessesary
|
||||
if(IsMariko()) {
|
||||
u32 socSpeedo = this->context->speedos[HocClkSpeedo_SOC];
|
||||
std::string autoText = "1000 mV";
|
||||
@@ -971,7 +972,7 @@ protected:
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
addConfigToggle(KipConfigValue_hpMode, "HP Mode", true);
|
||||
|
||||
std::map<uint32_t, std::string> emc_voltage_label = {
|
||||
@@ -1124,6 +1125,18 @@ protected:
|
||||
timingsSubmenu->setValue(R_ARROW);
|
||||
this->listElement->addItem(timingsSubmenu);
|
||||
|
||||
if (IsMariko()) {
|
||||
tsl::elm::ListItem *customSocTableSubmenu = new tsl::elm::ListItem("SOC Voltage Table");
|
||||
customSocTableSubmenu->setClickListener([](u64 keys) {
|
||||
if (keys & HidNpadButton_A) {
|
||||
tsl::changeTo<SocCustomTableSubmenuGui>();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
customSocTableSubmenu->setValue(R_ARROW);
|
||||
this->listElement->addItem(customSocTableSubmenu);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1483,6 +1496,66 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
class SocCustomTableSubmenuGui : public MiscGui {
|
||||
public:
|
||||
SocCustomTableSubmenuGui() { }
|
||||
|
||||
protected:
|
||||
void listUI() override {
|
||||
|
||||
Result rc = hocclkIpcGetConfigValues(this->configList); // populate config list early otherwise wont work
|
||||
if (R_FAILED(rc)) [[unlikely]] {
|
||||
FatalGui::openWithResultCode("hocclkIpcGetConfigValues", rc);
|
||||
return;
|
||||
}
|
||||
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader("SOC Custom Table (mV)"));
|
||||
|
||||
ValueThresholds socVmaxThresholds(1075, 1150);
|
||||
|
||||
std::vector<NamedValue> socVolts = {
|
||||
NamedValue("No Override", 0),
|
||||
NamedValue("650mV", 650), NamedValue("675mV", 675), NamedValue("700mV", 700),
|
||||
NamedValue("725mV", 725), NamedValue("750mV", 750), NamedValue("775mV", 775),
|
||||
NamedValue("800mV", 800), NamedValue("825mV", 825), NamedValue("850mV", 850),
|
||||
NamedValue("875mV", 875), NamedValue("900mV", 900), NamedValue("925mV", 925),
|
||||
NamedValue("950mV", 950), NamedValue("975mV", 975), NamedValue("1000mV", 1000),
|
||||
NamedValue("1025mV", 1025), NamedValue("1050mV", 1050), NamedValue("1075mV", 1075),
|
||||
NamedValue("1100mV", 1100), NamedValue("1125mV", 1125), NamedValue("1150mV", 1150),
|
||||
NamedValue("1175mV", 1175), NamedValue("1200mV", 1200),
|
||||
};
|
||||
|
||||
addConfigButton(KipConfigValue_s_volt_1666000, "1666MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_1733000, "1733MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_1800000, "1800MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_1866000, "1866MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_1933000, "1933MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2000000, "2000MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2066000, "2066MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2133000, "2133MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2200000, "2200MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2266000, "2266MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2333000, "2333MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2400000, "2400MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2466000, "2466MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2533000, "2533MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2600000, "2600MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2666000, "2666MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2733000, "2733MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2800000, "2800MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2866000, "2866MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_2933000, "2933MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_3000000, "3000MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_3066000, "3066MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_3133000, "3133MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_3200000, "3200MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_3266000, "3266MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_3333000, "3333MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_3400000, "3400MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
addConfigButton(KipConfigValue_s_volt_3466000, "3466MHz", ValueRange(0, 0, 0, "0", 1), "Voltage", &socVmaxThresholds, {}, socVolts, false, true);
|
||||
}
|
||||
};
|
||||
|
||||
class CpuSubmenuGui : public MiscGui {
|
||||
public:
|
||||
CpuSubmenuGui() { }
|
||||
@@ -1563,7 +1636,7 @@ protected:
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
|
||||
std::vector<NamedValue> maxClkOptions = {
|
||||
NamedValue("1963 MHz", 1963500),
|
||||
NamedValue("2091 MHz", 2091000),
|
||||
|
||||
@@ -30,7 +30,7 @@ LIBNAMES := minIni
|
||||
# major minor patch
|
||||
TARGET_VERSION := 2.2.0
|
||||
KIP_VERSION := 220
|
||||
CUST_REV := 2
|
||||
CUST_REV := 3
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace kip {
|
||||
}
|
||||
|
||||
u32 custRev = cust_get_cust_rev(&table);
|
||||
u32 kipVersion = cust_get_kip_version(&table)
|
||||
u32 kipVersion = cust_get_kip_version(&table);
|
||||
if (custRev < CUST_REV || kipVersion < KIP_VERSION) {
|
||||
notification::writeNotification("Horizon OC\nOutdated kip detected!\nPlease update Horizon OC");
|
||||
fileUtils::LogLine("Cust revision: %u", custRev);
|
||||
@@ -77,6 +77,11 @@ namespace kip {
|
||||
CUST_WRITE_FIELD_BATCH(&table, marikoEmcMaxClock, config::GetConfigValue(KipConfigValue_marikoEmcMaxClock));
|
||||
CUST_WRITE_FIELD_BATCH(&table, marikoEmcVddqVolt, config::GetConfigValue(KipConfigValue_marikoEmcVddqVolt));
|
||||
CUST_WRITE_FIELD_BATCH(&table, emcDvbShift, config::GetConfigValue(KipConfigValue_emcDvbShift));
|
||||
|
||||
for (u32 i = 0; i < 28; i++) {
|
||||
table.marikoSocVoltArray[i] = config::GetConfigValue((HocClkConfigValue)(KipConfigValue_s_volt_1666000 + i));
|
||||
}
|
||||
|
||||
CUST_WRITE_FIELD_BATCH(&table, marikoSocVmax, config::GetConfigValue(KipConfigValue_marikoSocVmax));
|
||||
|
||||
CUST_WRITE_FIELD_BATCH(&table, t1_tRCD, config::GetConfigValue(KipConfigValue_t1_tRCD));
|
||||
@@ -210,7 +215,7 @@ namespace kip {
|
||||
clockManager::gContext.custRev = cust_get_cust_rev(&table);
|
||||
|
||||
u32 custRev = cust_get_cust_rev(&table);
|
||||
u32 kipVersion = cust_get_kip_version(&table)
|
||||
u32 kipVersion = cust_get_kip_version(&table);
|
||||
if (custRev < CUST_REV || kipVersion < KIP_VERSION) {
|
||||
notification::writeNotification("Horizon OC\nOutdated kip detected!\nPlease update Horizon OC");
|
||||
fileUtils::LogLine("Cust revision: %u", custRev);
|
||||
@@ -295,6 +300,10 @@ namespace kip {
|
||||
configValues.values[KipConfigValue_g_volt_e_76800 + i] = cust_get_erista_gpu_volt(&table, i);
|
||||
}
|
||||
|
||||
for (u32 i = 0; i < 28; i++) {
|
||||
configValues.values[KipConfigValue_s_volt_1666000 + i] = cust_get_mariko_soc_volt(&table, i);
|
||||
}
|
||||
|
||||
configValues.values[KipConfigValue_t7_tWTR_fine_tune] = cust_get_tWTR_fine_tune(&table);
|
||||
configValues.values[KipConfigValue_t6_tRTW_fine_tune] = cust_get_tRTW_fine_tune(&table);
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@ namespace kip {
|
||||
u32 marikoEmcMaxClock;
|
||||
u32 marikoEmcVddqVolt;
|
||||
u32 emcDvbShift;
|
||||
u32 marikoSocVoltArray[31 - 3]; /* LUT Limit - 3 stock entries. */
|
||||
u32 marikoSocVmax;
|
||||
|
||||
// advanced config
|
||||
@@ -287,6 +288,14 @@ namespace kip {
|
||||
return cust_write_table(p, &t);
|
||||
}
|
||||
|
||||
static inline bool cust_set_mariko_soc_volt(const char* p, int idx, u32 v) {
|
||||
if (idx < 0 || idx >= 24) return false;
|
||||
CustomizeTable t;
|
||||
if (!cust_read_table(p, &t)) return false;
|
||||
t.marikoSocVoltArray[idx] = v;
|
||||
return cust_write_table(p, &t);
|
||||
}
|
||||
|
||||
static inline u32 cust_get_field(const CustomizeTable* t, u32 offset) {
|
||||
if (!t) return 0;
|
||||
return *(u32*)((u8*)t + offset);
|
||||
@@ -370,6 +379,11 @@ namespace kip {
|
||||
return t->marikoGpuVoltArray[idx];
|
||||
}
|
||||
|
||||
static inline u32 cust_get_mariko_soc_volt(const CustomizeTable* t, int idx) {
|
||||
if (!t || idx < 0 || idx >= 24) return 0;
|
||||
return t->marikoSocVoltArray[idx];
|
||||
}
|
||||
|
||||
#define DECL_ERISTA_GPU_VOLT_HELPER(freq, idx) \
|
||||
static inline bool cust_set_erista_gpu_volt_##freq( \
|
||||
const char* p, u32 v) { \
|
||||
@@ -382,6 +396,12 @@ namespace kip {
|
||||
return cust_set_mariko_gpu_volt(p, idx, v); \
|
||||
}
|
||||
|
||||
#define DECL_MARIKO_SOC_VOLT_HELPER(freq, idx) \
|
||||
static inline bool cust_set_mariko_soc_volt_##freq( \
|
||||
const char* p, u32 v) { \
|
||||
return cust_set_mariko_soc_volt(p, idx, v); \
|
||||
}
|
||||
|
||||
DECL_ERISTA_GPU_VOLT_HELPER(76800, 0)
|
||||
DECL_ERISTA_GPU_VOLT_HELPER(115200, 1)
|
||||
DECL_ERISTA_GPU_VOLT_HELPER(153600, 2)
|
||||
@@ -501,6 +521,35 @@ namespace kip {
|
||||
DECL_MARIKO_GPU_VOLT_GET(1497600, 22)
|
||||
DECL_MARIKO_GPU_VOLT_GET(1536000, 23)
|
||||
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(1666000, 10)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(1733000, 11)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(1800000, 12)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(1866000, 13)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(1933000, 14)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2000000, 15)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2066000, 16)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2133000, 17)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2200000, 18)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2266000, 19)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2333000, 10)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2400000, 11)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2466000, 12)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2533000, 13)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2600000, 14)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2666000, 15)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2733000, 16)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2800000, 17)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2866000, 18)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(2933000, 19)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(3000000, 20)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(3066000, 21)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(3133000, 22)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(3200000, 23)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(3266000, 24)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(3333000, 25)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(3400000, 26)
|
||||
DECL_MARIKO_SOC_VOLT_HELPER(3466000, 27)
|
||||
|
||||
void SetKipData();
|
||||
void GetKipData();
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
@echo off
|
||||
set ROOT=build
|
||||
set PATCHES=Source/Atmosphere-Patches
|
||||
copy "%PATCHES%\secmon_memory_layout.hpp" "%ROOT%\libraries\libexosphere/include/exosphere/secmon/" /Y
|
||||
copy "%PATCHES%\secmon_emc_access_table_data.inc" "%ROOT%\exosphere/program/source/smc/" /Y
|
||||
copy "%PATCHES%\secmon_soctherm_access_table_data.inc" "%ROOT%\exosphere/program/source/smc/" /Y
|
||||
copy "%PATCHES%\secmon_define_emc_access_table.inc" "%ROOT%\exosphere/program/source/smc/" /Y
|
||||
copy "%PATCHES%\secmon_define_soctherm_access_table.inc" "%ROOT%\exosphere/program/source/smc/" /Y
|
||||
copy "%PATCHES%\secmon_smc_register_access.cpp" "%ROOT%\exosphere/program/source/smc/" /Y
|
||||
|
||||
echo Patched!
|
||||
pause
|
||||
Reference in New Issue
Block a user