summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-03-24 02:47:16 +0100
committerbunnei <bunneidev@gmail.com>2021-03-24 02:47:16 +0100
commit10d6e9f32bcc102d2fb12ba3e489c9a03d7f220f (patch)
tree32e7512e8c19151be76acfeee5da07f96192ab75 /src/core/hle/kernel
parenthle: kernel: k_memory_region_type: Minor code cleanup. (diff)
downloadyuzu-10d6e9f32bcc102d2fb12ba3e489c9a03d7f220f.tar
yuzu-10d6e9f32bcc102d2fb12ba3e489c9a03d7f220f.tar.gz
yuzu-10d6e9f32bcc102d2fb12ba3e489c9a03d7f220f.tar.bz2
yuzu-10d6e9f32bcc102d2fb12ba3e489c9a03d7f220f.tar.lz
yuzu-10d6e9f32bcc102d2fb12ba3e489c9a03d7f220f.tar.xz
yuzu-10d6e9f32bcc102d2fb12ba3e489c9a03d7f220f.tar.zst
yuzu-10d6e9f32bcc102d2fb12ba3e489c9a03d7f220f.zip
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/kernel.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index e994e8bed..557e63ea0 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -269,9 +269,7 @@ struct KernelCore::Impl {
return schedulers[thread_id]->GetCurrentThread();
}
- void InitializeMemoryLayout() {
- KMemoryLayout memory_layout;
-
+ void DeriveInitialMemoryLayout(KMemoryLayout& memory_layout) {
// Insert the root region for the virtual memory tree, from which all other regions will
// derive.
memory_layout.GetVirtualMemoryRegionTree().InsertDirectly(
@@ -531,6 +529,12 @@ struct KernelCore::Impl {
// Cache all linear regions in their own trees for faster access, later.
memory_layout.InitializeLinearMemoryRegionTrees(aligned_linear_phys_start,
linear_region_start);
+ }
+
+ void InitializeMemoryLayout() {
+ // Derive the initial memory layout from the emulated board
+ KMemoryLayout memory_layout;
+ DeriveInitialMemoryLayout(memory_layout);
const auto system_pool = memory_layout.GetKernelSystemPoolRegionPhysicalExtents();
const auto applet_pool = memory_layout.GetKernelAppletPoolRegionPhysicalExtents();