Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

soc: nordic: nrf54h: disable IRQ before PM config #2258

Merged

Conversation

adamkondraciuk
Copy link
Contributor

IRQs must be disabled before starting any procedures to prepare for low-power states.

@@ -85,14 +85,19 @@ SECTION_FUNC(TEXT, arch_pm_s2ram_suspend)
* not successful (in r0 the return value).
*/

/* Move return value of system_off to callee-saved register. */
mov r4, r0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice job picking that fix up

@adamkondraciuk adamkondraciuk force-pushed the disable-irq-before-all-PM-states-config branch from 8447187 to e0868d9 Compare November 13, 2024 15:52
… of s2ram_suspend

The return value of the system_off call is overwritten by the the call to
pm_s2ram_mark_check_and_clear. As arch_pm_s2ram_suspend needs to specify
why system_off failed, we need to make sure the rv of system_off is moved
to a safe register before calling pm_s2ram_mark_check_and_clear and moved
to r0 als rv of arch_pm_s2ram_suspend when the suspend call exits.

Upstream PR #: 80642

Signed-off-by: Hessel van der Molen <hvandermolen@dexels.com>
@adamkondraciuk adamkondraciuk force-pushed the disable-irq-before-all-PM-states-config branch from e0868d9 to 7b04326 Compare November 13, 2024 16:02
IRQs must be disabled before starting any procedures to prepare
for low-power states.

Upstream PR #: 79067

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
@adamkondraciuk adamkondraciuk force-pushed the disable-irq-before-all-PM-states-config branch from 7b04326 to 50d2a72 Compare November 13, 2024 19:59
@adamkondraciuk adamkondraciuk added backport v3.7.99-ncs1-branch Relates to NCS v2.8-branch and removed backport v3.7.99-ncs1-branch Relates to NCS v2.8-branch labels Nov 13, 2024
@rlubos rlubos merged commit dab9c11 into nrfconnect:main Nov 14, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport v3.7.99-ncs1-branch Relates to NCS v2.8-branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants