-
Notifications
You must be signed in to change notification settings - Fork 4
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
John Hauser feedback 1 #11
Comments
Some of the inhibit bits in *ctrctl are documented thus:
To most readers, it's going to be inscrutable how, next to the category So by plain reading of the document, it would seem that setting both The same issue affects the description of the TYPE subfield of ctrdata.
It's impossible to divine what exactly distinguishes binary code 1010 After referring to the E-trace document, I believe what Smctr/Ssctr
By linkage here I mean that the jump instruction has a destination Assuming that the inhibit bits in *ctrctl are supposed to match the
One way or another, the labelling for these categories needs to be The Architecture Review Committee agreed it would be better for However, to the extent that the E-trace document is the original |
The DEPTH field in mctrctl is specified as WARL, and the document says, At the same time, we have:
and:
All this talk about read-only bits in DEPTH calls into question whether I think it should be sufficient to label DEPTH as WARL and stop The "Entry Registers" chapter says:
The way this paragraph is written (along with the rest of the Actually, the intention for Smcsrind/Sscsrind is that each level, M, S, Because it's not an appropriate assumption, it should be more clearly The chapter "State Enable Access Control" says:
Should be "when vsiselect is in 0x200..0x2FF". In Section 6.1.1, "Virtualization Mode Transitions", we have:
Because U-mode can never be the source or target of a virtualization Also in Section 6.1.1:
Do you mean "is (already) frozen" or rather "becomes frozen"? Section 6.4, "RAS (Return Address Stack) Emulation Mode", says:
Don't rotate the CTR buffer, decrement sctrstatus.WRPTR. |
Resolution:
|
TG agreed that making S*ctr dependent on Supervisor mode is acceptable. Also reached out to priv arch list, no concerns expressed. |
As the RISC-V ISA and all ratified extensions are currently defined, if
S-mode isn't implemented, no S-level CSRs exist.
This draft extension requires an S-level CSR, sctrstatus, yet claims
not to require that S-mode be implemented. The Architecture Review
Committee discussed the matter and concluded it leans against having
sctrstatus be the first (and only?) S-level CSR that may exist without
S-mode.
The ARC asks the TG to consider whether Smctr/Ssctr should have a
dependence on S-mode, much as it already requires XLEN >= 64 in order
for the extension to be fully controllable through the 64-bit *ctrctl
registers.
If the TG is sure Smctr/Ssctr is needed for 64-bit RISC-V processors
without S-mode (though not 32-bit ones, evidently), then it appears it
will be necessary to add an mctrstatus CSR that aliases sctrstatus.
The width of CSR sctrstatus isn't stated.
To avoid unnecessary complexity for a possible future RV32 version, I
recommend 32 bits, unless the TG has reason to believe it needs to be
more.
In the *ctrctl registers, the order of bits U, S, and M, and the order
of STE and MTE, is backwards from other RV CSRs.
Assuming there is a desire to keep MTE and STE lined up with M and S,
then for better RV consistency, presumably bits STE and S should remain
where they are, bits U and M swapped, and MTE moved to bit 10.
Within CTRs, for both ctrsource and ctrtarget, we have:
The RISC-V *tval registers serve a similar purpose on memory access
traps, and the Privileged ISA says of mtval:
Is the TG absolutely sure that ctrsource and ctrtarget don't need to
support at least one invalid address?
Section 6.1.2, "External Traps", says:
This seems wrong to me. Hence, I believe the document deserves an
explanation for why it's actually desirable.
According to the chapter "Custom Extensions", the value of the Custom
field in each *ctrctl register is reset to an implementation-specific
"default value", which configures the extension for its standard-
defined behavior. Values of the Custom fields other than this default
value select custom behavior.
The ARC strongly believes that a value of zero in a Custom field
should select standard-defined behavior. Software can then know that a
value of zero gives standard behavior, rather than some implementation-
specific value (the "default") that may or may not be known to
programmers. If it is even necessary to initialize these fields at
reset (existing RISC-V convention usually leaves initialization to
initial boot code whenever possible), they will of course reset to
zero.
The text was updated successfully, but these errors were encountered: