From 08d1e9b88050f7e271cd8d42666d5ed0e9bec1f2 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 24 Jan 2019 08:33:06 -0800 Subject: [PATCH] fatal: fix payload size, pm: take from application instead of applet --- stratosphere/fatal/source/fatal_payload_manager.hpp | 2 +- stratosphere/pm/source/pm_resource_limits.cpp | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/stratosphere/fatal/source/fatal_payload_manager.hpp b/stratosphere/fatal/source/fatal_payload_manager.hpp index cb052b37f..7aed9cdce 100644 --- a/stratosphere/fatal/source/fatal_payload_manager.hpp +++ b/stratosphere/fatal/source/fatal_payload_manager.hpp @@ -18,7 +18,7 @@ #include #include -#define IRAM_PAYLOAD_MAX_SIZE 0x30000 +#define IRAM_PAYLOAD_MAX_SIZE 0x2F000 #define IRAM_PAYLOAD_BASE 0x40010000ull class FatalPayloadManager { diff --git a/stratosphere/pm/source/pm_resource_limits.cpp b/stratosphere/pm/source/pm_resource_limits.cpp index 67a4aa773..4dcdfa5a8 100644 --- a/stratosphere/pm/source/pm_resource_limits.cpp +++ b/stratosphere/pm/source/pm_resource_limits.cpp @@ -179,15 +179,11 @@ void ResourceLimitUtils::InitializeLimits() { } } - /* Atmosphere: Allocate extra memory (24 MiB) to SYSTEM away from Applet. */ + /* Atmosphere: Allocate extra memory (24 MiB) to SYSTEM away from Application. */ for (unsigned int i = 0; i < 6; i++) { g_memory_resource_limits[i][0] += ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES; - /* On < 4.0.0, taking from application instead of applet fixes a rare hang on boot. */ - if (kernelAbove400()) { - g_memory_resource_limits[i][2] -= ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES; - } else { - g_memory_resource_limits[i][1] -= ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES; - } + /* Taking from application instead of applet fixes a rare hang on boot on < 4.0.0. */ + g_memory_resource_limits[i][1] -= ATMOSPHERE_EXTRA_SYSTEM_MEMORY_FOR_SYSMODULES; } /* Set resource limits. */