summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-02-23 03:33:43 +0100
committerLiam <byteslice@airmail.cc>2023-03-01 16:42:45 +0100
commit4165ac06806017cfcb8da547ae84dee554e465c3 (patch)
tree65abe4a9faf89d5ccfd3c4be0db85defd7a90574 /src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
parentkernel: simplify KAbstractSchedulerLock::Lock (diff)
downloadyuzu-4165ac06806017cfcb8da547ae84dee554e465c3.tar
yuzu-4165ac06806017cfcb8da547ae84dee554e465c3.tar.gz
yuzu-4165ac06806017cfcb8da547ae84dee554e465c3.tar.bz2
yuzu-4165ac06806017cfcb8da547ae84dee554e465c3.tar.lz
yuzu-4165ac06806017cfcb8da547ae84dee554e465c3.tar.xz
yuzu-4165ac06806017cfcb8da547ae84dee554e465c3.tar.zst
yuzu-4165ac06806017cfcb8da547ae84dee554e465c3.zip
Diffstat (limited to 'src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp')
-rw-r--r--src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
index c10b7bf30..5b8a248c8 100644
--- a/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
+++ b/src/core/hle/kernel/board/nintendo/nx/k_system_control.cpp
@@ -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);
+
+ constexpr size_t MinimumSizeWithoutFatal = RequiredNonSecureSystemMemorySize;
+ static_assert(MinimumSizeWithoutFatal >= 0x2A00000);
- return MinimumSize;
+ return MinimumSizeWithFatal;
}
namespace {