| 49 | static tlbs s_tlb_backup[std::size(tlb)]; |
| 50 | |
| 51 | static void PreLoadPrep() |
| 52 | { |
| 53 | // ensure everything is in sync before we start overwriting stuff. |
| 54 | if (THREAD_VU1) |
| 55 | vu1Thread.WaitVU(); |
| 56 | MTGS::WaitGS(false); |
| 57 | |
| 58 | // backup current TLBs, since we're going to overwrite them all |
| 59 | std::memcpy(s_tlb_backup, tlb, sizeof(s_tlb_backup)); |
| 60 | |
| 61 | // clear protected pages, since we don't want to fault loading EE memory |
| 62 | mmap_ResetBlockTracking(); |
| 63 | |
| 64 | VMManager::Internal::ClearCPUExecutionCaches(); |
| 65 | } |
| 66 | |
| 67 | static void PostLoadPrep() |
| 68 | { |
no test coverage detected