exo/mariko fatal: save fatal error binaries to the SD

This commit is contained in:
Michael Scire authored and SciresM committed 2020-11-18 15:08:44 -08:00
1 parent 5f6942aec8
commit b32c9bf17c
20 files changed
+24419 -12

No files matched your search

@@ -94,6 +94,19 @@ namespace ams::secmon {
/* TODO: On cores other than 3, halt/wfi. */
/* Copy the fatal error context to mariko tzram. */
{
/* Map the iram page. */
constexpr uintptr_t FatalErrorPhysicalAddress = MemoryRegionPhysicalIramFatalErrorContext.GetAddress();
AtmosphereIramPageMapper mapper(FatalErrorPhysicalAddress);
if (mapper.Map()) {
/* Copy the fatal error context. */
void *dst = MemoryRegionVirtualTzramMarikoProgramFatalErrorContext.GetPointer<void>();
const void *src = mapper.GetPointerTo(FatalErrorPhysicalAddress, sizeof(ams::impl::FatalErrorContext));
std::memcpy(dst, src, sizeof(ams::impl::FatalErrorContext));
}
}
/* Map Dram for the mariko program. */
MapDramForMarikoProgram();