From 25346f9839731e1aa80b63d2ccf3175c9fc7ae64 Mon Sep 17 00:00:00 2001 From: hanabbi Date: Thu, 29 Jun 2023 01:51:55 +0900 Subject: [PATCH] fix cvb patch to consider lowering max cpu volt --- .../Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp index 0c3ba2a8..acfbbda6 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp @@ -178,7 +178,12 @@ Result CpuFreqCvbTable(u32* ptr) { cvb_entry_t* customize_table = const_cast(isMariko ? (C.marikoCpuUV ? C.marikoCpuDvfsTableSLT : C.marikoCpuDvfsTable) : C.eristaCpuDvfsTable); u32 cpu_max_volt = isMariko ? C.marikoCpuMaxVolt : C.eristaCpuMaxVolt; - u32 cpu_freq_threshold = isMariko ? (C.marikoCpuUV ? 2193'000 : 2091'000) : 1887'000; + u32 cpu_freq_threshold = 1020'000; + if (isMariko) { + cpu_freq_threshold = C.marikoCpuUV ? 2193'000 : 2091'000; + } else { + cpu_freq_threshold = cpu_max_volt >= 1235 ? 1887'000 : 1428'000; + } size_t default_entry_count = GetDvfsTableEntryCount(default_table); size_t default_table_size = default_entry_count * sizeof(cvb_entry_t);