kern: wait 100us after synchronizing cores before saving interrupt state on sleep

This commit is contained in:
Michael Scire 2025-05-28 10:48:42 -07:00
parent f646d9c8f9
commit 3fbc59cce1

View file

@ -524,6 +524,14 @@ namespace ams::kern::board::nintendo::nx {
/* Ensure that all cores get to this point before continuing. */
cpu::SynchronizeAllCores();
/* Wait 100us before continuing. */
{
const s64 timeout = KHardwareTimer::GetTick() + ams::svc::Tick(TimeSpan::FromMicroSeconds(100));
while (KHardwareTimer::GetTick() < timeout) {
__asm__ __volatile__("" ::: "memory");
}
}
/* Save the interrupt manager's state. */
Kernel::GetInterruptManager().Save(core_id);