mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-22 18:06:40 +00:00
Merge pull request #162 from balika011/ipatches_fix
Fix ipatches backup on dumping
This commit is contained in:
commit
09bfed9146
2 changed files with 5 additions and 5 deletions
|
@ -688,15 +688,15 @@ void bootrom_ipatches_info()
|
||||||
if (!sd_save_to_file((u8 *)BOOTROM_BASE, BOOTROM_SIZE, path))
|
if (!sd_save_to_file((u8 *)BOOTROM_BASE, BOOTROM_SIZE, path))
|
||||||
gfx_puts(&gfx_con, "\nbootrom_patched.bin saved!\n");
|
gfx_puts(&gfx_con, "\nbootrom_patched.bin saved!\n");
|
||||||
|
|
||||||
u8 ipatch_backup[13];
|
u32 ipatch_backup[13];
|
||||||
memcpy(ipatch_backup, (void *) IPATCH_BASE, 13);
|
memcpy(ipatch_backup, (void *) IPATCH_BASE, sizeof(ipatch_backup));
|
||||||
memset((void*)IPATCH_BASE, 0, 13);
|
memset((void*)IPATCH_BASE, 0, sizeof(ipatch_backup));
|
||||||
|
|
||||||
emmcsn_path_impl(path, "/dumps", "bootrom_unpatched.bin", NULL);
|
emmcsn_path_impl(path, "/dumps", "bootrom_unpatched.bin", NULL);
|
||||||
if (!sd_save_to_file((u8 *)BOOTROM_BASE, BOOTROM_SIZE, path))
|
if (!sd_save_to_file((u8 *)BOOTROM_BASE, BOOTROM_SIZE, path))
|
||||||
gfx_puts(&gfx_con, "\nbootrom_unpatched.bin saved!\n");
|
gfx_puts(&gfx_con, "\nbootrom_unpatched.bin saved!\n");
|
||||||
|
|
||||||
memcpy((void*)IPATCH_BASE, ipatch_backup, 13);
|
memcpy((void*)IPATCH_BASE, ipatch_backup, sizeof(ipatch_backup));
|
||||||
|
|
||||||
sd_unmount();
|
sd_unmount();
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,7 +96,7 @@ static void _se_lock(bool lock_se)
|
||||||
SE(SE_SECURITY_0) &= 0xFFFFFFFB; // Make access lock regs secure only.
|
SE(SE_SECURITY_0) &= 0xFFFFFFFB; // Make access lock regs secure only.
|
||||||
}
|
}
|
||||||
|
|
||||||
memset((void *)IPATCH_BASE, 0, 13);
|
memset((void *)IPATCH_BASE, 0, 13 * sizeof(u32));
|
||||||
SB(SB_CSR) = 0x10; // Protected IROM enable.
|
SB(SB_CSR) = 0x10; // Protected IROM enable.
|
||||||
|
|
||||||
// This is useful for documenting the bits in the SE config registers, so we can keep it around.
|
// This is useful for documenting the bits in the SE config registers, so we can keep it around.
|
||||||
|
|
Loading…
Reference in a new issue