hoc-sys/loader/config-pc/config-device - move unsafe freqs setting to hoc-sys

This allows stuff to be changed on the fly
This commit is contained in:
souldbminersmwc
2025-10-23 15:54:20 -04:00
parent e14fed0be9
commit 708be969cb
28 changed files with 309 additions and 450 deletions

View File

@@ -266,21 +266,13 @@ namespace ams::ldr::oc::pcv
cvb_entry_t *customize_table = nullptr; // impossible to reach, there will always be a way to set a pointer
if (isMariko) {
if (C.enableMarikoCpuUnsafeFreqs) {
customize_table = const_cast<cvb_entry_t *>(C.marikoCpuDvfsTableUnsafeFreqs);
if (C.marikoCpuUV) {
customize_table = const_cast<cvb_entry_t *>(C.marikoCpuDvfsTableSLT);
} else {
if (C.marikoCpuUV) {
customize_table = const_cast<cvb_entry_t *>(C.marikoCpuDvfsTableSLT);
} else {
customize_table = const_cast<cvb_entry_t *>(C.marikoCpuDvfsTable);
}
customize_table = const_cast<cvb_entry_t *>(C.marikoCpuDvfsTable);
}
} else {
if (C.enableEristaCpuUnsafeFreqs) {
customize_table = const_cast<cvb_entry_t *>(C.eristaCpuDvfsTableUnsafeFreqs);
} else {
customize_table = const_cast<cvb_entry_t *>(C.eristaCpuDvfsTable);
}
}
u32 cpu_max_volt = isMariko ? C.marikoCpuMaxVolt : C.eristaCpuMaxVolt;
u32 cpu_freq_threshold = 1020'000;
@@ -346,17 +338,8 @@ namespace ams::ldr::oc::pcv
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTableSLT);
break;
case 2:
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTableHiOPT);
break;
case 3:
if(C.enableMarikoGpuUnsafeFreqs)
{
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTableUv3UnsafeFreqs);
}
else
{
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTable);
}
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTableHiOPT);
break;
default:
customize_table = const_cast<cvb_entry_t *>(C.marikoGpuDvfsTable);
@@ -374,17 +357,8 @@ namespace ams::ldr::oc::pcv
customize_table = const_cast<cvb_entry_t *>(C.eristaGpuDvfsTableSLT);
break;
case 2:
customize_table = const_cast<cvb_entry_t *>(C.eristaGpuDvfsTableHigh);
break;
case 3:
if(C.enableEristaGpuUnsafeFreqs)
{
customize_table = const_cast<cvb_entry_t *>(C.eristaGpuDvfsTableUv3UnsafeFreqs);
}
else
{
customize_table = const_cast<cvb_entry_t *>(C.eristaGpuDvfsTable);
}
customize_table = const_cast<cvb_entry_t *>(C.eristaGpuDvfsTableHigh);
break;
default:
customize_table = const_cast<cvb_entry_t *>(C.eristaGpuDvfsTable);