diff options
author | Liam <byteslice@airmail.cc> | 2023-10-11 15:44:49 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-10-20 08:34:15 +0200 |
commit | 22afa2c7a39e11ccbe572e600a5a863cd323f2b0 (patch) | |
tree | 517d3d8a730140c12e7f6cbbeed6d37a508bd6bc /src/core/hle/kernel/init | |
parent | Merge pull request #11822 from german77/no-name (diff) | |
download | yuzu-22afa2c7a39e11ccbe572e600a5a863cd323f2b0.tar yuzu-22afa2c7a39e11ccbe572e600a5a863cd323f2b0.tar.gz yuzu-22afa2c7a39e11ccbe572e600a5a863cd323f2b0.tar.bz2 yuzu-22afa2c7a39e11ccbe572e600a5a863cd323f2b0.tar.lz yuzu-22afa2c7a39e11ccbe572e600a5a863cd323f2b0.tar.xz yuzu-22afa2c7a39e11ccbe572e600a5a863cd323f2b0.tar.zst yuzu-22afa2c7a39e11ccbe572e600a5a863cd323f2b0.zip |
Diffstat (limited to 'src/core/hle/kernel/init')
-rw-r--r-- | src/core/hle/kernel/init/init_slab_setup.cpp | 9 |
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 == /// memory. static KPhysicalAddress TranslateSlabAddrToPhysical(KMemoryLayout& memory_layout, KVirtualAddress slab_addr) { - slab_addr -= GetInteger(memory_layout.GetSlabRegionAddress()); + slab_addr -= memory_layout.GetSlabRegion().GetAddress(); return GetInteger(slab_addr) + Core::DramMemoryMap::SlabHeapBase; } @@ -196,7 +196,12 @@ void InitializeSlabHeaps(Core::System& system, KMemoryLayout& memory_layout) { auto& kernel = system.Kernel(); // Get the start of the slab region, since that's where we'll be working. - KVirtualAddress address = memory_layout.GetSlabRegionAddress(); + const KMemoryRegion& slab_region = memory_layout.GetSlabRegion(); + KVirtualAddress address = slab_region.GetAddress(); + + // Clear the slab region. + // TODO: implement access to kernel VAs. + // std::memset(device_ptr, 0, slab_region.GetSize()); // Initialize slab type array to be in sorted order. std::array<KSlabType, KSlabType_Count> slab_types; |