From e341cf39f254d59f8fff5c000c678ecc959b0499 Mon Sep 17 00:00:00 2001 From: CTCaer Date: Wed, 13 Mar 2024 01:49:31 +0200 Subject: [PATCH] hekate/nyx: apply ccplex changes HOS procedure can now launch secmon from coldboot again when HOS is 6.2.0. And update L4T for the function signature change. --- bootloader/hos/hos.c | 8 ++------ bootloader/l4t/l4t.c | 2 +- nyx/nyx_gui/frontend/gui_tools.c | 3 +-- nyx/nyx_gui/hos/hos.c | 2 +- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/bootloader/hos/hos.c b/bootloader/hos/hos.c index 26b10ab..e5ca239 100644 --- a/bootloader/hos/hos.c +++ b/bootloader/hos/hos.c @@ -2,7 +2,7 @@ * Copyright (c) 2018 naehrwert * Copyright (c) 2018 st4rk * Copyright (c) 2018 Ced2911 - * Copyright (c) 2018-2023 CTCaer + * Copyright (c) 2018-2024 CTCaer * Copyright (c) 2018 balika011 * * This program is free software; you can redistribute it and/or modify it @@ -857,7 +857,6 @@ int hos_launch(ini_sec_t *cfg) tsec_ctxt.fw = (u8 *)ctxt.pkg1 + ctxt.pkg1_id->tsec_off; tsec_ctxt.pkg1 = ctxt.pkg1; tsec_ctxt.pkg11_off = ctxt.pkg1_id->pkg11_off; - tsec_ctxt.secmon_base = secmon_base; if (!hos_keygen(ctxt.keyblob, kb, &tsec_ctxt, ctxt.stock, is_exo)) goto error; @@ -1173,10 +1172,7 @@ int hos_launch(ini_sec_t *cfg) bpmp_clk_rate_set(BPMP_CLK_NORMAL); // Launch secmon. - if (smmu_is_used()) - smmu_exit(); - else - ccplex_boot_cpu0(secmon_base); + ccplex_boot_cpu0(secmon_base, true); // Halt ourselves in wait-event state. while (true) diff --git a/bootloader/l4t/l4t.c b/bootloader/l4t/l4t.c index 75a2f4a..a1c2318 100644 --- a/bootloader/l4t/l4t.c +++ b/bootloader/l4t/l4t.c @@ -1156,7 +1156,7 @@ void launch_l4t(const ini_sec_t *ini_sec, int entry_idx, int is_list, bool t210b if (t210b01) { // Launch BL31. - ccplex_boot_cpu0(TZDRAM_COLD_ENTRY); + ccplex_boot_cpu0(TZDRAM_COLD_ENTRY, true); // Enable Wrap burst for BPMP, GPU and PCIE. MSELECT(MSELECT_CONFIG) = (MSELECT(MSELECT_CONFIG) & (~(MSELECT_CFG_ERR_RESP_EN_GPU | MSELECT_CFG_ERR_RESP_EN_PCIE))) | diff --git a/nyx/nyx_gui/frontend/gui_tools.c b/nyx/nyx_gui/frontend/gui_tools.c index 5d7f2ae..b8a57e3 100644 --- a/nyx/nyx_gui/frontend/gui_tools.c +++ b/nyx/nyx_gui/frontend/gui_tools.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2018 naehrwert - * Copyright (c) 2018-2023 CTCaer + * Copyright (c) 2018-2024 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -1205,7 +1205,6 @@ static lv_res_t _create_window_dump_pk12_tool(lv_obj_t *btn) tsec_ctxt.fw = (void *)(pkg1 + pkg1_id->tsec_off); tsec_ctxt.pkg1 = (void *)pkg1; tsec_ctxt.pkg11_off = pkg1_id->pkg11_off; - tsec_ctxt.secmon_base = pkg1_id->secmon_base; // Read keyblob. u8 *keyblob = (u8 *)calloc(EMMC_BLOCKSIZE, 1); diff --git a/nyx/nyx_gui/hos/hos.c b/nyx/nyx_gui/hos/hos.c index 2e1f9ce..1828e66 100644 --- a/nyx/nyx_gui/hos/hos.c +++ b/nyx/nyx_gui/hos/hos.c @@ -2,7 +2,7 @@ * Copyright (c) 2018 naehrwert * Copyright (c) 2018 st4rk * Copyright (c) 2018 Ced2911 - * Copyright (c) 2018-2023 CTCaer + * Copyright (c) 2018-2024 CTCaer * Copyright (c) 2018 balika011 * * This program is free software; you can redistribute it and/or modify it