Various fixes

This commit is contained in:
CTCaer 2020-06-15 14:58:50 +03:00
parent 1369d66043
commit 2aa9055fae
3 changed files with 17 additions and 17 deletions

View file

@ -208,10 +208,10 @@ void _config_se_brom()
se_aes_key_set(14, sbk, 0x10);
// Lock SBK from being read.
SE(SE_KEY_TABLE_ACCESS_REG_OFFSET + 14 * 4) = 0x7E;
se_key_acc_ctrl(14, SE_KEY_TBL_DIS_KEYREAD_FLAG);
// Lock SSK (although it's not set and unused anyways).
SE(SE_KEY_TABLE_ACCESS_REG_OFFSET + 15 * 4) = 0x7E;
se_key_acc_ctrl(15, SE_KEY_TBL_DIS_KEYREAD_FLAG);
}
// This memset needs to happen here, else TZRAM will behave weirdly later on.

View file

@ -1071,7 +1071,7 @@ out:
// Clear boot reasons from binary.
if (b_cfg.boot_cfg & (BOOT_CFG_FROM_ID | BOOT_CFG_TO_EMUMMC))
memset(b_cfg.xt_str, 0, sizeof(b_cfg.xt_str));
b_cfg.boot_cfg &= ~(BOOT_CFG_AUTOBOOT_EN | BOOT_CFG_FROM_LAUNCH | BOOT_CFG_FROM_ID | BOOT_CFG_TO_EMUMMC);
b_cfg.boot_cfg &= BOOT_CFG_SEPT_RUN;
h_cfg.emummc_force_disable = false;
nyx_load_run();

View file

@ -389,32 +389,32 @@ static lv_res_t _create_window_fuses_info_status(lv_obj_t *btn)
switch ((ram_density.dev0_ch0 & 0x3C) >> 2)
{
case 2:
s_printf(txt_buf + strlen(txt_buf), "4 x 512MB");
s_printf(txt_buf + strlen(txt_buf), "4x512MB");
break;
case 3:
s_printf(txt_buf + strlen(txt_buf), "4 x 768MB");
s_printf(txt_buf + strlen(txt_buf), "4x768MB");
break;
case 4:
s_printf(txt_buf + strlen(txt_buf), "4 x 1GB");
s_printf(txt_buf + strlen(txt_buf), "4x1GB");
break;
default:
s_printf(txt_buf + strlen(txt_buf), "4 x Unk");
s_printf(txt_buf + strlen(txt_buf), "4xUnk");
break;
}
s_printf(txt_buf + strlen(txt_buf), " (%d) #FF8000 |# ", (ram_density.dev0_ch0 & 0x3C) >> 2);
switch ((ram_density.dev1_ch0 & 0x3C) >> 2)
{
case 2:
s_printf(txt_buf + strlen(txt_buf), "4 x 512MB");
s_printf(txt_buf + strlen(txt_buf), "4x512MB");
break;
case 3:
s_printf(txt_buf + strlen(txt_buf), "4 x 768MB");
s_printf(txt_buf + strlen(txt_buf), "4x768MB");
break;
case 4:
s_printf(txt_buf + strlen(txt_buf), "4 x 1GB");
s_printf(txt_buf + strlen(txt_buf), "4x1GB");
break;
default:
s_printf(txt_buf + strlen(txt_buf), "2 x Unk");
s_printf(txt_buf + strlen(txt_buf), "2xUnk");
break;
}
s_printf(txt_buf + strlen(txt_buf), " (%d)\n\n", (ram_density.dev1_ch0 & 0x3C) >> 2);
@ -586,14 +586,14 @@ static lv_res_t _create_window_tsec_keys_status(lv_obj_t *btn)
// Read package1.
char *build_date = malloc(32);
u8 *pkg1 = (u8 *)malloc(0x40000);
sdmmc_storage_init_mmc(&storage, &sdmmc, SDMMC_BUS_WIDTH_8, SDHCI_TIMING_MMC_HS400);
sdmmc_storage_set_mmc_partition(&storage, EMMC_BOOT0);
sdmmc_storage_read(&storage, 0x100000 / NX_EMMC_BLOCKSIZE, 0x40000 / NX_EMMC_BLOCKSIZE, pkg1);
sdmmc_storage_end(&storage);
sdmmc_storage_init_mmc(&emmc_storage, &emmc_sdmmc, SDMMC_BUS_WIDTH_8, SDHCI_TIMING_MMC_HS400);
sdmmc_storage_set_mmc_partition(&emmc_storage, EMMC_BOOT0);
sdmmc_storage_read(&emmc_storage, 0x100000 / NX_EMMC_BLOCKSIZE, 0x40000 / NX_EMMC_BLOCKSIZE, pkg1);
sdmmc_storage_end(&emmc_storage);
const pkg1_id_t *pkg1_id = pkg1_identify(pkg1, build_date);
char *txt_buf = (char *)malloc(0x500);
char *txt_buf2 = (char *)malloc(0x500);
char *txt_buf = (char *)malloc(0x1000);
char *txt_buf2 = (char *)malloc(0x1000);
s_printf(txt_buf, "#00DDFF Found pkg1 ('%s')#\n", build_date);
free(build_date);