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

@ -165,6 +165,12 @@ namespace ams {
}
namespace hos {
void InitializeVersionInternal(bool allow_approximate);
}
namespace init {
void InitializeSystemModule() {
@ -182,6 +188,12 @@ namespace ams {
/* Use our manager extension to tell SM that the FS bug has been worked around. */
R_ABORT_UNLESS(sm::manager::EndInitialDefers());
/* Wait for the true hos version to be available. */
hos::InitializeVersionInternal(false);
/* Now that the true hos version is available, we should once more end defers (alerting sm to the available hos version). */
R_ABORT_UNLESS(sm::manager::EndInitialDefers());
/* Initialize remaining services we need. */
R_ABORT_UNLESS(ldrPmInitialize());
spl::Initialize();