hos/l4t: deduplicate sc7exit-b01 load

And remove obsolete MWS (L4T one deprecated it 3 years ago).
This commit is contained in:
CTCaer
2025-12-17 06:28:36 +02:00
committed by NaGa
parent 4c2f8f14dc
commit 4af99c9f78
3 changed files with 16 additions and 46 deletions

View File

@@ -305,7 +305,6 @@ static const l4t_fw_t l4t_fw[] = {
{ BL33_LOAD_BASE, "bl33.bin" },
{ SC7ENTRY_BASE, "sc7entry.bin" },
{ SC7EXIT_BASE, "sc7exit.bin" },
{ SC7EXIT_B01_BASE, "sc7exit_b01.bin" }, //!TODO: Update on fuse burns.
{ BPMPFW_BASE, "bpmpfw.bin" },
{ BPMPFW_B01_BASE, "bpmpfw_b01.bin" },
{ BPMPFW_B01_MTC_TABLE_BASE, "mtc_tbl_b01.bin" },
@@ -316,10 +315,9 @@ enum {
BL33_FW = 1,
SC7ENTRY_FW = 2,
SC7EXIT_FW = 3,
SC7EXIT_B01_FW = 4,
BPMPFW_FW = 5,
BPMPFW_B01_FW = 6,
BPMPFW_B01_MTC_TBL = 7
BPMPFW_FW = 4,
BPMPFW_B01_FW = 5,
BPMPFW_B01_MTC_TBL = 6
};
static void _l4t_crit_error(const char *text, bool needs_update)
@@ -336,9 +334,6 @@ static int _l4t_sd_load(u32 idx)
FIL fp;
void *load_address = (void *)l4t_fw[idx].addr;
if (idx == SC7EXIT_B01_FW)
load_address -= sizeof(u32);
strcpy(sd_path + sd_path_len, l4t_fw[idx].name);
if (f_open(&fp, sd_path, FA_READ) != FR_OK)
@@ -826,11 +821,9 @@ static int _l4t_sc7_exit_config(bool t210b01)
}
else
{
launch_ctxt_t hos_ctxt = {0};
u32 fw_fuses = *(u32 *)(SC7EXIT_B01_BASE - sizeof(u32)); // Fuses count in front of actual firmware.
// Get latest SC7-Exit if needed and setup PA id.
if (!pkg1_warmboot_config(&hos_ctxt, 0, fw_fuses, 0))
launch_ctxt_t hos_ctxt = {0};
if (!pkg1_warmboot_config(&hos_ctxt, 0, 0, 0))
{
gfx_con.mute = false;
gfx_wputs("\nFailed to match warmboot with fuses!\nIf you continue, sleep wont work!");
@@ -1001,6 +994,13 @@ void launch_l4t(const ini_sec_t *ini_sec, int entry_idx, int is_list, bool t210b
_l4t_crit_error("loading BPMP-FW", true);
return;
}
// Load SC7-Exit firmware.
if (!_l4t_sd_load(SC7EXIT_FW))
{
_l4t_crit_error("loading SC7-Exit", true);
return;
}
}
else
{
@@ -1019,13 +1019,6 @@ void launch_l4t(const ini_sec_t *ini_sec, int entry_idx, int is_list, bool t210b
}
}
// Load SC7-Exit firmware.
if (!_l4t_sd_load(!t210b01 ? SC7EXIT_FW : SC7EXIT_B01_FW))
{
_l4t_crit_error("loading SC7-Exit", true);
return;
}
// Set SC7-Exit firmware address to PMC for bootrom and do further setup.
if (!_l4t_sc7_exit_config(t210b01))
return;