mirror of
https://github.com/CTCaer/hekate
synced 2024-12-22 11:21:23 +00:00
hos: allow overriding uCID
This commit is contained in:
parent
9187fa7a8c
commit
d3567736c8
3 changed files with 31 additions and 20 deletions
|
@ -1156,8 +1156,8 @@ int hos_launch(ini_sec_t *cfg)
|
|||
// Disable display. This must be executed before secmon to provide support for all fw versions.
|
||||
display_end();
|
||||
|
||||
// Clear EMC_SCRATCH0.
|
||||
EMC(EMC_SCRATCH0) = 0;
|
||||
// Override uCID if set.
|
||||
EMC(EMC_SCRATCH0) = ctxt.ucid;
|
||||
|
||||
// Hold USBD, USB2, AHBDMA and APBDMA in reset for SoC state validation on sleep.
|
||||
CLOCK(CLK_RST_CONTROLLER_RST_DEV_L_SET) = BIT(CLK_L_USBD);
|
||||
|
|
|
@ -109,6 +109,8 @@ typedef struct _launch_ctxt_t
|
|||
u32 fss0_hosver;
|
||||
bool atmosphere;
|
||||
|
||||
int ucid;
|
||||
|
||||
exo_ctxt_t exo_ctx;
|
||||
|
||||
ini_sec_t *cfg;
|
||||
|
|
|
@ -271,6 +271,14 @@ static int _config_exo_fatal_payload(launch_ctxt_t *ctxt, const char *value)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int _config_ucid(launch_ctxt_t *ctxt, const char *value)
|
||||
{
|
||||
// Override uCID if set.
|
||||
ctxt->ucid = atoi(value);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
typedef struct _cfg_handler_t
|
||||
{
|
||||
const char *key;
|
||||
|
@ -295,6 +303,7 @@ static const cfg_handler_t _config_handlers[] = {
|
|||
{ "usb3force", _config_exo_usb3_force },
|
||||
{ "cal0blank", _config_exo_cal0_blanking },
|
||||
{ "cal0writesys", _config_exo_cal0_writes_enable },
|
||||
{ "ucid", _config_ucid },
|
||||
{ NULL, NULL },
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue