diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-05 18:25:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 18:25:29 +0100 |
commit | 4c198bbf06fe7b72d4718cf3571e99b6169e9f47 (patch) | |
tree | 3f091be57ce7198ee53b721b160a454ef6dee913 /src/core/hle/kernel/k_memory_layout.h | |
parent | Merge pull request #9189 from vonchenplus/stupid (diff) | |
parent | core: hle: kernel: Address review comments. (diff) | |
download | yuzu-4c198bbf06fe7b72d4718cf3571e99b6169e9f47.tar yuzu-4c198bbf06fe7b72d4718cf3571e99b6169e9f47.tar.gz yuzu-4c198bbf06fe7b72d4718cf3571e99b6169e9f47.tar.bz2 yuzu-4c198bbf06fe7b72d4718cf3571e99b6169e9f47.tar.lz yuzu-4c198bbf06fe7b72d4718cf3571e99b6169e9f47.tar.xz yuzu-4c198bbf06fe7b72d4718cf3571e99b6169e9f47.tar.zst yuzu-4c198bbf06fe7b72d4718cf3571e99b6169e9f47.zip |
Diffstat (limited to 'src/core/hle/kernel/k_memory_layout.h')
-rw-r--r-- | src/core/hle/kernel/k_memory_layout.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_memory_layout.h b/src/core/hle/kernel/k_memory_layout.h index 884fc623a..fd6e1d3e6 100644 --- a/src/core/hle/kernel/k_memory_layout.h +++ b/src/core/hle/kernel/k_memory_layout.h @@ -60,10 +60,12 @@ constexpr std::size_t KernelSlabHeapGapsSizeMax = 2_MiB - 64_KiB; constexpr std::size_t KernelSlabHeapSize = KernelSlabHeapDataSize + KernelSlabHeapGapsSizeMax; // NOTE: This is calculated from KThread slab counts, assuming KThread size <= 0x860. -constexpr std::size_t KernelSlabHeapAdditionalSize = 0x68000; +constexpr size_t KernelPageBufferHeapSize = 0x3E0000; +constexpr size_t KernelSlabHeapAdditionalSize = 0x148000; +constexpr size_t KernelPageBufferAdditionalSize = 0x33C000; -constexpr std::size_t KernelResourceSize = - KernelPageTableHeapSize + KernelInitialPageHeapSize + KernelSlabHeapSize; +constexpr std::size_t KernelResourceSize = KernelPageTableHeapSize + KernelInitialPageHeapSize + + KernelSlabHeapSize + KernelPageBufferHeapSize; constexpr bool IsKernelAddressKey(VAddr key) { return KernelVirtualAddressSpaceBase <= key && key <= KernelVirtualAddressSpaceLast; @@ -168,6 +170,11 @@ public: KMemoryRegionType_VirtualDramKernelTraceBuffer)); } + const KMemoryRegion& GetSecureAppletMemoryRegion() { + return Dereference(GetVirtualMemoryRegionTree().FindByType( + KMemoryRegionType_VirtualDramKernelSecureAppletMemory)); + } + const KMemoryRegion& GetVirtualLinearRegion(VAddr address) const { return Dereference(FindVirtualLinear(address)); } @@ -229,7 +236,7 @@ public: void InitializeLinearMemoryRegionTrees(PAddr aligned_linear_phys_start, VAddr linear_virtual_start); - static size_t GetResourceRegionSizeForInit(); + static size_t GetResourceRegionSizeForInit(bool use_extra_resource); auto GetKernelRegionExtents() const { return GetVirtualMemoryRegionTree().GetDerivedRegionExtents(KMemoryRegionType_Kernel); @@ -279,6 +286,10 @@ public: return GetPhysicalMemoryRegionTree().GetDerivedRegionExtents( KMemoryRegionType_DramKernelSlab); } + auto GetKernelSecureAppletMemoryRegionPhysicalExtents() { + return GetPhysicalMemoryRegionTree().GetDerivedRegionExtents( + KMemoryRegionType_DramKernelSecureAppletMemory); + } auto GetKernelPageTableHeapRegionPhysicalExtents() const { return GetPhysicalMemoryRegionTree().GetDerivedRegionExtents( KMemoryRegionType_DramKernelPtHeap); |