Dear NXP Support Team,
We are investigating a low-power waiting mechanism in U-Boot for a i.MX8M Plus based product and have reached a point where we would appreciate guidance from NXP.
The application needs to remain in U-Boot for several minutes while a deeply discharged battery charges before Android is started.
A busy-loop based on mdelay() consumes unnecessary power and generates additional heat, so we are trying to periodically enter a low-power idle state and wake using the ARM Generic Timer (CNTP, PPI 30).
The processor never wakes from wfi(). UART output simply stops with no exception or crash.
This reaches the ATF standby implementation imx_cpu_standby(), but the system hangs in exactly the same way: no exception, no UART output, and execution never resumes.
Therefore, both:
produce identical behavior.
HCR_EL2 has:
so interrupt routing through EL2 virtualization is not involved.
From the ATF sources we verified that:
Therefore the Generic Timer interrupt appears to remain Group 1 Non-secure as expected.
We originally suspected that non-secure wfi() might be trapped to EL3 via SCR_EL3.TWE, but this now seems unlikely because the same behavior occurs when wfi() is executed inside ATF itself through PSCI.
While tracing the ATF GIC initialization we noticed that gicv3_distif_init() clears the Distributor EnableGrp bits and only re-enables those requested by the secure interrupt property table.
Since the helper only produces Group0 and Group1 Secure properties, it appears that EnableGrp1NS is never explicitly re-enabled.
To verify this we:
Unexpectedly:
We also verified:
Therefore RDC does not appear to be preventing the write.
At this point we have eliminated:
The remaining unexplained behavior is that an architecturally Non-secure writable Distributor control bit (EnableGrp1NS) does not appear to accept writes on this platform, and consequently neither raw wfi() nor PSCI CPU_SUSPEND ever wake using the Generic Timer interrupt.
Any insight into the expected initialization sequence or platform-specific behavior would be greatly appreciated.
Thanks
Best Regards
Pier