mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-03 08:08:39 -04:00
kern: better divide non-secure size, don't waste fatal memory unless necessary
This commit is contained in:
parent
aad2be0a01
commit
406320f6ec
4 changed files with 19 additions and 6 deletions
|
@ -367,10 +367,14 @@ namespace ams::kern::board::nintendo::nx {
|
|||
|
||||
size_t KSystemControl::Init::GetMinimumNonSecureSystemPoolSize() {
|
||||
/* Verify that our minimum is at least as large as Nintendo's. */
|
||||
constexpr size_t MinimumSize = ::ams::svc::RequiredNonSecureSystemMemorySize;
|
||||
static_assert(MinimumSize >= 0x2C04000);
|
||||
constexpr size_t MinimumSizeWithFatal = ::ams::svc::RequiredNonSecureSystemMemorySizeWithFatal;
|
||||
static_assert(MinimumSizeWithFatal >= 0x2C04000);
|
||||
|
||||
return MinimumSize;
|
||||
constexpr size_t MinimumSizeWithoutFatal = ::ams::svc::RequiredNonSecureSystemMemorySize;
|
||||
static_assert(MinimumSizeWithoutFatal >= 0x2A00000);
|
||||
|
||||
/* Include fatal in non-seure size on 16.0.0+. */
|
||||
return kern::GetTargetFirmware() >= ams::TargetFirmware_16_0_0 ? MinimumSizeWithFatal : MinimumSizeWithoutFatal;
|
||||
}
|
||||
|
||||
u8 KSystemControl::Init::GetDebugLogUartPort() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue