diff options
| author | 2023-10-11 09:44:49 -0400 | |
|---|---|---|
| committer | 2023-10-20 02:34:15 -0400 | |
| commit | 22afa2c7a39e11ccbe572e600a5a863cd323f2b0 (patch) | |
| tree | 517d3d8a730140c12e7f6cbbeed6d37a508bd6bc /src/core/hle/kernel/init | |
| parent | Merge pull request #11822 from german77/no-name (diff) | |
| download | yuzu-22afa2c7a39e11ccbe572e600a5a863cd323f2b0.tar.gz yuzu-22afa2c7a39e11ccbe572e600a5a863cd323f2b0.tar.xz yuzu-22afa2c7a39e11ccbe572e600a5a863cd323f2b0.zip | |
kernel: reshuffle ini1 size, add slab clear note
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 == | |||
| 106 | /// memory. | 106 | /// memory. |
| 107 | static KPhysicalAddress TranslateSlabAddrToPhysical(KMemoryLayout& memory_layout, | 107 | static 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; |