hekate/nyx: stylistic corrections

This commit is contained in:
CTCaer
2023-02-11 23:51:43 +02:00
parent 9a98c1afb9
commit 5193416658
11 changed files with 53 additions and 51 deletions

View File

@@ -1,7 +1,7 @@
/*
* Copyright (c) 2018 naehrwert
*
* Copyright (c) 2018-2022 CTCaer
* Copyright (c) 2018-2023 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,
@@ -144,7 +144,7 @@ static void _reloc_patcher(u32 payload_dst, u32 payload_src, u32 payload_size)
if (payload_size == 0x7000)
{
memcpy((u8 *)(payload_src + ALIGN(PATCHED_RELOC_SZ, 0x10)), coreboot_addr, 0x7000); //Bootblock
memcpy((u8 *)(payload_src + ALIGN(PATCHED_RELOC_SZ, 0x10)), coreboot_addr, 0x7000); // Bootblock.
*(vu32 *)CBFS_DRAM_EN_ADDR = CBFS_DRAM_MAGIC;
}
}
@@ -311,6 +311,7 @@ static void _launch_payloads()
// Build configuration menu.
ments[0].type = MENT_BACK;
ments[0].caption = "Back";
ments[1].type = MENT_CHGLINE;
while (true)
@@ -389,14 +390,15 @@ static void _launch_ini_list()
ment_t *ments = (ment_t *)malloc(sizeof(ment_t) * (max_entries + 3));
ments[0].type = MENT_BACK;
ments[0].caption = "Back";
ments[1].type = MENT_CHGLINE;
u32 sec_idx = 2;
LIST_FOREACH_ENTRY(ini_sec_t, ini_sec, &ini_list_sections, link)
{
if (!strcmp(ini_sec->name, "config") ||
ini_sec->type == INI_COMMENT ||
ini_sec->type == INI_NEWLINE)
if (ini_sec->type == INI_COMMENT ||
ini_sec->type == INI_NEWLINE ||
!strcmp(ini_sec->name, "config"))
continue;
ments[sec_idx].type = ini_sec->type;
@@ -517,6 +519,7 @@ static void _launch_config()
ment_t *ments = (ment_t *)malloc(sizeof(ment_t) * (max_entries + 6));
ments[0].type = MENT_BACK;
ments[0].caption = "Back";
ments[1].type = MENT_CHGLINE;
ments[2].type = MENT_HANDLER;
@@ -532,9 +535,9 @@ static void _launch_config()
u32 sec_idx = 5;
LIST_FOREACH_ENTRY(ini_sec_t, ini_sec, &ini_sections, link)
{
if (!strcmp(ini_sec->name, "config") ||
ini_sec->type == INI_COMMENT ||
ini_sec->type == INI_NEWLINE)
if (ini_sec->type == INI_COMMENT ||
ini_sec->type == INI_NEWLINE ||
!strcmp(ini_sec->name, "config"))
continue;
ments[sec_idx].type = ini_sec->type;
@@ -693,15 +696,14 @@ static void _nyx_load_run()
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);
void (*nyx_ptr)() = (void *)nyx;
bpmp_mmu_disable();
bpmp_clk_rate_set(BPMP_CLK_NORMAL);
minerva_periodic_training();
// Some cards (Sandisk U1), do not like a fast power cycle. Wait min 100ms.
// Some cards (Sandisk U1), do not like a fast power cycle.
sdmmc_storage_init_wait_sd();
void (*nyx_ptr)() = (void *)nyx;
(*nyx_ptr)();
}