diff --git a/nyx/nyx_gui/frontend/gui_tools.c b/nyx/nyx_gui/frontend/gui_tools.c index 2de8770..5cf2886 100644 --- a/nyx/nyx_gui/frontend/gui_tools.c +++ b/nyx/nyx_gui/frontend/gui_tools.c @@ -1143,15 +1143,27 @@ static lv_res_t _create_window_dump_pk12_tool(lv_obj_t *btn) tsec_ctxt.pkg11_off = pkg1_id->pkg11_off; tsec_ctxt.secmon_base = pkg1_id->secmon_base; + hos_eks_get(); + if (kb >= KB_FIRMWARE_VERSION_700 && !h_cfg.sept_run) { - b_cfg->autoboot = 0; - b_cfg->autoboot_list = 0; + u32 key_idx = 0; + if (kb >= KB_FIRMWARE_VERSION_810) + key_idx = 1; - if (!reboot_to_sept((u8 *)tsec_ctxt.fw, kb)) + if (h_cfg.eks && h_cfg.eks->enabled[key_idx] >= kb) + h_cfg.sept_run = true; + else { - lv_label_set_text(lb_desc, "#FFDD00 Failed to run sept#\n"); - goto out_free; + b_cfg->autoboot = 0; + b_cfg->autoboot_list = 0; + b_cfg->extra_cfg = EXTRA_CFG_NYX_DUMP; + + if (!reboot_to_sept((u8 *)tsec_ctxt.fw, kb)) + { + lv_label_set_text(lb_desc, "#FFDD00 Failed to run sept#\n"); + goto out_free; + } } } diff --git a/nyx/nyx_gui/hos/sept.c b/nyx/nyx_gui/hos/sept.c index fad4ec0..e3b25d8 100644 --- a/nyx/nyx_gui/hos/sept.c +++ b/nyx/nyx_gui/hos/sept.c @@ -171,7 +171,6 @@ int reboot_to_sept(const u8 *tsec_fw, u32 kb) f_close(&fp); b_cfg->boot_cfg |= (BOOT_CFG_AUTOBOOT_EN | BOOT_CFG_SEPT_RUN); - b_cfg->extra_cfg = EXTRA_CFG_NYX_DUMP; bool update_sept_payload = true; if (!f_open(&fp, "sept/payload.bin", FA_READ | FA_WRITE))