hekate/nyx: stylistic corrections
This commit is contained in:
@@ -89,7 +89,7 @@ static void _set_fss_path_and_update_r2p(launch_ctxt_t *ctxt, const char *path)
|
||||
|
||||
strcpy(r2p_path, path);
|
||||
|
||||
while(path_len)
|
||||
while (path_len)
|
||||
{
|
||||
if ((r2p_path[path_len - 1] == '/') || (r2p_path[path_len - 1] == '\\'))
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (c) 2018 naehrwert
|
||||
* Copyright (c) 2018 st4rk
|
||||
* Copyright (c) 2018 Ced2911
|
||||
* Copyright (c) 2018-2022 CTCaer
|
||||
* Copyright (c) 2018-2023 CTCaer
|
||||
* Copyright (c) 2018 balika011
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
@@ -176,10 +176,10 @@ static void _se_lock(bool lock_se)
|
||||
gfx_printf("SE(0x4) = %08X\n", SE(0x4));
|
||||
gfx_printf("SE(SE_CRYPTO_SECURITY_PERKEY_REG) = %08X\n", SE(SE_CRYPTO_SECURITY_PERKEY_REG));
|
||||
gfx_printf("SE(SE_RSA_SECURITY_PERKEY_REG) = %08X\n", SE(SE_RSA_SECURITY_PERKEY_REG));
|
||||
for(u32 i = 0; i < 16; i++)
|
||||
for (u32 i = 0; i < 16; i++)
|
||||
gfx_printf("%02X ", SE(SE_CRYPTO_KEYTABLE_ACCESS_REG + i * 4) & 0xFF);
|
||||
gfx_putc('\n');
|
||||
for(u32 i = 0; i < 2; i++)
|
||||
for (u32 i = 0; i < 2; i++)
|
||||
gfx_printf("%02X ", SE(SE_RSA_KEYTABLE_ACCESS_REG + i * 4) & 0xFF);
|
||||
gfx_putc('\n');
|
||||
gfx_hexdump(SE_BASE, (void *)SE_BASE, 0x400);*/
|
||||
|
||||
@@ -117,7 +117,7 @@ static void parse_external_kip_patches()
|
||||
kip1_patchset_t *patchsets = (kip1_patchset_t *)calloc(sizeof(kip1_patchset_t), 16); // Max 16 patchsets per kip.
|
||||
|
||||
u32 curr_patchset_idx;
|
||||
for(curr_patchset_idx = 0; curr_kip->patchset[curr_patchset_idx].name != NULL; curr_patchset_idx++)
|
||||
for (curr_patchset_idx = 0; curr_kip->patchset[curr_patchset_idx].name != NULL; curr_patchset_idx++)
|
||||
{
|
||||
patchsets[curr_patchset_idx].name = curr_kip->patchset[curr_patchset_idx].name;
|
||||
patchsets[curr_patchset_idx].patches = curr_kip->patchset[curr_patchset_idx].patches;
|
||||
@@ -254,7 +254,7 @@ DPRINTF(" kip1 %d:%s @ %08X (%08X)\n", i, kip1->name, (u32)kip1, ki->size);
|
||||
int pkg2_has_kip(link_t *info, u64 tid)
|
||||
{
|
||||
LIST_FOREACH_ENTRY(pkg2_kip1_info_t, ki, info, link)
|
||||
if(ki->kip1->tid == tid)
|
||||
if (ki->kip1->tid == tid)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
@@ -388,7 +388,7 @@ static int _kipm_inject(const char *kipm_path, char *target_name, pkg2_kip1_info
|
||||
|
||||
for (u32 currSectIdx = 0; currSectIdx < KIP1_NUM_SECTIONS - 2; currSectIdx++)
|
||||
{
|
||||
if(!currSectIdx) // .text.
|
||||
if (!currSectIdx) // .text.
|
||||
{
|
||||
memcpy(ki->kip1->data + inject_size, fs_kip->data, fs_kip->sections[0].size_comp);
|
||||
ki->kip1->sections[0].size_decomp += inject_size;
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#define PKG2_SEC_INI1 1
|
||||
|
||||
#define INI1_MAGIC 0x31494E49
|
||||
|
||||
//! TODO: Update on kernel change if needed.
|
||||
#define PKG2_NEWKERN_GET_INI1_HEURISTIC 0xD2800015 // Offset of OP + 12 is the INI1 offset.
|
||||
#define PKG2_NEWKERN_START 0x800
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* L4T Loader for Tegra X1
|
||||
*
|
||||
* Copyright (c) 2020-2022 CTCaer
|
||||
* Copyright (c) 2020-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,
|
||||
|
||||
@@ -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)();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user