From 364465399eb0ee6b01ebd33edcd44e604030acfb Mon Sep 17 00:00:00 2001 From: CTCaer Date: Thu, 27 Nov 2025 11:28:26 +0200 Subject: [PATCH] hekate/nyx: use minerva storage and panel id --- bootloader/main.c | 5 ++++- nyx/nyx_gui/frontend/gui_info.c | 6 +++--- nyx/nyx_gui/nyx.c | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/bootloader/main.c b/bootloader/main.c index 5891e851..a69afb89 100644 --- a/bootloader/main.c +++ b/bootloader/main.c @@ -665,6 +665,9 @@ static void _nyx_load_run() for (u32 i = 0; i < 3; i++) nyx_str->info.sd_errors[i] = sd_errors[i]; + // Set Display ID info. + nyx_str->info.panel_id = display_get_verbose_panel_id(); + reloc_meta_t *reloc = (reloc_meta_t *)(IPL_LOAD_ADDR + RELOC_META_OFF); memcpy((u8 *)nyx_str->hekate, (u8 *)reloc->start, reloc->end - reloc->start); @@ -1506,7 +1509,7 @@ void ipl_main() h_cfg.errors |= ERR_LIBSYS_LP0; // Train DRAM and switch to max frequency. - if (minerva_init()) //!TODO: Add Tegra210B01 support to minerva. + if (minerva_init((minerva_str_t *)&nyx_str->minerva)) //!TODO: Add Tegra210B01 support to minerva. h_cfg.errors |= ERR_LIBSYS_MTC; // Disable watchdog protection. diff --git a/nyx/nyx_gui/frontend/gui_info.c b/nyx/nyx_gui/frontend/gui_info.c index 8a59ec12..da112085 100644 --- a/nyx/nyx_gui/frontend/gui_info.c +++ b/nyx/nyx_gui/frontend/gui_info.c @@ -870,8 +870,8 @@ static lv_res_t _create_window_hw_info_status(lv_obj_t *btn) strcat(txt_buf, "\n\n"); // Prepare display info. - u8 display_rev = (nyx_str->info.disp_id >> 8) & 0xFF; - u32 display_id = ((nyx_str->info.disp_id >> 8) & 0xFF00) | (nyx_str->info.disp_id & 0xFF); + u8 display_rev = (nyx_str->info.panel_id >> 8) & 0xFF; + u32 display_id = ((nyx_str->info.panel_id >> 8) & 0xFF00) | (nyx_str->info.panel_id & 0xFF); strcat(txt_buf, "#00DDFF Display Panel:#\n#FF8000 Model:# "); @@ -983,7 +983,7 @@ static lv_res_t _create_window_hw_info_status(lv_obj_t *btn) } s_printf(txt_buf + strlen(txt_buf), "\n#FF8000 ID:# #96FF00 %02X# %02X #96FF00 %02X#", - nyx_str->info.disp_id & 0xFF, (nyx_str->info.disp_id >> 8) & 0xFF, (nyx_str->info.disp_id >> 16) & 0xFF); + nyx_str->info.panel_id & 0xFF, (nyx_str->info.panel_id >> 8) & 0xFF, (nyx_str->info.panel_id >> 16) & 0xFF); touch_fw_info_t touch_fw; touch_panel_info_t *touch_panel; diff --git a/nyx/nyx_gui/nyx.c b/nyx/nyx_gui/nyx.c index f513cdd0..b1434358 100644 --- a/nyx/nyx_gui/nyx.c +++ b/nyx/nyx_gui/nyx.c @@ -445,7 +445,7 @@ void nyx_init_load_res() nyx_str->info.magic = 0; // Set display id from previous initialization. - display_set_decoded_panel_id(nyx_str->info.disp_id); + display_set_decoded_panel_id(nyx_str->info.panel_id); // Initialize gfx console. gfx_init_ctxt((u32 *)LOG_FB_ADDRESS, 1280, 656, 656); @@ -466,7 +466,7 @@ void nyx_init_load_res() } // Train DRAM and switch to max frequency. - minerva_init(); + minerva_init((minerva_str_t *)&nyx_str->minerva); // Load hekate/Nyx configuration. _load_saved_configuration();