Use cal0 struct, improve style consistency
This commit is contained in:
parent
4ffd4ce7f0
commit
bd09f5418d
4 changed files with 43 additions and 40 deletions
|
@ -54,7 +54,8 @@ static void _gf256_mul_x_le(void *block)
|
|||
u32 *pdata = (u32 *)block;
|
||||
u32 carry = 0;
|
||||
|
||||
for (u32 i = 0; i < 4; i++) {
|
||||
for (u32 i = 0; i < 4; i++)
|
||||
{
|
||||
u32 b = pdata[i];
|
||||
pdata[i] = (b << 1) | carry;
|
||||
carry = b >> 31;
|
||||
|
@ -215,7 +216,8 @@ int nx_emmc_bis_read(u32 sector, u32 count, void *buff)
|
|||
return res;
|
||||
}
|
||||
|
||||
void nx_emmc_bis_cluster_cache_init() {
|
||||
void nx_emmc_bis_cluster_cache_init()
|
||||
{
|
||||
// Clear cluster lookup table and reset end index.
|
||||
memset(cluster_lookup, -1, (system_part->lba_end - system_part->lba_start + 1) / SECTORS_PER_CLUSTER * sizeof(*cluster_lookup));
|
||||
cluster_cache_end_index = 0;
|
||||
|
|
|
@ -164,7 +164,8 @@ typedef struct _nx_emmc_cal0_t
|
|||
u8 ext_ecc_b233_eticket_key[0x50];
|
||||
u8 crc16_pad37[0x10];
|
||||
u8 ext_ecc_rsa2048_eticket_key[0x240];
|
||||
u8 crc16_pad38[0x10];
|
||||
u32 ext_ecc_rsa2048_eticket_key_ver;
|
||||
u8 crc16_pad38[0xC];
|
||||
u8 ext_ssl_key[0x130];
|
||||
u8 crc16_pad39[0x10];
|
||||
u8 ext_gc_key[0x130];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue