mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-11-15 09:30:05 +00:00
kernel: adjust pool allocations
This commit is contained in:
parent
62711fec02
commit
4165ac0680
@ -14,9 +14,12 @@ namespace Kernel::Board::Nintendo::Nx {
|
||||
|
||||
namespace impl {
|
||||
|
||||
constexpr const std::size_t RequiredNonSecureSystemMemorySizeVi = 0x2238 * 4 * 1024;
|
||||
constexpr const std::size_t RequiredNonSecureSystemMemorySizeNvservices = 0x710 * 4 * 1024;
|
||||
constexpr const std::size_t RequiredNonSecureSystemMemorySizeMisc = 0x80 * 4 * 1024;
|
||||
using namespace Common::Literals;
|
||||
|
||||
constexpr const std::size_t RequiredNonSecureSystemMemorySizeVi = 0x2280 * 4_KiB;
|
||||
constexpr const std::size_t RequiredNonSecureSystemMemorySizeViFatal = 0x200 * 4_KiB;
|
||||
constexpr const std::size_t RequiredNonSecureSystemMemorySizeNvservices = 0x704 * 4_KiB;
|
||||
constexpr const std::size_t RequiredNonSecureSystemMemorySizeMisc = 0x80 * 4_KiB;
|
||||
|
||||
} // namespace impl
|
||||
|
||||
@ -24,6 +27,9 @@ constexpr const std::size_t RequiredNonSecureSystemMemorySize =
|
||||
impl::RequiredNonSecureSystemMemorySizeVi + impl::RequiredNonSecureSystemMemorySizeNvservices +
|
||||
impl::RequiredNonSecureSystemMemorySizeMisc;
|
||||
|
||||
constexpr const std::size_t RequiredNonSecureSystemMemorySizeWithFatal =
|
||||
RequiredNonSecureSystemMemorySize + impl::RequiredNonSecureSystemMemorySizeViFatal;
|
||||
|
||||
namespace {
|
||||
|
||||
using namespace Common::Literals;
|
||||
@ -120,10 +126,13 @@ size_t KSystemControl::Init::GetAppletPoolSize() {
|
||||
|
||||
size_t KSystemControl::Init::GetMinimumNonSecureSystemPoolSize() {
|
||||
// Verify that our minimum is at least as large as Nintendo's.
|
||||
constexpr size_t MinimumSize = RequiredNonSecureSystemMemorySize;
|
||||
static_assert(MinimumSize >= 0x29C8000);
|
||||
constexpr size_t MinimumSizeWithFatal = RequiredNonSecureSystemMemorySizeWithFatal;
|
||||
static_assert(MinimumSizeWithFatal >= 0x2C04000);
|
||||
|
||||
return MinimumSize;
|
||||
constexpr size_t MinimumSizeWithoutFatal = RequiredNonSecureSystemMemorySize;
|
||||
static_assert(MinimumSizeWithoutFatal >= 0x2A00000);
|
||||
|
||||
return MinimumSizeWithFatal;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
@ -131,7 +131,7 @@ VAddr InitializeSlabHeap(Core::System& system, KMemoryLayout& memory_layout, VAd
|
||||
}
|
||||
|
||||
size_t CalculateSlabHeapGapSize() {
|
||||
constexpr size_t KernelSlabHeapGapSize = 2_MiB - 320_KiB;
|
||||
constexpr size_t KernelSlabHeapGapSize = 2_MiB - 356_KiB;
|
||||
static_assert(KernelSlabHeapGapSize <= KernelSlabHeapGapsSizeMax);
|
||||
return KernelSlabHeapGapSize;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user