mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-15 23:54:24 -04:00
exo/mariko fatal: save fatal error binaries to the SD
This commit is contained in:
parent
5f6942aec8
commit
b32c9bf17c
20 changed files with 24419 additions and 12 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue