diff --git a/bootloader/hos/hos.h b/bootloader/hos/hos.h index d2c8712..f759725 100644 --- a/bootloader/hos/hos.h +++ b/bootloader/hos/hos.h @@ -100,7 +100,7 @@ typedef struct _launch_ctxt_t bool fss0_enable_experimental; bool emummc_forced; - exo_ctxt_t exo_cfg; + exo_ctxt_t exo_ctx; ini_sec_t *cfg; } launch_ctxt_t; diff --git a/bootloader/hos/hos_config.c b/bootloader/hos/hos_config.c index 190ef5f..be6ddcf 100644 --- a/bootloader/hos/hos_config.c +++ b/bootloader/hos/hos_config.c @@ -68,7 +68,7 @@ static int _config_kip1(launch_ctxt_t *ctxt, const char *value) u32 dirlen = 0; dir[strlen(dir) - 2] = 0; - char *filelist = dirlist(dir, "*.kip*", false); + char *filelist = dirlist(dir, "*.kip*", false, false); strcat(dir, "/"); dirlen = strlen(dir); @@ -205,7 +205,7 @@ static int _config_dis_exo_user_exceptions(launch_ctxt_t *ctxt, const char *valu if (*value == '1') { DPRINTF("Disabled exosphere user exception handlers\n"); - ctxt->exo_cfg.no_user_exceptions = true; + ctxt->exo_ctx.no_user_exceptions = true; } return 1; } @@ -215,7 +215,7 @@ static int _config_exo_user_pmu_access(launch_ctxt_t *ctxt, const char *value) if (*value == '1') { DPRINTF("Enabled user access to PMU\n"); - ctxt->exo_cfg.user_pmu = true; + ctxt->exo_ctx.user_pmu = true; } return 1; } @@ -223,12 +223,12 @@ static int _config_exo_user_pmu_access(launch_ctxt_t *ctxt, const char *value) static int _config_exo_cal0_blanking(launch_ctxt_t *ctxt, const char *value) { // Override key found. - ctxt->exo_cfg.cal0_blank = calloc(sizeof(bool), 1); + ctxt->exo_ctx.cal0_blank = calloc(sizeof(bool), 1); if (*value == '1') { DPRINTF("Enabled prodinfo blanking\n"); - *ctxt->exo_cfg.cal0_blank = true; + *ctxt->exo_ctx.cal0_blank = true; } return 1; } @@ -236,12 +236,12 @@ static int _config_exo_cal0_blanking(launch_ctxt_t *ctxt, const char *value) static int _config_exo_cal0_writes_enable(launch_ctxt_t *ctxt, const char *value) { // Override key found. - ctxt->exo_cfg.cal0_allow_writes_sys = calloc(sizeof(bool), 1); + ctxt->exo_ctx.cal0_allow_writes_sys = calloc(sizeof(bool), 1); if (*value == '1') { DPRINTF("Enabled prodinfo writes\n"); - *ctxt->exo_cfg.cal0_allow_writes_sys = true; + *ctxt->exo_ctx.cal0_allow_writes_sys = true; } return 1; diff --git a/bootloader/hos/secmon_exo.c b/bootloader/hos/secmon_exo.c index ab84264..e66d0dc 100644 --- a/bootloader/hos/secmon_exo.c +++ b/bootloader/hos/secmon_exo.c @@ -214,21 +214,21 @@ void config_exosphere(launch_ctxt_t *ctxt) exoFlags |= EXO_FLAG_DBG_USER; // Disable proper failure handling. - if (ctxt->exo_cfg.no_user_exceptions) + if (ctxt->exo_ctx.no_user_exceptions) exoFlags |= EXO_FLAG_NO_USER_EXC; // Enable user access to PMU. - if (ctxt->exo_cfg.user_pmu) + if (ctxt->exo_ctx.user_pmu) exoFlags |= EXO_FLAG_USER_PMU; // Enable prodinfo blanking. Check if exo ini value is overridden. If not, check if enabled in exo ini. - if ((ctxt->exo_cfg.cal0_blank && *ctxt->exo_cfg.cal0_blank) - || (!ctxt->exo_cfg.cal0_blank && cal0_blanking)) + if ((ctxt->exo_ctx.cal0_blank && *ctxt->exo_ctx.cal0_blank) + || (!ctxt->exo_ctx.cal0_blank && cal0_blanking)) exoFlags |= EXO_FLAG_CAL0_BLANKING; // Allow prodinfo writes. Check if exo ini value is overridden. If not, check if enabled in exo ini. - if ((ctxt->exo_cfg.cal0_allow_writes_sys && *ctxt->exo_cfg.cal0_allow_writes_sys) - || (!ctxt->exo_cfg.cal0_allow_writes_sys && cal0_allow_writes_sys)) + if ((ctxt->exo_ctx.cal0_allow_writes_sys && *ctxt->exo_ctx.cal0_allow_writes_sys) + || (!ctxt->exo_ctx.cal0_allow_writes_sys && cal0_allow_writes_sys)) exoFlags |= EXO_FLAG_CAL0_WRITES_SYS; // Set mailbox values. diff --git a/nyx/nyx_gui/hos/hos.h b/nyx/nyx_gui/hos/hos.h index cc8f5be..3a4dce9 100644 --- a/nyx/nyx_gui/hos/hos.h +++ b/nyx/nyx_gui/hos/hos.h @@ -42,14 +42,6 @@ #define HOS_PKG11_MAGIC 0x31314B50 #define HOS_EKS_MAGIC 0x30534B45 -typedef struct _exo_ctxt_t -{ - bool no_user_exceptions; - bool user_pmu; - bool *cal0_blank; - bool *cal0_allow_writes_sys; -} exo_ctxt_t; - typedef struct _hos_eks_keys_t { u8 dkg[0x10];