mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-21 02:15:07 -04:00
fusee_cpp: move mtc code/used-tables to nv memory (needed for mariko downtrain fix)
This commit is contained in:
parent
40e2d4bbe6
commit
598edc0a46
4 changed files with 25 additions and 24 deletions
|
@ -72,15 +72,18 @@ namespace ams::nxboot {
|
|||
|
||||
using EmcDvfsTimingTable = erista::EmcDvfsTimingTable;
|
||||
|
||||
EmcDvfsTimingTable *GetEmcDvfsTimingTables(int index) {
|
||||
EmcDvfsTimingTable *GetEmcDvfsTimingTables(int index, void *mtc_tables_buffer) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case 3:
|
||||
return reinterpret_cast<EmcDvfsTimingTable *>(T210SdevEmcDvfsTableS4gb01);
|
||||
std::memcpy(mtc_tables_buffer, T210SdevEmcDvfsTableS4gb01, sizeof(T210SdevEmcDvfsTableS4gb01));
|
||||
return reinterpret_cast<EmcDvfsTimingTable *>(mtc_tables_buffer);
|
||||
case 1:
|
||||
return reinterpret_cast<EmcDvfsTimingTable *>(T210SdevEmcDvfsTableS6gb01);
|
||||
std::memcpy(mtc_tables_buffer, T210SdevEmcDvfsTableS6gb01, sizeof(T210SdevEmcDvfsTableS6gb01));
|
||||
return reinterpret_cast<EmcDvfsTimingTable *>(mtc_tables_buffer);
|
||||
case 2:
|
||||
return reinterpret_cast<EmcDvfsTimingTable *>(T210SdevEmcDvfsTableH4gb01);
|
||||
std::memcpy(mtc_tables_buffer, T210SdevEmcDvfsTableH4gb01, sizeof(T210SdevEmcDvfsTableH4gb01));
|
||||
return reinterpret_cast<EmcDvfsTimingTable *>(mtc_tables_buffer);
|
||||
default:
|
||||
ShowFatalError("Unknown EmcDvfsTimingTableIndex: %d\n", index);
|
||||
}
|
||||
|
@ -2829,9 +2832,9 @@ namespace ams::nxboot {
|
|||
|
||||
}
|
||||
|
||||
void DoMemoryTrainingErista(int index) {
|
||||
void DoMemoryTrainingErista(int index, void *mtc_tables_buffer) {
|
||||
/* Get timing tables. */
|
||||
auto *timing_tables = GetEmcDvfsTimingTables(index);
|
||||
auto *timing_tables = GetEmcDvfsTimingTables(index, mtc_tables_buffer);
|
||||
auto *src_timing = timing_tables + 0;
|
||||
auto *dst_timing = timing_tables + 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue