-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Added bus blocker to deny requests to dmInner when dmactive=0 #2205
Conversation
It occurs to me that the JTAG DTM has an assertion that error will never be returned. This code needs to be revisited before this PR can be merged (Note: I did that) |
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.
unsound
@@ -19,7 +19,8 @@ class TLZero(address: AddressSet, beatBytes: Int = 4)(implicit p: Parameters) | |||
region = RegionType.UNCACHED, | |||
executable = true, | |||
mayDenyGet = false, | |||
mayDenyPut = false), | |||
mayDenyPut = false, | |||
minLatency = 1), |
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 is a lie. The implementation clearly has minLatency=0.
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.
then it has always been lying.
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.
previously DevNull device always reported that it had minLatency=1. So if this is actually 0 then it should report as 0.
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.
This is the line I am referring to:
minLatency = 1))) // no bypass needed for this device |
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.
Other than minLatency, the rest looks good.
@terpstra can you please re-review how I handled passing the @ernie-sifive can you please review the change I made to turn assertion into cover property for the JTAG Debug Transport |
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 assert -> cover change looks good to me.
This is failing regressions because of unhandled errors. I am not sure what is not handling this, presumably OpenOCD?
|
@mwachs5 The OpenOCD failure is from reading dmstatus before setting dmactive to 1. This was fixed many months ago in riscv-openocd. We need to update rocket-tools with the latest riscv-openocd. I tried to do a PR to do this but don't have permission for rocket-tools. |
@ernie-sifive It looks like the permissions for that repository were misconfigured (the intent was that people who have write access to this repo also have it over there). It should be fixed now. |
@mwachs5 rocket-chip commit 177b5b8 fixes the OpenOCD issue. (Edit: Well, not really...the resulting tools are missing riscv-unknown-elf-objcopy). There is another case of reading dmstatus while dmactive=0 that is not handling an error return and is also causing CI failures in rocket-chip. Once again I don't have permission to push a branch to the repo (@aswaterman?). In riscv-isa-sim/fesvr/dtm.cc, function dtm_t::resume:
I would propose changing the write to dmcontrol to write dmactive=1. @mwachs5 You should also be aware that an assertion fires when the bus blocker error device responds. Something is still wrong with the minlatency settings in the blocker.
|
Thanks Ernie. I will take a look at the minlatency issue early this week.
|
What needs I can look into just building a specific commit of riscv-openocd instead of relying on the version in riscv-tools... |
objcopy is needed by sifive closed-source configs that refer to the riscv-tools under rocket-chip. My attempt at updating riscv-tools (chipsalliance/rocket-tools@7f46e7e) changed only openocd and only as far as the commit that fixed the dmstatus access with dmactive=0 (riscv-collab/riscv-openocd@906635c). |
@ernie-sifive do you still need help with the necessary |
@mwachs5 I don't have permission to push branches to any of the rocket-tools submodules. I think the most expedient way to get this PR to pass CI tests is to branch riscv-openocd and riscv-fesvr from the commits currently pointed to by rocket-tools, make the necessary change to each, and then update rocket-tools to point to these branch commits. |
@ernie-sifive you don’t need write permissions to create pull requests. You can fork the repo to your own github account then make PRs back to the original. |
@aswaterman I attempted to do as suggested and just bump the riscv-openocd version and then add the fix to riscv-fesvr, but seems riscv/riscv-fesvr is locked down and can't be modified anymore due to being deprecated...? Am I understanding this correctly? |
Attempting to move this forwards with riscv-software-src/riscv-isa-sim#392. I am still unclear why the lack of objcopy is a problem, since it seems like the current version of rocket-tools pointed to by rocket-chip also doesn't include objcopy. This will require us to bump rocket-tools past the point where |
Hopefully there should be no problem with moving Spike up to that point.
…On Mon, Feb 10, 2020 at 11:43 AM Megan Wachs ***@***.***> wrote:
Attempting to move this forwards with riscv-software-src/riscv-isa-sim#392
<riscv-software-src/riscv-isa-sim#392>. I am still unclear why
the lack of objcopy is a problem, since it seems like the current version
of rocket-tools pointed to by rocket-chip also doesn't include objcopy.
This will require us to bump rocket-tools past the point where riscv-fesvr
was merged with riscv-isa-sim. I don't know why that was not done before
or what complications it will bring. @ernie-sifive
<https://github.com/ernie-sifive> it looks like you attempted to do this
in your Debug reset PR
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2205?email_source=notifications&email_token=AAH3XQSKFHFZUKIBWLDLDLTRCGG4LA5CNFSM4JRO3WZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELJN3EQ#issuecomment-584244626>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAH3XQUZVV2OCHD7B2UADH3RCGG4LANCNFSM4JRO3WZQ>
.
|
@mwachs5 Yes, I attempted this but was never able to achieve a consistent set of tools. The objcopy problem was seen in closed-source that depends on rocket-tools. |
bb06fbd
to
c3b843d
Compare
I figured out that the |
This is still failing on tests loading with DTM with an assertion failure that dtm is not supposed to return error. Will look into it. |
This is working, but the version of rocket-tools is not passing its own regressions, so will need to resolve that before merging. |
75e76d2
to
02b7a7d
Compare
The current version of rocket-tools is now passing its own regressions. This is ready to merge once more downstream testing is complete and once @terpstra removes his blocking review. |
@@ -11,7 +11,8 @@ import freechips.rocketchip.diplomacy._ | |||
* continue to send traffic to it !!! | |||
*/ | |||
class TLDeadlock(params: DevNullParams, beatBytes: Int = 4)(implicit p: Parameters) | |||
extends DevNullDevice(params, beatBytes, new SimpleDevice("deadlock-device", Seq("sifive,deadlock0"))) | |||
extends DevNullDevice(params, minLatency = 1, // technically not true but we don't want to add extra logic to handle minLatency = 0 | |||
beatBytes, new SimpleDevice("deadlock-device", Seq("sifive,deadlock0"))) |
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'm not sure about this comment. AFAICT, this device never responds. So minLatency=infinity would be more accurate. This device (TLDeadlock) also flagrantly violates the TL forward progress requirements, but I assume based on the name that this is intentional. What is this device for?
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 don't know I assume you had created it? Maybe @hcook knows?
This is now failing due to missing |
@richardxia i think the tool which required |
If you switched from Python 2 to Python 3, and if you installed the Python package Also, just for the record, I have never touched the Travis CI tests for rocket-chip ever (which you can confirm by checking the commit history of |
33749a3
to
d828bb0
Compare
This is failing due to |
hooray. this is finally passing. Will merge with squash-and-merge once some downstream tests pass |
3b1a2a8
to
901b01b
Compare
Reduce size of Bypass logic in debug modoule Parameterize atomics and transferSize in TLBusBypassBase, set in dmOuterAsync Bus Blocker: BriskBusBlocker is very similar to TLBusBlocker DMI Bus Blocker: clean up API for error device buffering Debug: reduce hardware added to TLError on APB interface Update Zero.scala Correct the minLatency for TLZero back to 1 Debug: fix rebase issue Debug: revert unncessary whitespace change Add optional buffering for C channel as well in error
BusBypass: correct removal of sync reset reliance
…mal and bypass device, otherwise you can get assertion failures when using the bypass path
fix bad merge Parameters: fix bad merge
regression: FESVR is now part of spike so don't build it bump riscv-tools for FESVR DMACTIVE fix Rocket-tools: remove prolematic space rocket-tools: bumping to use latest-ish versions of tools and FSF GDB rocket-tools: bump hash and build the FSF GDB, not riscv GDB Regression: apparently need to have the binutils-gdb submodule even if we don't plan to comiple it Travis: bump pexpect since gdbserver.py now uses Python3 Debug tests: now need to be python3 compatible dmactive: bump riscv-tools hash Debug regressions: need to add RISCV/bin to the path now apparently
901b01b
to
77bc309
Compare
Related issue:
Type of change: feature request
Impact:API modification
Development Phase: implementation
Release Notes
dmactive is now used to deny transactions (return error) that would pass across the DMI interface when dmactive=0. This is to prevent accesses to the interface when it may be in reset and/or have no running clock which might cause it to hang.
This will result in an error response and will prevent reading the DMSTATUS fields (e.g. version) before dmactive is set to 1.
This also changes the interface to make the TLError device more flexible to allow a reduced-size TLError device to be instantiated in the Debug Module.
This also changes the TLBusBypass to report its minLatency as the min of both the original and bypassed paths minLatency.