ams: avoid UB infinite loops

This commit is contained in:
Michael Scire 2020-08-13 17:28:29 -07:00
parent 874208b44a
commit 51b5c3d87d
9 changed files with 17 additions and 10 deletions

View file

@ -90,7 +90,7 @@ namespace ams::sc7fw {
reg::ReadWrite(PMC + APBDEV_PMC_DPD_ENABLE, PMC_REG_BITS_ENUM(DPD_ENABLE_ON, ENABLE));
/* Wait forever until we're asleep. */
while (true) { /* ... */ }
AMS_INFINITE_LOOP();
}
}
@ -102,7 +102,9 @@ namespace ams::sc7fw {
NORETURN void ExceptionHandler() {
/* Write enable to MAIN_RESET. */
reg::Write(PMC + APBDEV_PMC_CNTRL, PMC_REG_BITS_ENUM(CNTRL_MAIN_RESET, ENABLE));
while (true) { /* ... */ }
/* Wait forever until we're reset. */
AMS_INFINITE_LOOP();
}
}