Skip to content

target/riscv: improve error messaging in case sbasize is zero #1274

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

Open
wants to merge 1 commit into
base: riscv
Choose a base branch
from

Conversation

en-sc
Copy link
Collaborator

@en-sc en-sc commented Jul 7, 2025

From: Sriram Shanmuga sriramharshalee@gmail.com

RISC-V Debug Specification v1.0 [3.14.22. System Bus Access Control and Status (sbcs, at 0x38)] states in sbasize field description:

Width of system bus addresses in bits. (0 indicates there is no bus
access support.)

Before the patch, the error message did not include the information about sbcs.sbasize being zero wich made it quite undescriptive:

[riscv.cpu] Turning off memory sampling because it failed.

Fixes #1270

Change-Id: I5402dd57dc9a81f65ee4c67d24e11c366006427c

From: Sriram Shanmuga <sriramharshalee@gmail.com>

RISC-V Debug Specification v1.0 [3.14.22. System Bus Access Control and
Status (`sbcs`, at 0x38)] states in `sbasize` field description:
> Width of system bus addresses in bits. (0 indicates there is no bus
access support.)

Before the patch, the error message did not include the information
about `sbcs.sbasize` being zero wich made it quite undescriptive:
```
[riscv.cpu] Turning off memory sampling because it failed.

```

Fixes riscv-collab#1270

Change-Id: I5402dd57dc9a81f65ee4c67d24e11c366006427c
Signed-off-by: Sriram Shanmuga <sriramharshalee@gmail.com>
Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com>
@en-sc
Copy link
Collaborator Author

en-sc commented Jul 7, 2025

@RaamyPi, please take a look

@RaamyPi
Copy link

RaamyPi commented Jul 8, 2025

Looks good, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory Sampling support when sbasize is zero.
2 participants