add kip detection

This commit is contained in:
Lightos1
2026-06-27 19:47:00 +02:00
parent cd9d494de9
commit f3886c60b0
8 changed files with 71 additions and 7 deletions

View File

@@ -170,6 +170,12 @@ namespace ams::ldr::hoc::pcv {
}
}
void WriteKipLoadToIram() {
const u32 hocMagic = 0x686F634D;
constexpr uintptr_t LoadMagicAddress = 0x4003DC00 ; /* Should be a pretty safe address. */
R_DISCARD(SmcCopyToIram(LoadMagicAddress, &hocMagic, sizeof(hocMagic)));
}
void Patch(uintptr_t mapped_nso, size_t nso_size) {
SafetyCheck();
@@ -179,6 +185,8 @@ namespace ams::ldr::hoc::pcv {
} else {
erista::Patch(mapped_nso, nso_size);
}
WriteKipLoadToIram();
}
}