nyx: Boost eMMC backup/restore verification times

This change allows SE to start verifying the first buffer while the 2nd is populated. Effectively cutting verification down to almost half.
This commit is contained in:
CTCaer 2019-12-08 01:20:05 +02:00
parent 6734513d47
commit e1748a0727

View file

@ -228,6 +228,9 @@ static int _dump_emmc_verify(emmc_tool_gui_t *gui, sdmmc_storage_t *storage, u32
return 1;
}
se_calc_sha256(hashEm, NULL, bufEm, num << 9, 0, SHA_INIT_HASH, false);
f_lseek(&fp, (u64)sdFileSector << (u64)9);
if (f_read_fast(&fp, bufSd, num << 9))
{
@ -246,7 +249,7 @@ static int _dump_emmc_verify(emmc_tool_gui_t *gui, sdmmc_storage_t *storage, u32
return 1;
}
se_calc_sha256(hashEm, NULL, bufEm, num << 9, 0, SHA_INIT_HASH, true);
se_calc_sha256_finalize(hashEm, NULL);
se_calc_sha256(hashSd, NULL, bufSd, num << 9, 0, SHA_INIT_HASH, true);
res = memcmp(hashEm, hashSd, 0x10);