exo: read first two sd card sectors in mariko_fatal

This commit is contained in:
Michael Scire 2020-11-15 13:31:01 -08:00
parent 23609fb983
commit 3f4e0b4912
2 changed files with 7 additions and 7 deletions

View File

@ -37,6 +37,12 @@ namespace ams::dd {
return secmon::MemoryRegionVirtualDeviceApbMisc.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDeviceApbMisc.GetAddress(); return secmon::MemoryRegionVirtualDeviceApbMisc.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDeviceApbMisc.GetAddress();
} else if (secmon::MemoryRegionPhysicalDeviceSdmmc.Contains(phys_addr, size)) { } else if (secmon::MemoryRegionPhysicalDeviceSdmmc.Contains(phys_addr, size)) {
return secmon::MemoryRegionVirtualDeviceSdmmc.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDeviceSdmmc.GetAddress(); return secmon::MemoryRegionVirtualDeviceSdmmc.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDeviceSdmmc.GetAddress();
} else if (secmon::MemoryRegionPhysicalDevicePmc.Contains(phys_addr, size)) {
return secmon::MemoryRegionVirtualDevicePmc.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDevicePmc.GetAddress();
} else if (secmon::MemoryRegionPhysicalDeviceI2c5.Contains(phys_addr, size)) {
return secmon::MemoryRegionVirtualDeviceI2c5.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDeviceI2c5.GetAddress();
} else if (secmon::MemoryRegionPhysicalDeviceI2c1.Contains(phys_addr, size)) {
return secmon::MemoryRegionVirtualDeviceI2c1.GetAddress() + phys_addr - secmon::MemoryRegionPhysicalDeviceI2c1.GetAddress();
} else { } else {
AMS_UNUSED(size); AMS_UNUSED(size);
return static_cast<uintptr_t>(phys_addr); return static_cast<uintptr_t>(phys_addr);

View File

@ -747,13 +747,7 @@ namespace ams::sdmmc::impl {
SdHostStandardController::SdHostStandardController(dd::PhysicalAddress registers_phys_addr, size_t registers_size) { SdHostStandardController::SdHostStandardController(dd::PhysicalAddress registers_phys_addr, size_t registers_size) {
/* Translate the physical address to a address. */ /* Translate the physical address to a address. */
#if defined(ATMOSPHERE_IS_STRATOSPHERE) const uintptr_t registers_addr = dd::QueryIoMapping(registers_phys_addr, registers_size);
const uintptr_t registers_addr = dd::QueryIoMapping(registers_phys_addr, registers_size);
#else
/* TODO: Discriminate between bpmp, exosphere address? */
AMS_UNUSED(registers_size);
const uintptr_t registers_addr = static_cast<uintptr_t>(registers_phys_addr);
#endif
/* Set registers. */ /* Set registers. */
AMS_ABORT_UNLESS(registers_addr != 0); AMS_ABORT_UNLESS(registers_addr != 0);