diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp index fa388c1c..45c07283 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp @@ -105,6 +105,8 @@ volatile CustomizeTable C = { .ramTimingPresetSeven = 0, +.marikoGpuVoltArray = {610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 620, 640, 675, 710, 735, 785, 815}, + /* Advanced Settings: * - Erista CPU DVFS Table: */ diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp index 25020252..1285b74e 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp @@ -62,6 +62,7 @@ typedef struct CustomizeTable { u32 ramTimingPresetFive; u32 ramTimingPresetSix; u32 ramTimingPresetSeven; + u32 marikoGpuVoltArray[17]; CustomizeCpuDvfsTable eristaCpuDvfsTable; CustomizeCpuDvfsTable marikoCpuDvfsTable; CustomizeCpuDvfsTable marikoCpuDvfsTableSLT; diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp index 9162117f..429aef41 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp @@ -237,7 +237,7 @@ Result GpuFreqCvbTable(u32* ptr) { } else { customize_table = const_cast(C.eristaGpuDvfsTable); } - + size_t default_entry_count = GetDvfsTableEntryCount(default_table); size_t default_table_size = default_entry_count * sizeof(cvb_entry_t); size_t customize_entry_count = GetDvfsTableEntryCount(customize_table); @@ -251,6 +251,15 @@ Result GpuFreqCvbTable(u32* ptr) { std::memcpy(gpu_cvb_table_head, (void*)customize_table, customize_table_size); + // Patch GPU volt + if (C.marikoGpuUV == 3) { + cvb_entry_t* entry = static_cast(gpu_cvb_table_head); + for (size_t i = 0; i < customize_entry_count; i++) { + PATCH_OFFSET(&(entry->cvb_pll_param.c0), C.marikoGpuVoltArray[i] * 1000); + entry++; + } + } + R_SUCCEED(); }; diff --git a/Source/sys-clk-OC/sysmodule/src/file_utils.h b/Source/sys-clk-OC/sysmodule/src/file_utils.h index 13ba5fb5..27a496f1 100644 --- a/Source/sys-clk-OC/sysmodule/src/file_utils.h +++ b/Source/sys-clk-OC/sysmodule/src/file_utils.h @@ -65,6 +65,7 @@ typedef struct CustTable { u32 ramTimingPresetFive; u32 ramTimingPresetSix; u32 ramTimingPresetSeven; + u32 marikoGpuVoltArray[17]; CustomizeCpuDvfsTable eristaCpuDvfsTable; CustomizeCpuDvfsTable marikoCpuDvfsTable; CustomizeCpuDvfsTable marikoCpuDvfsTableSLT;