loader: implement mariko gpu volt customization
This commit is contained in:
@@ -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:
|
||||
*/
|
||||
|
||||
@@ -62,6 +62,7 @@ typedef struct CustomizeTable {
|
||||
u32 ramTimingPresetFive;
|
||||
u32 ramTimingPresetSix;
|
||||
u32 ramTimingPresetSeven;
|
||||
u32 marikoGpuVoltArray[17];
|
||||
CustomizeCpuDvfsTable eristaCpuDvfsTable;
|
||||
CustomizeCpuDvfsTable marikoCpuDvfsTable;
|
||||
CustomizeCpuDvfsTable marikoCpuDvfsTableSLT;
|
||||
|
||||
@@ -237,7 +237,7 @@ Result GpuFreqCvbTable(u32* ptr) {
|
||||
} else {
|
||||
customize_table = const_cast<cvb_entry_t *>(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<cvb_entry_t *>(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();
|
||||
};
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ typedef struct CustTable {
|
||||
u32 ramTimingPresetFive;
|
||||
u32 ramTimingPresetSix;
|
||||
u32 ramTimingPresetSeven;
|
||||
u32 marikoGpuVoltArray[17];
|
||||
CustomizeCpuDvfsTable eristaCpuDvfsTable;
|
||||
CustomizeCpuDvfsTable marikoCpuDvfsTable;
|
||||
CustomizeCpuDvfsTable marikoCpuDvfsTableSLT;
|
||||
|
||||
Reference in New Issue
Block a user