summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/init
diff options
context:
space:
mode:
authorGravatar Franco M2023-10-21 02:25:27 -0300
committerGravatar GitHub2023-10-21 02:25:27 -0300
commitb76a1d987ff83b831a19a0c19f9fcd96c504c077 (patch)
tree4b08482cc3d34e341d7d8620182854c248f899b5 /src/core/hle/kernel/init
parentReverted dirty code in main. (diff)
parentMerge pull request #11748 from liamwhite/kern_1700 (diff)
downloadyuzu-b76a1d987ff83b831a19a0c19f9fcd96c504c077.tar.gz
yuzu-b76a1d987ff83b831a19a0c19f9fcd96c504c077.tar.xz
yuzu-b76a1d987ff83b831a19a0c19f9fcd96c504c077.zip
Merge branch 'yuzu-emu:master' into new-shortcut
Diffstat (limited to 'src/core/hle/kernel/init')
-rw-r--r--src/core/hle/kernel/init/init_slab_setup.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/hle/kernel/init/init_slab_setup.cpp b/src/core/hle/kernel/init/init_slab_setup.cpp
index 1f2db673c..a0e20bbbb 100644
--- a/src/core/hle/kernel/init/init_slab_setup.cpp
+++ b/src/core/hle/kernel/init/init_slab_setup.cpp
@@ -106,7 +106,7 @@ static_assert(KernelPageBufferAdditionalSize ==
106/// memory. 106/// memory.
107static KPhysicalAddress TranslateSlabAddrToPhysical(KMemoryLayout& memory_layout, 107static KPhysicalAddress TranslateSlabAddrToPhysical(KMemoryLayout& memory_layout,
108 KVirtualAddress slab_addr) { 108 KVirtualAddress slab_addr) {
109 slab_addr -= GetInteger(memory_layout.GetSlabRegionAddress()); 109 slab_addr -= memory_layout.GetSlabRegion().GetAddress();
110 return GetInteger(slab_addr) + Core::DramMemoryMap::SlabHeapBase; 110 return GetInteger(slab_addr) + Core::DramMemoryMap::SlabHeapBase;
111} 111}
112 112
@@ -196,7 +196,12 @@ void InitializeSlabHeaps(Core::System& system, KMemoryLayout& memory_layout) {
196 auto& kernel = system.Kernel(); 196 auto& kernel = system.Kernel();
197 197
198 // Get the start of the slab region, since that's where we'll be working. 198 // Get the start of the slab region, since that's where we'll be working.
199 KVirtualAddress address = memory_layout.GetSlabRegionAddress(); 199 const KMemoryRegion& slab_region = memory_layout.GetSlabRegion();
200 KVirtualAddress address = slab_region.GetAddress();
201
202 // Clear the slab region.
203 // TODO: implement access to kernel VAs.
204 // std::memset(device_ptr, 0, slab_region.GetSize());
200 205
201 // Initialize slab type array to be in sorted order. 206 // Initialize slab type array to be in sorted order.
202 std::array<KSlabType, KSlabType_Count> slab_types; 207 std::array<KSlabType, KSlabType_Count> slab_types;