From 1369d66043567262b3ac19d493c3113b9a5448d7 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Mon, 15 Jun 2020 10:57:15 +0300 Subject: [PATCH] exo: Use exo new instead of fss ver for new versioning --- bootloader/hos/fss.c | 1 - bootloader/hos/hos.c | 2 +- bootloader/hos/hos.h | 1 - bootloader/hos/secmon_exo.c | 4 ++-- bootloader/hos/secmon_exo.h | 2 +- 5 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bootloader/hos/fss.c b/bootloader/hos/fss.c index a024f87..028027b 100644 --- a/bootloader/hos/fss.c +++ b/bootloader/hos/fss.c @@ -148,7 +148,6 @@ int parse_fss(launch_ctxt_t *ctxt, const char *path, fss0_sept_t *sept_ctxt) if (!sept_ctxt) { ctxt->atmosphere = true; - ctxt->fss0_ver = fss_meta->version; ctxt->fss0_hosver = fss_meta->hos_ver; } diff --git a/bootloader/hos/hos.c b/bootloader/hos/hos.c index 503decf..82799f2 100644 --- a/bootloader/hos/hos.c +++ b/bootloader/hos/hos.c @@ -989,7 +989,7 @@ int hos_launch(ini_sec_t *cfg) // Config Exosphère if booting full Atmosphère. if (ctxt.atmosphere && ctxt.secmon) - config_exosphere(&ctxt, warmboot_base); + config_exosphere(&ctxt, warmboot_base, exo_new); // Unmount SD card and eMMC. sd_end(); diff --git a/bootloader/hos/hos.h b/bootloader/hos/hos.h index d620cb0..4ad8747 100644 --- a/bootloader/hos/hos.h +++ b/bootloader/hos/hos.h @@ -100,7 +100,6 @@ typedef struct _launch_ctxt_t link_t kip1_list; char* kip1_patches; - u32 fss0_ver; u32 fss0_hosver; bool svcperm; bool debugmode; diff --git a/bootloader/hos/secmon_exo.c b/bootloader/hos/secmon_exo.c index d69f9e2..8fb0e97 100644 --- a/bootloader/hos/secmon_exo.c +++ b/bootloader/hos/secmon_exo.c @@ -141,7 +141,7 @@ typedef struct _atm_fatal_error_ctx #define EXO_FW_VER(mj, mn, rv) (((mj) << 24) | ((mn) << 16) | ((rv) << 8)) -void config_exosphere(launch_ctxt_t *ctxt, u32 warmboot_base) +void config_exosphere(launch_ctxt_t *ctxt, u32 warmboot_base, bool exo_new) { u32 exoFwNo = 0; u32 exoFlags = 0; @@ -176,7 +176,7 @@ void config_exosphere(launch_ctxt_t *ctxt, u32 warmboot_base) } // New exosphere target versioning. - if (!ctxt->fss0_ver || ((ctxt->fss0_ver >> 8) > 0xC00)) // 0.12.0. + if (exo_new) { // Feed old versioning. switch (exoFwNo) diff --git a/bootloader/hos/secmon_exo.h b/bootloader/hos/secmon_exo.h index f814f1a..ea20125 100644 --- a/bootloader/hos/secmon_exo.h +++ b/bootloader/hos/secmon_exo.h @@ -19,7 +19,7 @@ #include -void config_exosphere(launch_ctxt_t *ctxt, u32 warmboot_base); +void config_exosphere(launch_ctxt_t *ctxt, u32 warmboot_base, bool exo_new); void secmon_exo_check_panic(); #endif