v2.0.0
re-add sys-clk manager, default to mtc auto adj (others are useless), new gpu table for erista units, custom sys-clk updates
This commit is contained in:
@@ -92,9 +92,18 @@ void SafetyCheck() {
|
||||
R_SUCCEED();
|
||||
}
|
||||
};
|
||||
|
||||
u32 eristaCpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.eristaCpuDvfsTable)->freq);
|
||||
u32 marikoCpuDvfsMaxFreq = static_cast<u32>(C.marikoCpuUV ? GetDvfsTableLastEntry(C.marikoCpuDvfsTableSLT)->freq : GetDvfsTableLastEntry(C.marikoCpuDvfsTable)->freq);
|
||||
u32 eristaCpuDvfsMaxFreq;
|
||||
if (C.enableEristaCpuUnsafeFreqs) {
|
||||
eristaCpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.eristaCpuDvfsTableUnsafeFreqs)->freq);
|
||||
} else {
|
||||
eristaCpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.eristaCpuDvfsTable)->freq);
|
||||
}
|
||||
u32 marikoCpuDvfsMaxFreq;
|
||||
if(C.enableMarikoCpuUnsafeFreqs) {
|
||||
marikoCpuDvfsMaxFreq = static_cast<u32>(C.marikoCpuUV ? GetDvfsTableLastEntry(C.marikoCpuDvfsTableSLT)->freq : GetDvfsTableLastEntry(C.marikoCpuDvfsTable)->freq);
|
||||
} else {
|
||||
marikoCpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.marikoCpuDvfsTableUnsafeFreqs)->freq);
|
||||
}
|
||||
u32 eristaGpuDvfsMaxFreq;
|
||||
switch (C.eristaGpuUV)
|
||||
{
|
||||
@@ -133,6 +142,16 @@ void SafetyCheck() {
|
||||
case 2:
|
||||
marikoGpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.marikoGpuDvfsTableHiOPT)->freq);
|
||||
break;
|
||||
case 3:
|
||||
if(C.enableMarikoGpuUnsafeFreqs)
|
||||
{
|
||||
marikoGpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.marikoGpuDvfsTableUv3UnsafeFreqs)->freq);
|
||||
}
|
||||
else
|
||||
{
|
||||
marikoGpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.marikoGpuDvfsTable)->freq);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
marikoGpuDvfsMaxFreq = static_cast<u32>(GetDvfsTableLastEntry(C.marikoGpuDvfsTable)->freq);
|
||||
break;
|
||||
@@ -145,10 +164,10 @@ void SafetyCheck() {
|
||||
{ C.eristaEmcMaxClock, 1600'000, 2600'200 },
|
||||
{ C.marikoCpuMaxVolt, 1100, 1300 },
|
||||
{ C.marikoEmcMaxClock, 1600'000, 3500'000 },
|
||||
{ C.marikoEmcVddqVolt, 550'000, 650'000 },
|
||||
{ C.marikoEmcVddqVolt, 550'000, 700'000 },
|
||||
{ eristaCpuDvfsMaxFreq, 1785'000, 3000'000 },
|
||||
{ marikoCpuDvfsMaxFreq, 1785'000, 3000'000 },
|
||||
{ eristaGpuDvfsMaxFreq, 768'000, 1536'000 },
|
||||
{ eristaGpuDvfsMaxFreq, 768'000, 1228'000 },
|
||||
{ marikoGpuDvfsMaxFreq, 768'000, 1536'000 },
|
||||
};
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ namespace ams::ldr::oc::pcv
|
||||
? (C.enableMarikoCpuUnsafeFreqs
|
||||
? C.marikoCpuDvfsTableUnsafeFreqs
|
||||
: (C.marikoCpuUV ? C.marikoCpuDvfsTableSLT : C.marikoCpuDvfsTable))
|
||||
: C.eristaCpuDvfsTable
|
||||
: (C.enableEristaCpuUnsafeFreqs ? C.eristaCpuDvfsTableUnsafeFreqs : C.eristaCpuDvfsTable)
|
||||
);
|
||||
u32 cpu_max_volt = isMariko ? C.marikoCpuMaxVolt : C.eristaCpuMaxVolt;
|
||||
u32 cpu_freq_threshold = 1020'000;
|
||||
@@ -383,7 +383,7 @@ namespace ams::ldr::oc::pcv
|
||||
std::memcpy(gpu_cvb_table_head, (void *)customize_table, customize_table_size);
|
||||
|
||||
// Patch GPU volt
|
||||
if (C.marikoGpuUV == 3 || C.eristaGpuUV == 1)
|
||||
if (C.marikoGpuUV == 3 || C.eristaGpuUV == 3)
|
||||
{
|
||||
cvb_entry_t *entry = static_cast<cvb_entry_t *>(gpu_cvb_table_head);
|
||||
for (size_t i = 0; i < customize_entry_count; i++)
|
||||
|
||||
@@ -78,12 +78,28 @@ Result CpuVoltDfll(u32* ptr) {
|
||||
if (C.marikoCpuUV) {
|
||||
if (C.marikoCpuUV == 1) {
|
||||
PATCH_OFFSET(&(entry->tune0_low), 0x0000FF90); //process_id 0
|
||||
} else if (C.marikoCpuUV == 2) {
|
||||
PATCH_OFFSET(&(entry->tune0_high), 0x0000FFFF);
|
||||
PATCH_OFFSET(&(entry->tune1_low), 0x021107FF);
|
||||
PATCH_OFFSET(&(entry->tune1_high), 0x00000000);
|
||||
}
|
||||
else if (C.marikoCpuUV == 2) {
|
||||
PATCH_OFFSET(&(entry->tune0_low), 0x0000FFA0); //process_id 1
|
||||
PATCH_OFFSET(&(entry->tune0_high), 0x0000FFFF);
|
||||
PATCH_OFFSET(&(entry->tune1_low), 0x021107FF);
|
||||
PATCH_OFFSET(&(entry->tune1_high), 0x00000000);
|
||||
}
|
||||
PATCH_OFFSET(&(entry->tune0_high), 0x0000FFFF);
|
||||
PATCH_OFFSET(&(entry->tune1_low), 0x021107FF);
|
||||
PATCH_OFFSET(&(entry->tune1_high), 0x00000000);
|
||||
else if (C.marikoCpuUV == 3) {
|
||||
PATCH_OFFSET(&(entry->tune0_low), 0x0000FFFF);
|
||||
PATCH_OFFSET(&(entry->tune0_high), 0x0000FFFF);
|
||||
PATCH_OFFSET(&(entry->tune1_low), 0x021107FF);
|
||||
PATCH_OFFSET(&(entry->tune1_high), 0x024417FF);
|
||||
}
|
||||
else if (C.marikoCpuUV == 4) {
|
||||
PATCH_OFFSET(&(entry->tune0_low), 0x0000FFFF);
|
||||
PATCH_OFFSET(&(entry->tune0_high), 0x0000FFFF);
|
||||
PATCH_OFFSET(&(entry->tune1_low), 0x021107FF);
|
||||
PATCH_OFFSET(&(entry->tune1_high), 0x028817FF);
|
||||
}
|
||||
}
|
||||
|
||||
R_SUCCEED();
|
||||
|
||||
Reference in New Issue
Block a user