diff options
| author | 2022-03-26 01:23:43 -0700 | |
|---|---|---|
| committer | 2022-03-26 01:23:43 -0700 | |
| commit | c975a51ae7d37180f18e7cf1ac053a38aa8dae37 (patch) | |
| tree | 85fd50c7d8e2ba270bb2284201a7f9a335474830 | |
| parent | hle: kernel: k_page_linked_list: Add Empty method. (diff) | |
| download | yuzu-c975a51ae7d37180f18e7cf1ac053a38aa8dae37.tar.gz yuzu-c975a51ae7d37180f18e7cf1ac053a38aa8dae37.tar.xz yuzu-c975a51ae7d37180f18e7cf1ac053a38aa8dae37.zip | |
hle: kernel: k_page_table: Add IsHeapPhysicalAddress method.
| -rw-r--r-- | src/core/hle/kernel/k_page_table.h | 8 |
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 @@ | |||
| 12 | #include "core/file_sys/program_metadata.h" | 12 | #include "core/file_sys/program_metadata.h" |
| 13 | #include "core/hle/kernel/k_light_lock.h" | 13 | #include "core/hle/kernel/k_light_lock.h" |
| 14 | #include "core/hle/kernel/k_memory_block.h" | 14 | #include "core/hle/kernel/k_memory_block.h" |
| 15 | #include "core/hle/kernel/k_memory_layout.h" | ||
| 15 | #include "core/hle/kernel/k_memory_manager.h" | 16 | #include "core/hle/kernel/k_memory_manager.h" |
| 16 | #include "core/hle/result.h" | 17 | #include "core/hle/result.h" |
| 17 | 18 | ||
| @@ -163,6 +164,12 @@ private: | |||
| 163 | return general_lock.IsLockedByCurrentThread(); | 164 | return general_lock.IsLockedByCurrentThread(); |
| 164 | } | 165 | } |
| 165 | 166 | ||
| 167 | bool IsHeapPhysicalAddress(const KMemoryLayout& layout, PAddr phys_addr) { | ||
| 168 | ASSERT(this->IsLockedByCurrentThread()); | ||
| 169 | |||
| 170 | return layout.IsHeapPhysicalAddress(cached_physical_heap_region, phys_addr); | ||
| 171 | } | ||
| 172 | |||
| 166 | mutable KLightLock general_lock; | 173 | mutable KLightLock general_lock; |
| 167 | mutable KLightLock map_physical_memory_lock; | 174 | mutable KLightLock map_physical_memory_lock; |
| 168 | 175 | ||
| @@ -322,6 +329,7 @@ private: | |||
| 322 | bool is_aslr_enabled{}; | 329 | bool is_aslr_enabled{}; |
| 323 | 330 | ||
| 324 | u32 heap_fill_value{}; | 331 | u32 heap_fill_value{}; |
| 332 | const KMemoryRegion* cached_physical_heap_region{}; | ||
| 325 | 333 | ||
| 326 | KMemoryManager::Pool memory_pool{KMemoryManager::Pool::Application}; | 334 | KMemoryManager::Pool memory_pool{KMemoryManager::Pool::Application}; |
| 327 | KMemoryManager::Direction allocation_option{KMemoryManager::Direction::FromFront}; | 335 | KMemoryManager::Direction allocation_option{KMemoryManager::Direction::FromFront}; |