From 5a88d534438737ee2eaf1417da101dd1bb668e93 Mon Sep 17 00:00:00 2001 From: Lightos1 <124387232+Lightos1@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:16:10 +0100 Subject: [PATCH] Erista uv stuff: this makes no sense --- .../loader/source/oc/customize.cpp | 6 +++--- .../loader/source/oc/pcv/pcv_erista.cpp | 20 +++++++++---------- Source/sys-clk/sysmodule/src/board.cpp | 1 + 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp index 64cc695a..cb2988d2 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp @@ -71,11 +71,11 @@ volatile CustomizeTable C = { .mem_burst_read_latency = RL_1866, .mem_burst_write_latency = WL_1866, -.eristaCpuUV = 0, +.eristaCpuUV = 5, .eristaCpuVmin = 800, .eristaCpuMaxVolt = 1200, /* Unlocks up to 2295 Mhz CPU, usage is not recommended. */ -.eristaCpuUnlock = DISABLED, +.eristaCpuUnlock = ENABLED, .marikoCpuUVLow = 0, // No undervolt .marikoCpuUVHigh = 0, // No undervolt @@ -98,7 +98,7 @@ volatile CustomizeTable C = { .eristaCpuBoostClock = 1785000, // Default boost clock .marikoCpuBoostClock = 1963000, // Default boost clock -.eristaGpuUV = 0, +.eristaGpuUV = 2, .eristaGpuVmin = 810, .marikoGpuUV = 0, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp index 9691670f..a82a3e7b 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_erista.cpp @@ -65,12 +65,13 @@ namespace ams::ldr::hoc::pcv::erista { R_SUCCEED(); } + /* In theory this should work, but it doesn't, I have no idea why ¯\_(ツ)_/¯ */ Result CpuVoltDfll(u32* ptr) { cvb_cpu_dfll_data *entry = reinterpret_cast(ptr); - R_UNLESS(entry->tune0_low == 0xFFEAD0FF, ldr::ResultInvalidCpuVoltDfllEntry()); - R_UNLESS(entry->tune0_high == 0x0, ldr::ResultInvalidCpuVoltDfllEntry()); - R_UNLESS(entry->tune1_low == 0x0, ldr::ResultInvalidCpuVoltDfllEntry()); - R_UNLESS(entry->tune1_high == 0x0, ldr::ResultInvalidCpuVoltDfllEntry()); + R_UNLESS(entry->tune0_low == 0xFFEAD0FF, ldr::ResultInvalidCpuVoltDfllEntry()); + R_UNLESS(entry->tune0_high == 0x0, ldr::ResultInvalidCpuVoltDfllEntry()); + R_UNLESS(entry->tune1_low == 0x0, ldr::ResultInvalidCpuVoltDfllEntry()); + R_UNLESS(entry->tune1_high == 0x0, ldr::ResultInvalidCpuVoltDfllEntry()); if( !C.eristaCpuUV) { R_SKIP(); @@ -436,14 +437,13 @@ namespace ams::ldr::hoc::pcv::erista { // } void Patch(uintptr_t mapped_nso, size_t nso_size) { - /* TODO: limit patch count */ PatcherEntry patches[] = { {"CPU Freq Table", CpuFreqCvbTable, 1, nullptr, static_cast(GetDvfsTableLastEntry(CpuCvbTableDefault)->freq)}, - {"CPU Volt DVFS", &CpuVoltDvfs, 0, nullptr, CpuVminOfficial}, - {"CPU Volt Thermals", &CpuVoltThermals, 0, nullptr, CpuVminOfficial}, - {"CPU Volt Dfll", &CpuVoltDfll, 0, nullptr, 0xFFEAD0FF}, - {"GPU Volt DVFS", &GpuVoltDVFS, 0, nullptr, GpuVminOfficial}, - {"GPU Volt Thermals", &GpuVoltThermals, 0, nullptr, GpuVminOfficial}, + {"CPU Volt DVFS", &CpuVoltDvfs, 1, nullptr, CpuVminOfficial}, + {"CPU Volt Thermals", &CpuVoltThermals, 1, nullptr, CpuVminOfficial}, + {"CPU Volt Dfll", &CpuVoltDfll, 1, nullptr, 0xFFEAD0FF}, + {"GPU Volt DVFS", &GpuVoltDVFS, 1, nullptr, GpuVminOfficial}, + {"GPU Volt Thermals", &GpuVoltThermals, 1, nullptr, GpuVminOfficial}, {"GPU Freq Table", GpuFreqCvbTable, 1, nullptr, static_cast(GetDvfsTableLastEntry(GpuCvbTableDefault)->freq)}, {"GPU Freq Asm", &GpuFreqMaxAsm, 2, &GpuMaxClockPatternFn}, {"GPU PLL Max", &GpuFreqPllMax, 1, nullptr, GpuClkPllMax}, diff --git a/Source/sys-clk/sysmodule/src/board.cpp b/Source/sys-clk/sysmodule/src/board.cpp index ccee28a1..6be64c4b 100644 --- a/Source/sys-clk/sysmodule/src/board.cpp +++ b/Source/sys-clk/sysmodule/src/board.cpp @@ -1249,6 +1249,7 @@ MarikoCpuUvEntry marikoCpuUvHigh[12] = { {0x0, 0xdfff, 0, 0x27f07ff}, }; void Board::SetCpuUvLevel(u32 levelLow, u32 levelHigh, u32 tbreakPoint) { + return; u32* tune0_ptr = (u32*)(cldvfs + CL_DVFS_TUNE0_0); u32* tune1_ptr = (u32*)(cldvfs + CL_DVFS_TUNE1_0);