summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-03-26 09:23:43 +0100
committerbunnei <bunneidev@gmail.com>2022-03-26 09:23:43 +0100
commitc975a51ae7d37180f18e7cf1ac053a38aa8dae37 (patch)
tree85fd50c7d8e2ba270bb2284201a7f9a335474830 /src/core/hle/kernel
parenthle: kernel: k_page_linked_list: Add Empty method. (diff)
downloadyuzu-c975a51ae7d37180f18e7cf1ac053a38aa8dae37.tar
yuzu-c975a51ae7d37180f18e7cf1ac053a38aa8dae37.tar.gz
yuzu-c975a51ae7d37180f18e7cf1ac053a38aa8dae37.tar.bz2
yuzu-c975a51ae7d37180f18e7cf1ac053a38aa8dae37.tar.lz
yuzu-c975a51ae7d37180f18e7cf1ac053a38aa8dae37.tar.xz
yuzu-c975a51ae7d37180f18e7cf1ac053a38aa8dae37.tar.zst
yuzu-c975a51ae7d37180f18e7cf1ac053a38aa8dae37.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/k_page_table.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_page_table.h b/src/core/hle/kernel/k_page_table.h
index 54c6adf8d..2ae7affa0 100644
--- a/src/core/hle/kernel/k_page_table.h
+++ b/src/core/hle/kernel/k_page_table.h
@@ -12,6 +12,7 @@
#include "core/file_sys/program_metadata.h"
#include "core/hle/kernel/k_light_lock.h"
#include "core/hle/kernel/k_memory_block.h"
+#include "core/hle/kernel/k_memory_layout.h"
#include "core/hle/kernel/k_memory_manager.h"
#include "core/hle/result.h"
@@ -163,6 +164,12 @@ private:
return general_lock.IsLockedByCurrentThread();
}
+ bool IsHeapPhysicalAddress(const KMemoryLayout& layout, PAddr phys_addr) {
+ ASSERT(this->IsLockedByCurrentThread());
+
+ return layout.IsHeapPhysicalAddress(cached_physical_heap_region, phys_addr);
+ }
+
mutable KLightLock general_lock;
mutable KLightLock map_physical_memory_lock;
@@ -322,6 +329,7 @@ private:
bool is_aslr_enabled{};
u32 heap_fill_value{};
+ const KMemoryRegion* cached_physical_heap_region{};
KMemoryManager::Pool memory_pool{KMemoryManager::Pool::Application};
KMemoryManager::Direction allocation_option{KMemoryManager::Direction::FromFront};