diff options
author | bunnei <bunneidev@gmail.com> | 2022-04-12 20:23:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-12 20:23:20 +0200 |
commit | dc2dd5d5a6a7f60cf12788af6ae92f51cb8e5c0a (patch) | |
tree | 88f18cf06c71fd6be128080683406c617d42daca /src/core/hle/service/ldr/ldr.cpp | |
parent | Merge pull request #8157 from lat9nq/kernel-races (diff) | |
parent | hle: kernel: Invalidate entire icache in UnmapProcessMemory and UnmapCodeMemory (fixes #8174) (diff) | |
download | yuzu-dc2dd5d5a6a7f60cf12788af6ae92f51cb8e5c0a.tar yuzu-dc2dd5d5a6a7f60cf12788af6ae92f51cb8e5c0a.tar.gz yuzu-dc2dd5d5a6a7f60cf12788af6ae92f51cb8e5c0a.tar.bz2 yuzu-dc2dd5d5a6a7f60cf12788af6ae92f51cb8e5c0a.tar.lz yuzu-dc2dd5d5a6a7f60cf12788af6ae92f51cb8e5c0a.tar.xz yuzu-dc2dd5d5a6a7f60cf12788af6ae92f51cb8e5c0a.tar.zst yuzu-dc2dd5d5a6a7f60cf12788af6ae92f51cb8e5c0a.zip |
Diffstat (limited to 'src/core/hle/service/ldr/ldr.cpp')
-rw-r--r-- | src/core/hle/service/ldr/ldr.cpp | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index 2477c5612..cf727c167 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp @@ -389,8 +389,12 @@ public: if (bss_size) { auto block_guard = detail::ScopeExit([&] { - page_table.UnmapCodeMemory(addr + nro_size, bss_addr, bss_size); - page_table.UnmapCodeMemory(addr, nro_addr, nro_size); + page_table.UnmapCodeMemory( + addr + nro_size, bss_addr, bss_size, + Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange); + page_table.UnmapCodeMemory( + addr, nro_addr, nro_size, + Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange); }); const ResultCode result{ @@ -570,17 +574,21 @@ public: auto& page_table{system.CurrentProcess()->PageTable()}; if (info.bss_size != 0) { - CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size + - info.ro_size + info.data_size, - info.bss_address, info.bss_size)); + CASCADE_CODE(page_table.UnmapCodeMemory( + info.nro_address + info.text_size + info.ro_size + info.data_size, info.bss_address, + info.bss_size, Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange)); } - CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size + info.ro_size, - info.src_addr + info.text_size + info.ro_size, - info.data_size)); - CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address + info.text_size, - info.src_addr + info.text_size, info.ro_size)); - CASCADE_CODE(page_table.UnmapCodeMemory(info.nro_address, info.src_addr, info.text_size)); + CASCADE_CODE(page_table.UnmapCodeMemory( + info.nro_address + info.text_size + info.ro_size, + info.src_addr + info.text_size + info.ro_size, info.data_size, + Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange)); + CASCADE_CODE(page_table.UnmapCodeMemory( + info.nro_address + info.text_size, info.src_addr + info.text_size, info.ro_size, + Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange)); + CASCADE_CODE(page_table.UnmapCodeMemory( + info.nro_address, info.src_addr, info.text_size, + Kernel::KPageTable::ICacheInvalidationStrategy::InvalidateRange)); return ResultSuccess; } |