mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 08:50:57 +01:00
Merge pull request #1866 from lioncash/cache
service/ldr: Deduplicate instruction cache clearing code in LoadNro()
This commit is contained in:
commit
cca4665a69
1 changed files with 2 additions and 8 deletions
|
@ -335,10 +335,7 @@ public:
|
|||
vm_manager.ReprotectRange(*map_address + header.rw_offset, header.rw_size,
|
||||
Kernel::VMAPermission::ReadWrite);
|
||||
|
||||
Core::System::GetInstance().ArmInterface(0).ClearInstructionCache();
|
||||
Core::System::GetInstance().ArmInterface(1).ClearInstructionCache();
|
||||
Core::System::GetInstance().ArmInterface(2).ClearInstructionCache();
|
||||
Core::System::GetInstance().ArmInterface(3).ClearInstructionCache();
|
||||
Core::System::GetInstance().InvalidateCpuInstructionCaches();
|
||||
|
||||
nro.insert_or_assign(*map_address, NROInfo{hash, nro_size + bss_size});
|
||||
|
||||
|
@ -391,10 +388,7 @@ public:
|
|||
Kernel::MemoryState::ModuleCodeStatic) == RESULT_SUCCESS);
|
||||
ASSERT(process->UnmapMemory(mapped_addr, 0, nro_size) == RESULT_SUCCESS);
|
||||
|
||||
Core::System::GetInstance().ArmInterface(0).ClearInstructionCache();
|
||||
Core::System::GetInstance().ArmInterface(1).ClearInstructionCache();
|
||||
Core::System::GetInstance().ArmInterface(2).ClearInstructionCache();
|
||||
Core::System::GetInstance().ArmInterface(3).ClearInstructionCache();
|
||||
Core::System::GetInstance().InvalidateCpuInstructionCaches();
|
||||
|
||||
nro.erase(iter);
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
|
|
Loading…
Reference in a new issue