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

assert hit on non-zero core PM_SOFT_OFF exit in subsys/pm/pm.c:133 #70181

Closed
kv2019i opened this issue Mar 13, 2024 · 2 comments
Closed

assert hit on non-zero core PM_SOFT_OFF exit in subsys/pm/pm.c:133 #70181

kv2019i opened this issue Mar 13, 2024 · 2 comments
Assignees
Labels
area: Power Management bug The issue is a bug, or the PR is fixing a bug platform: Intel ADSP Intel Audio platforms priority: high High impact/importance bug

Comments

@kv2019i
Copy link
Collaborator

kv2019i commented Mar 13, 2024

Describe the bug
Zephyr assert is hit when powering off and on non-primary/zero core on Intel cAVS2.5 platform running SOF app on Zephyr.

Original bug report to SOF thesofproject/sof#8942 , filing here.

Same assert as #69807 but different scenario

  • different hw platform (cavs2.5 versus newer platforms)
  • on non-primary core
  • when exiting SOFTOFF state

To Reproduce
See thesofproject/sof#8942

Expected behavior
No DSP panic when running SOF test suite.

Impact
High, loss of audio

Logs and console output

Environment (please complete the following information):
See thesofproject/sof#8942

Additional context
This seems to to relate to commit 3e5a593 ("intel_adsp/cavs: power: Fix INTLEVEL value"). -> reverting this commit alone won't fix

@kv2019i kv2019i added bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug platform: Intel ADSP Intel Audio platforms labels Mar 13, 2024
@kv2019i
Copy link
Collaborator Author

kv2019i commented Mar 13, 2024

FYI @nashif @teburd @tmleman @marc-hb

This seem similar than Zephyr test case in review at #69365

kv2019i added a commit to kv2019i/zephyr that referenced this issue Mar 13, 2024
When non-primary core is powered down and restart with sequence of:
 - PM state set to SOFT_OFF
 - once target core is idle, cut power with soc_adsp_halt_cpu()
 - power up core again with k_smp_cpu_resume()

The execution will continue from stored DSP core context, but
will hit an assert in z_smp_cpu_mobile() as the PS.INTLEVEL
is zero.

Fix this issue by storing and restoring PS register in this flow.

Link: zephyrproject-rtos#70181
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
nashif pushed a commit that referenced this issue Mar 15, 2024
When non-primary core is powered down and restart with sequence of:
 - PM state set to SOFT_OFF
 - once target core is idle, cut power with soc_adsp_halt_cpu()
 - power up core again with k_smp_cpu_resume()

The execution will continue from stored DSP core context, but
will hit an assert in z_smp_cpu_mobile() as the PS.INTLEVEL
is zero.

Fix this issue by storing and restoring PS register in this flow.

Link: #70181
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
ashiroji pushed a commit to ashiroji/zephyr that referenced this issue Mar 19, 2024
When non-primary core is powered down and restart with sequence of:
 - PM state set to SOFT_OFF
 - once target core is idle, cut power with soc_adsp_halt_cpu()
 - power up core again with k_smp_cpu_resume()

The execution will continue from stored DSP core context, but
will hit an assert in z_smp_cpu_mobile() as the PS.INTLEVEL
is zero.

Fix this issue by storing and restoring PS register in this flow.

Link: zephyrproject-rtos#70181
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
coreboot-org-bot pushed a commit to coreboot/zephyr-cros that referenced this issue Mar 20, 2024
When non-primary core is powered down and restart with sequence of:
 - PM state set to SOFT_OFF
 - once target core is idle, cut power with soc_adsp_halt_cpu()
 - power up core again with k_smp_cpu_resume()

The execution will continue from stored DSP core context, but
will hit an assert in z_smp_cpu_mobile() as the PS.INTLEVEL
is zero.

Fix this issue by storing and restoring PS register in this flow.

(cherry picked from commit 010f39a)

Original-Link: zephyrproject-rtos/zephyr#70181
Original-Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
GitOrigin-RevId: 010f39a
Change-Id: Ib603383b3c3451877322158c0fa1302f37b6a987
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5376210
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Tested-by: Fabio Baltieri <fabiobaltieri@google.com>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
@kv2019i
Copy link
Collaborator Author

kv2019i commented Apr 2, 2024

Can be closed via #70184

@kv2019i kv2019i closed this as completed Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Power Management bug The issue is a bug, or the PR is fixing a bug platform: Intel ADSP Intel Audio platforms priority: high High impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants