exo: implement start of mariko fatal handler

This commit is contained in:
Michael Scire authored and SciresM committed 2020-11-18 15:08:44 -08:00
1 parent 123ed80dc7
commit 7bcd5c6e3b
28 files changed
+1138 -24

No files matched your search

@@ -28,9 +28,20 @@ namespace ams::dd {
uintptr_t QueryIoMapping(dd::PhysicalAddress phys_addr, size_t size) {
#if defined(ATMOSPHERE_IS_EXOSPHERE)
#if defined(ATMOSPHERE_ARCH_ARM64)
/* TODO: Secure Monitor translation? */
AMS_UNUSED(size);
return static_cast<uintptr_t>(phys_addr);
/* TODO: Do this in a less shitty way. */
if (secmon::MemoryRegionPhysicalDeviceClkRst.Contains(phys_addr, size)) {
return secmon::MemoryRegionVirtualDeviceClkRst.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDeviceClkRst.GetAddress();
} else if (secmon::MemoryRegionPhysicalDeviceGpio.Contains(phys_addr, size)) {
return secmon::MemoryRegionVirtualDeviceGpio.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDeviceGpio.GetAddress();
} else if (secmon::MemoryRegionPhysicalDeviceApbMisc.Contains(phys_addr, size)) {
return secmon::MemoryRegionVirtualDeviceApbMisc.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDeviceApbMisc.GetAddress();
} else if (secmon::MemoryRegionPhysicalDeviceSdmmc.Contains(phys_addr, size)) {
return secmon::MemoryRegionVirtualDeviceSdmmc.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDeviceSdmmc.GetAddress();
} else {
AMS_UNUSED(size);
return static_cast<uintptr_t>(phys_addr);
}
#elif defined(ATMOSPHERE_ARCH_ARM)
/* TODO: BPMP translation? */
AMS_UNUSED(size);