diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp index abe31bb3..2492c104 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp @@ -62,7 +62,7 @@ volatile CustomizeTable C = { .marikoCpuUVLow = 8, // No undervolt .marikoCpuUVHigh = 1, // No undervolt -.tableConf = AUTO, +.tableConf = TBREAK_1683, /* TODO: Add AUTO */ .marikoCpuLowVmin = 590, .marikoCpuHighVmin = 735, .marikoCpuMaxVolt = 1180, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp index 7fc3749d..b3f21be1 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.hpp @@ -35,7 +35,7 @@ enum MtcConfig: u32 { }; enum TableConfig: u32 { - AUTO = 0, + AUTO = 0, /* Auto is not supported yet. */ DEFAULT_TABLE = 1, TBREAK_1581 = 2, TBREAK_1683 = 3, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp index 5a74949a..28e159bf 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv.hpp @@ -236,7 +236,30 @@ namespace ams::ldr::oc::pcv { template Result CpuFreqCvbTable(u32 *ptr) { cvb_entry_t *default_table = isMariko ? (cvb_entry_t *)(&mariko::CpuCvbTableDefault) : (cvb_entry_t *)(&erista::CpuCvbTableDefault); - cvb_entry_t* customize_table = const_cast(C.marikoCpuDvfsTableHelios); + cvb_entry_t *customize_table = const_cast(C.marikoCpuDvfsTableHelios); + + if (isMariko) { + switch (C.tableConf) { + case AUTO: + case TBREAK_1683: { + customize_table = const_cast(C.marikoCpuDvfsTable1683Tbreak); + break; + } + case TBREAK_1581: { + customize_table = const_cast(C.marikoCpuDvfsTable1581Tbreak); + break; + } + case HELIOS_TABLE: { + customize_table = const_cast(C.marikoCpuDvfsTableHelios); + break; + } + case DEFAULT_TABLE: + default: { + customize_table = default_table; + break; + } + } + } u32 cpu_max_volt = isMariko ? C.marikoCpuMaxVolt : C.eristaCpuMaxVolt; u32 cpu_freq_threshold = 1020'000;