Refactor nxboot package2 reading, work around sdmmc issue, other changes

This commit is contained in:
TuxSH
2018-05-17 23:18:33 +02:00
parent 9ed2f92cdc
commit ec6d05892c
5 changed files with 52 additions and 47 deletions

View File

@@ -43,7 +43,7 @@ bool check_mkey_revision(unsigned int revision) {
return true;
}
void mkey_detect_revision(void) {
int mkey_detect_revision(void) {
if (g_determined_mkey_revision) {
generic_panic();
}
@@ -58,8 +58,9 @@ void mkey_detect_revision(void) {
/* We must have determined the master key, or we're not running on a Switch. */
if (!g_determined_mkey_revision) {
/* Panic in bright red. */
panic(0x00F00060);
return -1;
} else {
return 0;
}
}
@@ -87,4 +88,4 @@ unsigned int mkey_get_keyslot(unsigned int revision) {
set_aes_keyslot(KEYSLOT_SWITCH_TEMPKEY, g_old_masterkeys[revision], 0x10);
return KEYSLOT_SWITCH_TEMPKEY;
}
}
}