-
Notifications
You must be signed in to change notification settings - Fork 328
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
do not assume DTM version unless dtmcontrol is read successfully #929
Conversation
@timsifive I know that changes to riscv-0.11 are discouraged, however in this case I believe it's better to add this fix. There were a couple of serious bugs:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you test the riscv-011 changes?
src/target/riscv/riscv.c
Outdated
LOG_TARGET_DEBUG(target, "dtmcontrol=0x%x", dtmcontrol); | ||
// FIXME: if examine fails we may need to restore the original dtm_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. Can you add that change? Shouldn't be much more complicated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will try... though I'm not sure that we need to fix it in this patch. examine
has it's share of issues:
for example, it halts the target, but if something goes wrong - the target is not resumed. The fix for such situations may be complicated. But having said that - I'll try to address at least dtm_version
stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed..
Apparently my whining about examine implementation is not relevant to riscv.c
Regarding this...
|
If it helps, I can run the tests against a HiFive1 (Rev A I think) in the next couple of days? |
Oh, it would be great! If you have the bandwidth - please, do. Though I'll need to address few comments by @timsifive |
I take it that this PR still needs some changes before it makes sense for me to test against the HiFive1? |
I've already addressed all concerns raised by @timsifive . Maybe we should wait for Tim to confirm that this is good enough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this fix/improvement and the increased level of robustness it brings.
I have only few minor comments, otherwise it looks fine.
Change-Id: I5f2003b7ac5ce87af6ca9a4fcb46140682a8cfdf Signed-off-by: Parshintsev Anatoly <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me.
When testing on HiFive01 Rev A01 with known fails skipped:
- On HiFive1.py target, the testing passed without any issues.
- On HiFive1-flash.py, there were 8 exceptions, occurring both with and without this change. I haven't investigated these further.
:::::::::::::::::::::::::::[ ran 72 tests in 465s ]:::::::::::::::::::::::::::
28 tests returned not_applicable
36 tests returned pass
8 tests returned exception
DebugBreakpoint > logs/20231009-082756-HiFive1Flash-DebugBreakpoint.log
DebugExit > logs/20231009-082844-HiFive1Flash-DebugExit.log
DebugFunctionCall > logs/20231009-082926-HiFive1Flash-DebugFunctionCall.log
Hwbp1 > logs/20231009-083025-HiFive1Flash-Hwbp1.log
Hwbp2 > logs/20231009-083108-HiFive1Flash-Hwbp2.log
Registers > logs/20231009-083240-HiFive1Flash-Registers.log
TooManyHwbp > logs/20231009-083342-HiFive1Flash-TooManyHwbp.log
UserInterrupt > logs/20231009-083442-HiFive1Flash-UserInterrupt.log
If it's of any use, I plan to look at this imminently and could also look at those additional (?) exceptions? |
Any help with the failing tests is appreciated :) |
Hi @timsifive , just wanted to double-check if there are any additional changes/fixes required for this PR? |
Change-Id: I02906dbbe04778623a51774bc21fa45b55d12881