ams: allow bootloader to merely approximate correct target firmware

This commit is contained in:
Michael Scire 2021-10-11 00:54:17 -07:00
parent d41de21753
commit 5708bb1557
24 changed files with 281 additions and 396 deletions

View file

@ -17,6 +17,12 @@
#include "sm_service_manager.hpp"
#include "../sm_wait_list.hpp"
namespace ams::hos {
void InitializeVersionInternal(bool allow_approximate);
}
namespace ams::sm::impl {
namespace {
@ -862,8 +868,12 @@ namespace ams::sm::impl {
std::scoped_lock lk(g_mutex);
/* Note that we have ended the initial deferral period. */
const bool had_ended_defers = g_ended_initial_defers;
g_ended_initial_defers = true;
/* Something about deferral state has changed, so we should refresh our hos version. */
hos::InitializeVersionInternal(!had_ended_defers);
/* This might undefer some requests. */
for (const auto &service_name : InitiallyDeferredServices) {
TriggerResume(service_name);