Compare commits
12 Commits
custom-soc
...
2.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f90ba2ca59 | ||
|
|
f97fdc9528 | ||
|
|
ed63a95488 | ||
|
|
e24512c9d6 | ||
|
|
1efd91d535 | ||
|
|
3337738dcc | ||
|
|
7f1f504c36 | ||
|
|
2f21f23266 | ||
|
|
3c99ad0186 | ||
|
|
e4dd690ac9 | ||
|
|
9122768953 | ||
|
|
3539916cfd |
@@ -211,4 +211,5 @@ Refer to COMPILATION.md
|
||||
* **Samybigio2011, Miki** - Italian translations
|
||||
* **angelblaster** - Korean translations
|
||||
* **q1332348216-glitch** - Chinese translations
|
||||
* **th3-ne0undr5c0r** - French translations
|
||||
* **Nvidia** - [Tegra X1 Technical Reference Manual](https://developer.nvidia.com/embedded/dlc/tegra-x1-technical-reference-manual), soctherm driver, L4T
|
||||
|
||||
@@ -48,15 +48,6 @@ 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. */
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#pragma once
|
||||
|
||||
#define CUST_REV 3
|
||||
#define KIP_VERSION 220
|
||||
#define KIP_VERSION 230
|
||||
|
||||
#include "oc_common.hpp"
|
||||
#include "pcv/pcv_common.hpp"
|
||||
@@ -92,8 +92,7 @@ struct CustomizeTable {
|
||||
StepMode stepMode;
|
||||
u32 marikoEmcMaxClock;
|
||||
u32 marikoEmcVddqVolt;
|
||||
u32 emcDvbShift;
|
||||
u32 marikoSocVoltArray[pcv::DvfsTableEntryLimit - 3]; /* Don't overwrite default tables. */
|
||||
s32 emcDvbShift;
|
||||
u32 marikoSocVmax;
|
||||
// advanced config
|
||||
u32 t1_tRCD;
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace ams::ldr::hoc::pcv {
|
||||
{ C.commonEmcMemVolt, 912'500, 1350'000, false, panic::Emc }, // Official burst vmax for the RAMs is 1500mV
|
||||
{ GET_MAX_OF_ARR(erista::maxEmcClocks), 1600'000, 2600'000, false, panic::Emc },
|
||||
{ C.marikoEmcMaxClock, 1600'000, 3500'000, false, panic::Emc },
|
||||
{ C.marikoEmcVddqVolt, 250'000, 700'000, false, panic::Emc },
|
||||
{ C.marikoEmcVddqVolt, 400'000, 750'000, false, panic::Emc },
|
||||
{ C.marikoSocVmax, 1000, 1200, false, panic::Emc },
|
||||
{ eristaGpuDvfsMaxFreq, 768'000, 1152'000, false, panic::Gpu },
|
||||
{ marikoGpuDvfsMaxFreq, 768'000, 1536'000, false, panic::Gpu },
|
||||
|
||||
@@ -357,7 +357,7 @@ namespace ams::ldr::hoc::pcv::erista {
|
||||
table->dram_timings.t_rp = tRFCpb;
|
||||
table->dram_timings.t_rfc = tRFCab;
|
||||
table->emc_cfg_2 = 0x11083D;
|
||||
table->min_volt = std::min(static_cast<u32>(1050), 900 + C.emcDvbShift * 25);
|
||||
table->min_volt = (u32)std::min(static_cast<s32>(1050), 900 + C.emcDvbShift * 25);
|
||||
}
|
||||
|
||||
/* Probably more intuitive to point to 40800 rather than 1600000, but oh well. */
|
||||
|
||||
@@ -809,9 +809,9 @@ namespace ams::ldr::hoc::pcv::mariko {
|
||||
|
||||
auto DvbVolt = [&](u32 zero, u32 one, u32 two) {
|
||||
return std::array<u32, 3>{
|
||||
std::min(zero + voltAdd, max0),
|
||||
std::min(one + voltAdd, max1),
|
||||
std::min(two + voltAdd, max2)
|
||||
std::min((u32)((s32)zero + voltAdd), max0),
|
||||
std::min((u32)((s32)one + voltAdd), max1),
|
||||
std::min((u32)((s32)two + voltAdd), max2)
|
||||
};
|
||||
};
|
||||
|
||||
@@ -820,16 +820,16 @@ namespace ams::ldr::hoc::pcv::mariko {
|
||||
static_cast<u32>((v)[1]), \
|
||||
static_cast<u32>((v)[2])
|
||||
DvbEntry emcDvbTableNew[] = {
|
||||
{ 204000, { 637, 637, 637, } },
|
||||
{ 1331200, { 650, 637, 637, } },
|
||||
{ 1600000, { 675, 650, 637, } },
|
||||
{ 1866000, { DVB(DvbVolt(700, 675, 650)) } },
|
||||
{ 2133000, { DVB(DvbVolt(725, 700, 675)) } },
|
||||
{ 2400000, { DVB(DvbVolt(750, 725, 700)) } },
|
||||
{ 2666000, { DVB(DvbVolt(775, 750, 725)) } },
|
||||
{ 2933000, { DVB(DvbVolt(800, 775, 750)) } },
|
||||
{ 3200000, { DVB(DvbVolt(800, 800, 775)) } },
|
||||
{ 0xFFFFFFFF, { } },
|
||||
{ 204000, { 637, 637, 637, }, },
|
||||
{ 1331200, { 650, 637, 637, }, },
|
||||
{ 1600000, { 675, 650, 637, }, },
|
||||
{ 1866000, { DVB(DvbVolt( 700, 675, 650)) }, },
|
||||
{ 2133000, { DVB(DvbVolt( 725, 700, 675)) }, },
|
||||
{ 2400000, { DVB(DvbVolt( 750, 725, 700)) }, },
|
||||
{ 2666000, { DVB(DvbVolt( 850, 825, 800)) }, },
|
||||
{ 2933000, { DVB(DvbVolt( 950, 925, 900)) }, },
|
||||
{ 3200000, { DVB(DvbVolt(1050, 1025, 1000)) }, },
|
||||
{ 0xFFFFFFFF, { }, },
|
||||
};
|
||||
#undef DVB
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ echo
|
||||
echo "*** Copying assets ***"
|
||||
mkdir -p "$DIST_DIR/config/horizon-oc"
|
||||
cp -vf "$ROOT_DIR/config.ini.template" "$DIST_DIR/config/horizon-oc/config.ini.template"
|
||||
cp -vf "$ROOT_DIR/../../README.md" "$DIST_DIR/README.md"
|
||||
mkdir -p "$DIST_DIR/config/ultrahand/assets/notifications"
|
||||
cp -vf "$ROOT_DIR/assets/hoc.rgba" "$DIST_DIR/config/ultrahand/assets/notifications/hoc.rgba"
|
||||
|
||||
|
||||
@@ -90,35 +90,6 @@ 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,
|
||||
@@ -346,36 +317,6 @@ 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
|
||||
@@ -637,34 +578,6 @@ 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:
|
||||
|
||||
@@ -39,7 +39,7 @@ include ${TOPDIR}/lib/libultrahand/ultrahand.mk
|
||||
# version control constants
|
||||
#---------------------------------------------------------------------------------
|
||||
#TARGET_VERSION := $(shell git describe --dirty --always --tags)
|
||||
APP_VERSION := 2.2.0 # ensure to set KIP_VERSION and CUST_REV in sysmodule Makefile when updating this
|
||||
APP_VERSION := 2.3.0 # ensure to set KIP_VERSION and CUST_REV in sysmodule Makefile when updating this
|
||||
TARGET_VERSION := $(APP_VERSION)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
@@ -57,7 +57,6 @@ class SafetySubMenuGui;
|
||||
class RamSubmenuGui;
|
||||
class RamTimingsSubmenuGui;
|
||||
class RamLatenciesSubmenuGui;
|
||||
class SocCustomTableSubmenuGui;
|
||||
class CpuSubmenuGui;
|
||||
class GpuSubmenuGui;
|
||||
class GpuCustomTableSubmenuGui;
|
||||
@@ -616,7 +615,7 @@ protected:
|
||||
false
|
||||
|
||||
);
|
||||
|
||||
|
||||
addConfigButton(
|
||||
HocClkConfigValue_PollingIntervalMs,
|
||||
"Polling Interval",
|
||||
@@ -933,8 +932,11 @@ protected:
|
||||
|
||||
|
||||
this->listElement->addItem(new tsl::elm::CategoryHeader("RAM Settings"));
|
||||
|
||||
addMappedConfigTrackbar(KipConfigValue_emcDvbShift, "DVB Shift",
|
||||
{0xFFFFFFFCu, 0xFFFFFFFDu, 0xFFFFFFFEu, 0xFFFFFFFFu, 0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u, 8u},
|
||||
{"-4", "-3", "-2", "-1", " 0", "1", "2", "3", "4", "5", "6", "7", "8"});
|
||||
|
||||
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";
|
||||
@@ -972,7 +974,7 @@ protected:
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
addConfigToggle(KipConfigValue_hpMode, "HP Mode", true);
|
||||
|
||||
std::map<uint32_t, std::string> emc_voltage_label = {
|
||||
@@ -1125,18 +1127,6 @@ 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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1496,66 +1486,6 @@ 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() { }
|
||||
@@ -1636,7 +1566,7 @@ protected:
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
|
||||
std::vector<NamedValue> maxClkOptions = {
|
||||
NamedValue("1963 MHz", 1963500),
|
||||
NamedValue("2091 MHz", 2091000),
|
||||
|
||||
@@ -28,8 +28,8 @@ INCLUDES := ../common/include src/hos src/soc src/i2c src/util src/pwr src/ipc
|
||||
EXEFS_SRC := exefs_src
|
||||
LIBNAMES := minIni
|
||||
# major minor patch
|
||||
TARGET_VERSION := 2.2.0
|
||||
KIP_VERSION := 220
|
||||
TARGET_VERSION := 2.3.0
|
||||
KIP_VERSION := 230
|
||||
CUST_REV := 3
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"title_id": "0x00FF0000636C6BFF",
|
||||
"title_id_range_min": "0x00FF0000636C6BFF",
|
||||
"title_id_range_max": "0x00FF0000636C6BFF",
|
||||
"main_thread_stack_size": "0x0000B000",
|
||||
"main_thread_stack_size": "0x0000C000",
|
||||
"main_thread_priority": 16,
|
||||
"default_cpu_id": 3,
|
||||
"process_category": 1,
|
||||
|
||||
@@ -76,12 +76,7 @@ namespace kip {
|
||||
CUST_WRITE_FIELD_BATCH(&table, eristaEmcMaxClock2, config::GetConfigValue(KipConfigValue_eristaEmcMaxClock2));
|
||||
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, emcDvbShift, config::GetConfigValue(KipConfigValue_emcDvbShift) > 8 && config::GetConfigValue(KipConfigValue_emcDvbShift) <= 16 ? 8 : config::GetConfigValue(KipConfigValue_emcDvbShift)); // 2.2.0 -> 2.3.0 compat
|
||||
CUST_WRITE_FIELD_BATCH(&table, marikoSocVmax, config::GetConfigValue(KipConfigValue_marikoSocVmax));
|
||||
|
||||
CUST_WRITE_FIELD_BATCH(&table, t1_tRCD, config::GetConfigValue(KipConfigValue_t1_tRCD));
|
||||
@@ -238,7 +233,7 @@ namespace kip {
|
||||
configValues.values[KipConfigValue_eristaEmcMaxClock2] = cust_get_erista_emc_max2(&table);
|
||||
configValues.values[KipConfigValue_marikoEmcMaxClock] = cust_get_mariko_emc_max(&table);
|
||||
configValues.values[KipConfigValue_marikoEmcVddqVolt] = cust_get_mariko_emc_vddq(&table);
|
||||
configValues.values[KipConfigValue_emcDvbShift] = cust_get_emc_dvb_shift(&table);
|
||||
configValues.values[KipConfigValue_emcDvbShift] = cust_get_emc_dvb_shift(&table) > 8 && cust_get_emc_dvb_shift(&table) <= 16 ? 8 : cust_get_emc_dvb_shift(&table); // 2.2.0 -> 2.3.0 compat
|
||||
configValues.values[KipConfigValue_marikoSocVmax] = cust_get_marikoSocVmax(&table);
|
||||
|
||||
configValues.values[KipConfigValue_t1_tRCD] = cust_get_tRCD(&table);
|
||||
@@ -300,10 +295,6 @@ 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);
|
||||
|
||||
@@ -322,4 +313,5 @@ namespace kip {
|
||||
notification::writeNotification("Horizon OC\nConfig Buffer Mismatch");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ namespace kip {
|
||||
u32 marikoEmcMaxClock;
|
||||
u32 marikoEmcVddqVolt;
|
||||
u32 emcDvbShift;
|
||||
u32 marikoSocVoltArray[31 - 3]; /* LUT Limit - 3 stock entries. */
|
||||
u32 marikoSocVmax;
|
||||
|
||||
// advanced config
|
||||
@@ -288,14 +287,6 @@ 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);
|
||||
@@ -379,11 +370,6 @@ 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) { \
|
||||
@@ -396,12 +382,6 @@ 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)
|
||||
@@ -521,35 +501,6 @@ 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();
|
||||
}
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "ipc/ipc_service.hpp"
|
||||
#include "file/config.hpp"
|
||||
|
||||
#define INNER_HEAP_SIZE 0x3A000
|
||||
#define INNER_HEAP_SIZE 0x40000
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -252,7 +252,6 @@ namespace clockManager {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void HandleMiscFeatures()
|
||||
{
|
||||
// these dont need to run that often, so dont bother
|
||||
@@ -381,7 +380,6 @@ namespace clockManager {
|
||||
board::SetHz(HocClkModule_CPU, board::GetHz(HocClkModule_CPU));
|
||||
prepareBoostExit = false;
|
||||
}
|
||||
|
||||
bool returnRaw = false; // Return a value scaled to MHz instead of raw value
|
||||
for (unsigned int module = 0; module < HocClkModule_EnumMax; module++) {
|
||||
u32 oldHz = board::GetHz((HocClkModule)module); // Get Old hz (used primarily for DVFS Logic)
|
||||
@@ -715,8 +713,9 @@ namespace clockManager {
|
||||
|
||||
HandleSafetyFeatures();
|
||||
HandleMiscFeatures();
|
||||
|
||||
if (RefreshContext() || config::Refresh()) {
|
||||
|
||||
// GPU clock should always be the same unless PCV has overwriten our change, so reset it
|
||||
if (RefreshContext() || config::Refresh() || board::GetRealHz(HocClkModule_GPU) != gContext.freqs[HocClkModule_GPU]) {
|
||||
SetClocks(isBoost);
|
||||
}
|
||||
}
|
||||
|
||||
98
Source/scripts/convert_dvb.cpp
Normal file
98
Source/scripts/convert_dvb.cpp
Normal file
@@ -0,0 +1,98 @@
|
||||
#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include <iterator>
|
||||
|
||||
typedef uint32_t u32;
|
||||
typedef int32_t s32;
|
||||
|
||||
struct DvbEntry {
|
||||
u32 freq;
|
||||
u32 volts[3];
|
||||
};
|
||||
|
||||
DvbEntry oldDvbTable[] = {
|
||||
{ 204000, { 637, 637, 637, }, },
|
||||
{ 1331200, { 650, 637, 637, }, },
|
||||
{ 1600000, { 675, 650, 637, }, },
|
||||
{ 1866000, { 700, 675, 650, }, },
|
||||
{ 2133000, { 725, 700, 675, }, },
|
||||
{ 2400000, { 750, 725, 700, }, },
|
||||
{ 2666000, { 775, 750, 725, }, },
|
||||
{ 2933000, { 800, 775, 750, }, },
|
||||
{ 3200000, { 800, 800, 775, }, },
|
||||
{ ~0u, { }, },
|
||||
};
|
||||
|
||||
DvbEntry newDvbTable[] = {
|
||||
{ 204000, { 637, 637, 637, }, },
|
||||
{ 1331200, { 650, 637, 637, }, },
|
||||
{ 1600000, { 675, 650, 637, }, },
|
||||
{ 1866000, { 700, 675, 650, }, },
|
||||
{ 2133000, { 725, 700, 675, }, },
|
||||
{ 2400000, { 750, 725, 700, }, },
|
||||
{ 2666000, { 850, 825, 800, }, },
|
||||
{ 2933000, { 950, 925, 900, }, },
|
||||
{ 3200000, { 1050, 1025, 1000, }, },
|
||||
{ ~0u, { }, },
|
||||
};
|
||||
|
||||
constexpr u32 DvbTableSize = std::size(oldDvbTable);
|
||||
|
||||
u32 PrintAndScan(const char *message) {
|
||||
u32 scanV;
|
||||
printf("%s: ", message);
|
||||
scanf("%i", &scanV);
|
||||
return scanV;
|
||||
}
|
||||
|
||||
u32 GetProcessId(u32 speedo) {
|
||||
if (speedo <= 1597) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (speedo <= 1708) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* >= 1709. */
|
||||
return 2;
|
||||
}
|
||||
|
||||
u32 GetVoltageAndIndex(u32 dvbShift, u32 emc, u32 processId, DvbEntry *dvbTable, u32 &index) {
|
||||
for (u32 i = 0; i < DvbTableSize - 1; ++i) {
|
||||
if (emc < dvbTable[i].freq || emc >= dvbTable[i + 1].freq) {
|
||||
continue;
|
||||
}
|
||||
|
||||
index = i;
|
||||
return dvbTable[i].volts[processId] + (25 * dvbShift);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 GetShift(u32 oldVoltage, u32 processId, DvbEntry *dvbTable, u32 index) {
|
||||
return (static_cast<s32>(oldVoltage) - static_cast<s32>(dvbTable[index].volts[processId])) / 25;
|
||||
}
|
||||
|
||||
int main() {
|
||||
u32 oldDvb = PrintAndScan("Enter old dvb shift");
|
||||
u32 emcMaxMhz = PrintAndScan("Enter max ram freq (MHz)");
|
||||
u32 speedo = PrintAndScan("Enter soc speedo");
|
||||
|
||||
u32 emcMaxKhz = emcMaxMhz * 1000;
|
||||
u32 processId = GetProcessId(speedo);
|
||||
|
||||
#define INVALID_TABLE_INDEX 32
|
||||
u32 tableIndex = INVALID_TABLE_INDEX;
|
||||
u32 oldVoltage = GetVoltageAndIndex(oldDvb, emcMaxKhz, processId, oldDvbTable, tableIndex);
|
||||
|
||||
if (oldVoltage == 0 || tableIndex == INVALID_TABLE_INDEX) {
|
||||
printf("Invalid values!\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
s32 newShift = GetShift(oldVoltage, processId, newDvbTable, tableIndex);
|
||||
|
||||
printf("New dvb table shift: %d", newShift);
|
||||
}
|
||||
120
Source/scripts/convert_dvb.py
Normal file
120
Source/scripts/convert_dvb.py
Normal file
@@ -0,0 +1,120 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import List
|
||||
|
||||
|
||||
u32 = int
|
||||
s32 = int
|
||||
|
||||
|
||||
@dataclass
|
||||
class DvbEntry:
|
||||
freq: u32
|
||||
volts: List[u32]
|
||||
|
||||
|
||||
oldDvbTable = [
|
||||
DvbEntry(204000, [637, 637, 637]),
|
||||
DvbEntry(1331200, [650, 637, 637]),
|
||||
DvbEntry(1600000, [675, 650, 637]),
|
||||
DvbEntry(1866000, [700, 675, 650]),
|
||||
DvbEntry(2133000, [725, 700, 675]),
|
||||
DvbEntry(2400000, [750, 725, 700]),
|
||||
DvbEntry(2666000, [775, 750, 725]),
|
||||
DvbEntry(2933000, [800, 775, 750]),
|
||||
DvbEntry(3200000, [800, 800, 775]),
|
||||
DvbEntry(0xFFFFFFFF, []),
|
||||
]
|
||||
|
||||
newDvbTable = [
|
||||
DvbEntry(204000, [637, 637, 637]),
|
||||
DvbEntry(1331200, [650, 637, 637]),
|
||||
DvbEntry(1600000, [675, 650, 637]),
|
||||
DvbEntry(1866000, [700, 675, 650]),
|
||||
DvbEntry(2133000, [725, 700, 675]),
|
||||
DvbEntry(2400000, [750, 725, 700]),
|
||||
DvbEntry(2666000, [850, 825, 800]),
|
||||
DvbEntry(2933000, [950, 925, 900]),
|
||||
DvbEntry(3200000, [1050, 1025, 1000]),
|
||||
DvbEntry(0xFFFFFFFF, []),
|
||||
]
|
||||
|
||||
DVB_TABLE_SIZE = len(oldDvbTable)
|
||||
INVALID_TABLE_INDEX = 32
|
||||
|
||||
|
||||
def print_and_scan(message: str) -> u32:
|
||||
return int(input(f"{message}: "))
|
||||
|
||||
|
||||
def get_process_id(speedo: u32) -> u32:
|
||||
if speedo <= 1597:
|
||||
return 0
|
||||
|
||||
if speedo <= 1708:
|
||||
return 1
|
||||
|
||||
# >= 1709
|
||||
return 2
|
||||
|
||||
|
||||
def get_voltage_and_index(
|
||||
dvb_shift: u32,
|
||||
emc: u32,
|
||||
process_id: u32,
|
||||
dvb_table: List[DvbEntry],
|
||||
):
|
||||
for i in range(DVB_TABLE_SIZE - 1):
|
||||
if emc < dvb_table[i].freq or emc >= dvb_table[i + 1].freq:
|
||||
continue
|
||||
|
||||
voltage = dvb_table[i].volts[process_id] + (25 * dvb_shift)
|
||||
return voltage, i
|
||||
|
||||
return 0, INVALID_TABLE_INDEX
|
||||
|
||||
|
||||
def get_shift(
|
||||
old_voltage: u32,
|
||||
process_id: u32,
|
||||
dvb_table: List[DvbEntry],
|
||||
index: u32,
|
||||
) -> s32:
|
||||
return (
|
||||
int(old_voltage)
|
||||
- int(dvb_table[index].volts[process_id])
|
||||
) // 25
|
||||
|
||||
|
||||
def main():
|
||||
old_dvb = print_and_scan("Enter old dvb shift")
|
||||
emc_max_mhz = print_and_scan("Enter max ram freq (MHz)")
|
||||
speedo = print_and_scan("Enter soc speedo")
|
||||
|
||||
emc_max_khz = emc_max_mhz * 1000
|
||||
process_id = get_process_id(speedo)
|
||||
|
||||
table_index = INVALID_TABLE_INDEX
|
||||
|
||||
old_voltage, table_index = get_voltage_and_index(
|
||||
old_dvb,
|
||||
emc_max_khz,
|
||||
process_id,
|
||||
oldDvbTable,
|
||||
)
|
||||
|
||||
if old_voltage == 0 or table_index == INVALID_TABLE_INDEX:
|
||||
print("Invalid values!")
|
||||
return -1
|
||||
|
||||
new_shift = get_shift(
|
||||
old_voltage,
|
||||
process_id,
|
||||
newDvbTable,
|
||||
table_index,
|
||||
)
|
||||
|
||||
print(f"New dvb table shift: {new_shift}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
BIN
dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp
vendored
BIN
dist/atmosphere/contents/00FF0000636C6BFF/exefs.nsp
vendored
Binary file not shown.
BIN
dist/atmosphere/exosphere.bin
vendored
BIN
dist/atmosphere/exosphere.bin
vendored
Binary file not shown.
BIN
dist/atmosphere/kips/hoc.kip
vendored
BIN
dist/atmosphere/kips/hoc.kip
vendored
Binary file not shown.
BIN
dist/switch/.overlays/horizon-oc-overlay.ovl
vendored
BIN
dist/switch/.overlays/horizon-oc-overlay.ovl
vendored
Binary file not shown.
Reference in New Issue
Block a user