summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar liamwhite2023-10-02 11:28:24 -0400
committerGravatar GitHub2023-10-02 11:28:24 -0400
commitff57c667734706be0769f7c2a11a27dd93677771 (patch)
tree1030ff20708832367bffaa61ee121ddfeca3c4c7 /src
parentMerge pull request #11655 from liamwhite/additional-dump-targets (diff)
parentk_page_table: skip page table clearing on finalization (diff)
downloadyuzu-ff57c667734706be0769f7c2a11a27dd93677771.tar.gz
yuzu-ff57c667734706be0769f7c2a11a27dd93677771.tar.xz
yuzu-ff57c667734706be0769f7c2a11a27dd93677771.zip
Merge pull request #11652 from liamwhite/shutdown-goes-brrr
k_page_table: skip page table clearing on finalization
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/kernel/k_page_table.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_page_table.cpp b/src/core/hle/kernel/k_page_table.cpp
index 9bfc85b34..5b51edf30 100644
--- a/src/core/hle/kernel/k_page_table.cpp
+++ b/src/core/hle/kernel/k_page_table.cpp
@@ -5,6 +5,7 @@
5#include "common/assert.h" 5#include "common/assert.h"
6#include "common/literals.h" 6#include "common/literals.h"
7#include "common/scope_exit.h" 7#include "common/scope_exit.h"
8#include "common/settings.h"
8#include "core/core.h" 9#include "core/core.h"
9#include "core/hle/kernel/k_address_space_info.h" 10#include "core/hle/kernel/k_address_space_info.h"
10#include "core/hle/kernel/k_memory_block.h" 11#include "core/hle/kernel/k_memory_block.h"
@@ -337,11 +338,14 @@ Result KPageTable::InitializeForProcess(FileSys::ProgramAddressSpaceType as_type
337} 338}
338 339
339void KPageTable::Finalize() { 340void KPageTable::Finalize() {
341 auto HostUnmapCallback = [&](KProcessAddress addr, u64 size) {
342 if (Settings::IsFastmemEnabled()) {
343 m_system.DeviceMemory().buffer.Unmap(GetInteger(addr), size);
344 }
345 };
346
340 // Finalize memory blocks. 347 // Finalize memory blocks.
341 m_memory_block_manager.Finalize(m_memory_block_slab_manager, 348 m_memory_block_manager.Finalize(m_memory_block_slab_manager, std::move(HostUnmapCallback));
342 [&](KProcessAddress addr, u64 size) {
343 m_memory->UnmapRegion(*m_page_table_impl, addr, size);
344 });
345 349
346 // Release any insecure mapped memory. 350 // Release any insecure mapped memory.
347 if (m_mapped_insecure_memory) { 351 if (m_mapped_insecure_memory) {