mirror of
https://github.com/CTCaer/hekate.git
synced 2025-08-02 22:28:49 +00:00
implement settings for two new exosphere flags
This commit is contained in:
parent
a4c90aeff3
commit
81b6a3a6f1
4 changed files with 40 additions and 4 deletions
|
@ -68,6 +68,8 @@ typedef struct _launch_ctxt_t
|
||||||
bool atmosphere;
|
bool atmosphere;
|
||||||
bool exo_no_user_exceptions;
|
bool exo_no_user_exceptions;
|
||||||
bool exo_user_pmu;
|
bool exo_user_pmu;
|
||||||
|
bool exo_blank_prodinfo;
|
||||||
|
bool exo_allow_writing_to_cal_sysmmc;
|
||||||
bool fss0_enable_experimental;
|
bool fss0_enable_experimental;
|
||||||
bool emuMMC;
|
bool emuMMC;
|
||||||
|
|
||||||
|
|
|
@ -211,6 +211,26 @@ static int _config_exo_user_pmu_access(launch_ctxt_t *ctxt, const char *value)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int _config_exo_blank_prodinfo(launch_ctxt_t *ctxt, const char *value)
|
||||||
|
{
|
||||||
|
if (*value == '1')
|
||||||
|
{
|
||||||
|
DPRINTF("Enabled prodinfo blanking\n");
|
||||||
|
ctxt->exo_blank_prodinfo = true;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int _config_exo_allow_cal_write(launch_ctxt_t *ctxt, const char *value)
|
||||||
|
{
|
||||||
|
if (*value == '1')
|
||||||
|
{
|
||||||
|
DPRINTF("Enabled writing to cal on sysMMC\n");
|
||||||
|
ctxt->exo_allow_writing_to_cal_sysmmc = true;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static int _config_fss(launch_ctxt_t *ctxt, const char *value)
|
static int _config_fss(launch_ctxt_t *ctxt, const char *value)
|
||||||
{
|
{
|
||||||
LIST_FOREACH_ENTRY(ini_kv_t, kv, &ctxt->cfg->kvs, link)
|
LIST_FOREACH_ENTRY(ini_kv_t, kv, &ctxt->cfg->kvs, link)
|
||||||
|
@ -243,6 +263,8 @@ static const cfg_handler_t _config_handlers[] = {
|
||||||
{ "atmosphere", _config_atmosphere },
|
{ "atmosphere", _config_atmosphere },
|
||||||
{ "nouserexceptions", _config_dis_exo_user_exceptions },
|
{ "nouserexceptions", _config_dis_exo_user_exceptions },
|
||||||
{ "userpmu", _config_exo_user_pmu_access },
|
{ "userpmu", _config_exo_user_pmu_access },
|
||||||
|
{ "blankprodinfo", _config_exo_blank_prodinfo },
|
||||||
|
{ "allowcalwrite", _config_exo_allow_cal_write },
|
||||||
{ "fss0", _config_fss },
|
{ "fss0", _config_fss },
|
||||||
{ NULL, NULL },
|
{ NULL, NULL },
|
||||||
};
|
};
|
||||||
|
|
|
@ -133,10 +133,12 @@ typedef struct _atm_fatal_error_ctx
|
||||||
// Exosphère mailbox defines.
|
// Exosphère mailbox defines.
|
||||||
#define EXO_CFG_ADDR 0x8000F000
|
#define EXO_CFG_ADDR 0x8000F000
|
||||||
#define EXO_MAGIC_VAL 0x304F5845
|
#define EXO_MAGIC_VAL 0x304F5845
|
||||||
#define EXO_FLAG_DBG_PRIV (1 << 1)
|
#define EXO_FLAG_DBG_PRIV (1 << 1)
|
||||||
#define EXO_FLAG_DBG_USER (1 << 2)
|
#define EXO_FLAG_DBG_USER (1 << 2)
|
||||||
#define EXO_FLAG_NO_USER_EXC (1 << 3)
|
#define EXO_FLAG_NO_USER_EXC (1 << 3)
|
||||||
#define EXO_FLAG_USER_PMU (1 << 4)
|
#define EXO_FLAG_USER_PMU (1 << 4)
|
||||||
|
#define EXO_FLAG_BLANK_PRODINFO (1 << 5)
|
||||||
|
#define EXO_FLAG_ALLOW_WRITING_TO_CAL_SYSMMC (1 << 6)
|
||||||
|
|
||||||
void config_exosphere(launch_ctxt_t *ctxt)
|
void config_exosphere(launch_ctxt_t *ctxt)
|
||||||
{
|
{
|
||||||
|
@ -180,6 +182,14 @@ void config_exosphere(launch_ctxt_t *ctxt)
|
||||||
if (ctxt->exo_user_pmu)
|
if (ctxt->exo_user_pmu)
|
||||||
exoFlags |= EXO_FLAG_USER_PMU;
|
exoFlags |= EXO_FLAG_USER_PMU;
|
||||||
|
|
||||||
|
// Blank prodinfo.
|
||||||
|
if (ctxt->exo_blank_prodinfo)
|
||||||
|
exoFlags |= EXO_FLAG_BLANK_PRODINFO;
|
||||||
|
|
||||||
|
// Allow writing to cal on sysMMC.
|
||||||
|
if (ctxt->exo_allow_writing_to_cal_sysmmc)
|
||||||
|
exoFlags |= EXO_FLAG_ALLOW_WRITING_TO_CAL_SYSMMC;
|
||||||
|
|
||||||
// Set mailbox values.
|
// Set mailbox values.
|
||||||
exo_cfg->magic = EXO_MAGIC_VAL;
|
exo_cfg->magic = EXO_MAGIC_VAL;
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,8 @@ typedef struct _launch_ctxt_t
|
||||||
bool stock;
|
bool stock;
|
||||||
bool atmosphere;
|
bool atmosphere;
|
||||||
bool exo_no_user_exceptions;
|
bool exo_no_user_exceptions;
|
||||||
|
bool exo_blank_prodinfo;
|
||||||
|
bool exo_allow_writing_to_cal_sysmmc;
|
||||||
bool emuMMC;
|
bool emuMMC;
|
||||||
|
|
||||||
ini_sec_t *cfg;
|
ini_sec_t *cfg;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue