mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-12 16:44:26 +01:00
hle: kernel: Breakup InitializeMemoryLayout.
This commit is contained in:
parent
fb91647bca
commit
10d6e9f32b
@ -269,9 +269,7 @@ struct KernelCore::Impl {
|
|||||||
return schedulers[thread_id]->GetCurrentThread();
|
return schedulers[thread_id]->GetCurrentThread();
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeMemoryLayout() {
|
void DeriveInitialMemoryLayout(KMemoryLayout& memory_layout) {
|
||||||
KMemoryLayout memory_layout;
|
|
||||||
|
|
||||||
// Insert the root region for the virtual memory tree, from which all other regions will
|
// Insert the root region for the virtual memory tree, from which all other regions will
|
||||||
// derive.
|
// derive.
|
||||||
memory_layout.GetVirtualMemoryRegionTree().InsertDirectly(
|
memory_layout.GetVirtualMemoryRegionTree().InsertDirectly(
|
||||||
@ -531,6 +529,12 @@ struct KernelCore::Impl {
|
|||||||
// Cache all linear regions in their own trees for faster access, later.
|
// Cache all linear regions in their own trees for faster access, later.
|
||||||
memory_layout.InitializeLinearMemoryRegionTrees(aligned_linear_phys_start,
|
memory_layout.InitializeLinearMemoryRegionTrees(aligned_linear_phys_start,
|
||||||
linear_region_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 system_pool = memory_layout.GetKernelSystemPoolRegionPhysicalExtents();
|
||||||
const auto applet_pool = memory_layout.GetKernelAppletPoolRegionPhysicalExtents();
|
const auto applet_pool = memory_layout.GetKernelAppletPoolRegionPhysicalExtents();
|
||||||
|
Loading…
Reference in New Issue
Block a user