ldr: move R_SKIP after verifying mtc table to avoid triggering patch validations
This commit is contained in:
@@ -734,12 +734,7 @@ namespace ams::ldr::hoc::pcv::mariko {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool patchedMtc = false;
|
|
||||||
Result MemFreqMtcTable(u32 *ptr) {
|
Result MemFreqMtcTable(u32 *ptr) {
|
||||||
if (C.marikoEmcMaxClock <= EmcClkOSLimit || patchedMtc) {
|
|
||||||
R_SKIP();
|
|
||||||
}
|
|
||||||
|
|
||||||
static const DramId dramId = [] {
|
static const DramId dramId = [] {
|
||||||
DramId id = GetDramId();
|
DramId id = GetDramId();
|
||||||
return id;
|
return id;
|
||||||
@@ -763,6 +758,10 @@ namespace ams::ldr::hoc::pcv::mariko {
|
|||||||
MarikoMtcTable *table = reinterpret_cast<MarikoMtcTable *>(startPtr + mtcOffset);
|
MarikoMtcTable *table = reinterpret_cast<MarikoMtcTable *>(startPtr + mtcOffset);
|
||||||
R_UNLESS(R_SUCCEEDED(MtcValidateAllTables(table, EmcListDefault, EmcListSizeDefault)), ldr::ResultInvalidMtcTable());
|
R_UNLESS(R_SUCCEEDED(MtcValidateAllTables(table, EmcListDefault, EmcListSizeDefault)), ldr::ResultInvalidMtcTable());
|
||||||
|
|
||||||
|
if (C.marikoEmcMaxClock <= EmcClkOSLimit) {
|
||||||
|
R_SKIP();
|
||||||
|
}
|
||||||
|
|
||||||
PrepareMtcMemoryRegion(startPtr, table);
|
PrepareMtcMemoryRegion(startPtr, table);
|
||||||
table = reinterpret_cast<MarikoMtcTable *>(startPtr);
|
table = reinterpret_cast<MarikoMtcTable *>(startPtr);
|
||||||
|
|
||||||
@@ -781,7 +780,6 @@ namespace ams::ldr::hoc::pcv::mariko {
|
|||||||
MemMtcPllmbDivisor(&table[i]);
|
MemMtcPllmbDivisor(&table[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
patchedMtc = true;
|
|
||||||
R_SUCCEED();
|
R_SUCCEED();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user