diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp index 1b9f7748..423ee84f 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp @@ -115,7 +115,6 @@ volatile CustomizeTable C = { .eristaGpuUV = 0, .eristaGpuVmin = 810, -.eristaGpuVmax = 1050, /* unused for now*/ .marikoGpuUV = 2, /* Vmin past 795mV won't work due boot voltage being 800mV. */ diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp index c66e581b..e5e9051e 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp @@ -118,8 +118,7 @@ struct CustomizeTable { u32 eristaGpuUV; u32 eristaGpuVmin; - u32 eristaGpuVmax; - + u32 marikoGpuUV; u32 marikoGpuVmin; u32 marikoGpuVmax; diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp index 1228fb72..cb360cdb 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/oc_common.hpp @@ -93,7 +93,6 @@ namespace ams::ldr { R_DEFINE_ERROR_RESULT(HookUnavailable, 1030); R_DEFINE_ERROR_RESULT(InvalidNvsrvDevTable, 1031); R_DEFINE_ERROR_RESULT(InvalidForceVerbosityPattern, 1032); - R_DEFINE_ERROR_RESULT(InvalidGpuRgltrPattern, 1033); } namespace ams::ldr::hoc { diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista.cpp index 57b61eda..742776cb 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista.cpp @@ -60,11 +60,10 @@ namespace ams::ldr::hoc::pcv::erista { {"CPU Volt Dfll", &CpuVoltDfll, 1, nullptr, CpuTune0Low }, {"GPU Volt DVFS", &GpuVoltDVFS, 1, nullptr, GpuVminOfficial }, {"GPU Volt Thermals", &GpuVoltThermals, 1, nullptr, GpuVminOfficial }, - // {"GPU Rgltr Max Vlt", &GpuRgltrMax, 2, nullptr, MaxGpuRgltrVolt }, {"GPU Freq Table", GpuFreqCvbTable, 1, nullptr, GpuCvbDefaultMaxFreq }, {"GPU Freq Asm", &GpuFreqMaxAsm, 2, &GpuMaxClockPatternFn }, {"GPU PLL Max", &GpuFreqPllMax, 1, nullptr, GpuClkPllMax }, - {"GPU PLL Limit", &GpuFreqPllLimit, 4, nullptr, GpuClkPllLimit }, + // {"GPU PLL Limit", &GpuFreqPllLimit, 4, nullptr, GpuClkPllLimit }, {"MEM Table Asm", &MemMtcTableAsm, 4, &MemMtcGetGetTablePatternFn }, {"MEM Freq Mtc", &MemFreqMtcTable, 1, nullptr, EmcClkOSLimit }, {"MEM Freq Max", &MemFreqMax, 0, nullptr, EmcClkOSLimit }, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista_gpu.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista_gpu.cpp index affa9b72..bb17e547 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista_gpu.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista_gpu.cpp @@ -34,10 +34,6 @@ namespace ams::ldr::hoc::pcv::erista { PATCH_OFFSET(ptr, C.eristaGpuVmin); } - // if(C.eristaGpuVmax) { - // PATCH_OFFSET(ptr + 1, C.eristaGpuVmax); - // } - R_SUCCEED(); } @@ -54,15 +50,6 @@ namespace ams::ldr::hoc::pcv::erista { PATCH_OFFSET(ptr + 12, C.eristaGpuVmin); } - // if(C.eristaGpuVmax) { - // PATCH_OFFSET(ptr - 2, C.eristaGpuVmax); - // PATCH_OFFSET(ptr + 1, C.eristaGpuVmax); - // PATCH_OFFSET(ptr + 4, C.eristaGpuVmax); - // PATCH_OFFSET(ptr + 7, C.eristaGpuVmax); - // PATCH_OFFSET(ptr + 10, C.eristaGpuVmax); - // PATCH_OFFSET(ptr + 13, C.eristaGpuVmax); - // } - R_SUCCEED(); } @@ -120,34 +107,17 @@ namespace ams::ldr::hoc::pcv::erista { R_SUCCEED(); } - /* Not strictly needed but there for completeness. Table will limit far before this */ - Result GpuFreqPllLimit(u32 *ptr) { - u32 prev_freq = *(ptr - 1); + // patch out 1305MHz limit on erista, don't use this! + // Result GpuFreqPllLimit(u32 *ptr) { + // u32 prev_freq = *(ptr - 1); - if (prev_freq != 128000 && prev_freq != 1300000 && prev_freq != 76800) { - R_THROW(ldr::ResultInvalidGpuPllEntry()); - } - - PATCH_OFFSET(ptr, 3600000); - - R_SUCCEED(); - } - - // Result GpuRgltrMax(u32* ptr) { - // /* Confirm that we are in the correct struct */ - // if (std::memcmp(ptr - 5, GpuRgltrVoltPattern, sizeof(GpuRgltrVoltPattern))) { - // R_THROW(ldr::ResultInvalidGpuRgltrPattern()); + // if (prev_freq != 128000 && prev_freq != 1300000 && prev_freq != 76800) { + // R_THROW(ldr::ResultInvalidGpuPllEntry()); // } - // /* Ensure that the max voltage is actually present before patching it */ - // if(C.eristaGpuVmax) { - // /* Rgltr Vmax is in uV for some reason? */ - // PATCH_OFFSET(ptr, C.eristaGpuVmax * 1000); - // } else { - // /* Lower the default max for safety */ - // PATCH_OFFSET(ptr, MaxGoodGpuRgltrVolt); - // } + // PATCH_OFFSET(ptr, 3600000); // R_SUCCEED(); // } + } diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista_gpu.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista_gpu.hpp index 009bdf8d..9decf0db 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista_gpu.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/erista/pcv_erista_gpu.hpp @@ -71,26 +71,12 @@ namespace ams::ldr::hoc::pcv::erista { { }, }; - // constexpr u32 MaxGpuRgltrVolt = 1150'000; // 1.15V - // constexpr u32 MaxGoodGpuRgltrVolt = 1050'000; // NVIDIA rating - - // // 0x20 byte struct (8xu32), RgltrEntry. TODO: determine what the other values are - // inline constexpr u32 GpuRgltrVoltPattern[] = { - // 0x2, // unknown, -5 - // 0x0, // padding - // 6250, // Step - // 0x0, // padding - // 618750, // Min volt? - // 1150000, // max volt, anchor - // 0x0, // padding - // 1000000, // unknown - // }; - // static_assert(sizeof(GpuRgltrVoltPattern) == (sizeof(u32) * 8), "Invalid GpuRgltrVoltPattern"); - Result GpuVoltDVFS(u32 *ptr); Result GpuVoltThermals(u32 *ptr); Result GpuFreqMaxAsm(u32 *ptr32); Result GpuFreqPllMax(u32 *ptr); - Result GpuFreqPllLimit(u32 *ptr); - // Result GpuRgltrMax(u32* ptr); + + // patch out 1305MHz limit on erista, don't use this! + // Result GpuFreqPllLimit(u32 *ptr); + } diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.cpp index 56c408e4..bd35f3bd 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.cpp @@ -161,7 +161,6 @@ namespace ams::ldr::hoc::pcv { { eristaGpuDvfsMaxFreq, 768'000, 1152'000, panic::Gpu, }, { marikoGpuDvfsMaxFreq, 768'000, 1574'400, panic::Gpu, }, { C.marikoGpuVmax, 800, 995, panic::Gpu, }, /* Official GPU vMax is 1050mV */ - { C.eristaGpuVmax, 800, 1050, panic::Gpu }, }; for (auto &v : validators) { diff --git a/Source/hoc-clk/common/include/hocclk/config.h b/Source/hoc-clk/common/include/hocclk/config.h index 576f8a06..3bc27fa4 100644 --- a/Source/hoc-clk/common/include/hocclk/config.h +++ b/Source/hoc-clk/common/include/hocclk/config.h @@ -139,7 +139,6 @@ typedef enum { KipConfigValue_eristaGpuUV, KipConfigValue_eristaGpuVmin, - KipConfigValue_eristaGpuVmax, KipConfigValue_marikoGpuUV, KipConfigValue_marikoGpuVmin, @@ -457,8 +456,6 @@ static inline const char* hocclkFormatConfigValue(HocClkConfigValue val, bool pr return pretty ? "Erista GPU Undervolt" : "erista_gpu_uv"; case KipConfigValue_eristaGpuVmin: return pretty ? "Erista GPU Vmin" : "erista_gpu_vmin"; - case KipConfigValue_eristaGpuVmax: - return pretty ? "Erista GPU Vmax" : "erista_gpu_vmax"; // GPU – Mariko case KipConfigValue_marikoGpuUV: @@ -710,7 +707,6 @@ static inline uint64_t hocclkValidConfigValue(HocClkConfigValue val, uint64_t in case KipConfigValue_marikoCpuMaxClock: case KipConfigValue_eristaGpuUV: case KipConfigValue_eristaGpuVmin: - case KipConfigValue_eristaGpuVmax: case KipConfigValue_marikoGpuUV: case KipConfigValue_marikoGpuVmin: case KipConfigValue_marikoGpuVmax: diff --git a/Source/hoc-clk/overlay/src/ui/gui/config_info_strings.cpp b/Source/hoc-clk/overlay/src/ui/gui/config_info_strings.cpp index 506959d8..51abe481 100644 --- a/Source/hoc-clk/overlay/src/ui/gui/config_info_strings.cpp +++ b/Source/hoc-clk/overlay/src/ui/gui/config_info_strings.cpp @@ -538,12 +538,6 @@ std::vector ConfigInfoStrings(HocClkConfigValue val, bool isMariko, "Default: 810 mV (812mV as erista is stepped by 6.5mV instead of 5mV)" }; - case KipConfigValue_eristaGpuVmax: - return { - "Maximum GPU voltage", - "Default: 1050mV" - }; - case KipConfigValue_commonGpuVoltOffset: return { "The offset added/subtracted to all GPU voltages marked as \"auto\"", diff --git a/Source/hoc-clk/overlay/src/ui/gui/misc_gui.cpp b/Source/hoc-clk/overlay/src/ui/gui/misc_gui.cpp index 7ab4fe6f..2d433860 100644 --- a/Source/hoc-clk/overlay/src/ui/gui/misc_gui.cpp +++ b/Source/hoc-clk/overlay/src/ui/gui/misc_gui.cpp @@ -2570,8 +2570,6 @@ class GpuSubmenuGui : public MiscGui { {}, gpuUvConfE, false, true); addConfigButton(KipConfigValue_eristaGpuVmin, "GPU Minimum Voltage", ValueRange(675, 875, 5, "mV", 1), "GPU Minimum Voltage", &thresholdsDisabled, {}, {}, false, true); - // addConfigButton(KipConfigValue_eristaGpuVmax, "GPU Maximum Voltage", ValueRange(800, 1050, 5, "mV", 1), "GPU Maximum Voltage", - // &thresholdsDisabled, {}, {}, false, true); } else { addConfigButton(KipConfigValue_marikoGpuUV, "GPU Undervolt Table", ValueRange(0, 1, 1, "", 1), "GPU Undervolt Table", &thresholdsDisabled, {}, gpuUvConfM, false, true); @@ -2592,8 +2590,10 @@ class GpuSubmenuGui : public MiscGui { addConfigButton(KipConfigValue_marikoGpuVmin, "GPU VMIN", ValueRange(0, 0, 0, "0", 1), "GPU VMIN", &thresholdsDisabled, {}, mGpuVoltsVmin, false, true); ValueThresholds MgpuVmaxThresholds(805, 850); - addConfigButton(KipConfigValue_marikoGpuVmax, "GPU Maximum Voltage", ValueRange(800, 995, 5, "mV", 1), "GPU Maximum Voltage", - &MgpuVmaxThresholds, {}, {}, false, true); + if(IsMariko()) { + addConfigButton(KipConfigValue_marikoGpuVmax, "GPU Maximum Voltage", ValueRange(800, 995, 5, "mV", 1), "GPU Maximum Voltage", + &MgpuVmaxThresholds, {}, {}, false, true); + } } std::vector gpuOffset = { diff --git a/Source/hoc-clk/sysmodule/src/file/kip.cpp b/Source/hoc-clk/sysmodule/src/file/kip.cpp index 337e64fa..17277af6 100644 --- a/Source/hoc-clk/sysmodule/src/file/kip.cpp +++ b/Source/hoc-clk/sysmodule/src/file/kip.cpp @@ -124,7 +124,6 @@ namespace file::kip { CUST_WRITE_FIELD_BATCH(&table, eristaGpuUV, file::config::GetConfigValue(KipConfigValue_eristaGpuUV)); CUST_WRITE_FIELD_BATCH(&table, eristaGpuVmin, file::config::GetConfigValue(KipConfigValue_eristaGpuVmin)); - CUST_WRITE_FIELD_BATCH(&table, eristaGpuVmax, file::config::GetConfigValue(KipConfigValue_eristaGpuVmax)); CUST_WRITE_FIELD_BATCH(&table, marikoGpuUV, file::config::GetConfigValue(KipConfigValue_marikoGpuUV)); CUST_WRITE_FIELD_BATCH(&table, marikoGpuVmin, file::config::GetConfigValue(KipConfigValue_marikoGpuVmin)); @@ -323,8 +322,6 @@ namespace file::kip { configValues.values[KipConfigValue_eristaGpuUV] = cust_get_erista_gpu_uv(&table); configValues.values[KipConfigValue_eristaGpuVmin] = cust_get_erista_gpu_vmin(&table); - configValues.values[KipConfigValue_eristaGpuVmax] = cust_get_erista_gpu_vmax(&table); - configValues.values[KipConfigValue_marikoGpuUV] = cust_get_mariko_gpu_uv(&table); configValues.values[KipConfigValue_marikoGpuVmin] = cust_get_mariko_gpu_vmin(&table); configValues.values[KipConfigValue_marikoGpuVmax] = cust_get_mariko_gpu_vmax(&table); diff --git a/Source/hoc-clk/sysmodule/src/file/kip.hpp b/Source/hoc-clk/sysmodule/src/file/kip.hpp index 14caefec..9c692cfe 100644 --- a/Source/hoc-clk/sysmodule/src/file/kip.hpp +++ b/Source/hoc-clk/sysmodule/src/file/kip.hpp @@ -86,7 +86,6 @@ namespace file::kip { u32 eristaGpuUV; u32 eristaGpuVmin; - u32 eristaGpuVmax; u32 marikoGpuUV; u32 marikoGpuVmin; @@ -365,9 +364,6 @@ namespace file::kip { static inline bool cust_set_erista_gpu_vmin(const char *p, u32 v) { CUST_WRITE_FIELD(p, eristaGpuVmin, v); } - static inline bool cust_set_erista_gpu_vmax(const char *p, u32 v) { - CUST_WRITE_FIELD(p, eristaGpuVmax, v); - } static inline bool cust_set_mariko_gpu_uv(const char *p, u32 v) { CUST_WRITE_FIELD(p, marikoGpuUV, v); } @@ -585,9 +581,6 @@ namespace file::kip { static inline u32 cust_get_erista_gpu_vmin(const CustomizeTable *t) { return CUST_GET_FIELD(t, eristaGpuVmin); } - static inline u32 cust_get_erista_gpu_vmax(const CustomizeTable *t) { - return CUST_GET_FIELD(t, eristaGpuVmax); - } static inline u32 cust_get_mariko_gpu_uv(const CustomizeTable *t) { return CUST_GET_FIELD(t, marikoGpuUV); }