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

arch: riscv: the s0 dumped during a fatal error is not correct #79298

Open
ycsin opened this issue Oct 2, 2024 · 0 comments · Fixed by #79096 · May be fixed by #79299
Open

arch: riscv: the s0 dumped during a fatal error is not correct #79298

ycsin opened this issue Oct 2, 2024 · 0 comments · Fixed by #79096 · May be fixed by #79299
Assignees
Labels
area: RISCV RISCV Architecture (32-bit & 64-bit) bug The issue is a bug, or the PR is fixing a bug

Comments

@ycsin
Copy link
Member

ycsin commented Oct 2, 2024

Describe the bug
The content of the s0 register dump during a fatal error is not the one at the time of the crash. On exception the isr.S, made a copy of the s0 register and then made some changes to the reg, but it didn't restore the s0 to the saved value before it jumps to the z_riscv_fatal_error_csf().

To Reproduce

  1. Run the test added in arch: riscv: isr.S: restore s0 before jumping to z_riscv_fatal_error_csf #79096 with Zephyr v3.7-branch
  2. The test will fail

Expected behavior
The test should pass

Impact
Incorrect s0 content shown in the fatal error message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: RISCV RISCV Architecture (32-bit & 64-bit) bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
5 participants