summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/init/init_slab_setup.cpp
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2023-10-20 17:08:00 +0200
committerGitHub <noreply@github.com>2023-10-20 17:08:00 +0200
commit2e760a98333520f3de1fa7c7a1f9298fd7241ceb (patch)
tree90e8a1aa75a91659c0b553f3746ea4febc0bf273 /src/core/hle/kernel/init/init_slab_setup.cpp
parentMerge pull request #11825 from liamwhite/system-resource (diff)
parentgdbstub: add PermissionLocked to mappings table (diff)
downloadyuzu-2e760a98333520f3de1fa7c7a1f9298fd7241ceb.tar
yuzu-2e760a98333520f3de1fa7c7a1f9298fd7241ceb.tar.gz
yuzu-2e760a98333520f3de1fa7c7a1f9298fd7241ceb.tar.bz2
yuzu-2e760a98333520f3de1fa7c7a1f9298fd7241ceb.tar.lz
yuzu-2e760a98333520f3de1fa7c7a1f9298fd7241ceb.tar.xz
yuzu-2e760a98333520f3de1fa7c7a1f9298fd7241ceb.tar.zst
yuzu-2e760a98333520f3de1fa7c7a1f9298fd7241ceb.zip
Diffstat (limited to 'src/core/hle/kernel/init/init_slab_setup.cpp')
-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 ==
/// 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;