|
xTVAL Compliance restriction proposal
When address-related exceptions occur, the xTVAL CSR is written with the faulting effective address. However, the spec also says:
Implementations may convert some invalid address patterns into
When address-related exceptions occur, the xTVAL CSR is written with the faulting effective address. However, the spec also says:
Implementations may convert some invalid address patterns into
|
By
Allen Baum
·
#161
·
|
|
Re: xTVAL Compliance restriction proposal
When address-related exceptions occur, the xTVAL CSR is written with the faulting effective address. However, the spec also says:
Implementations may convert some invalid address patterns into
When address-related exceptions occur, the xTVAL CSR is written with the faulting effective address. However, the spec also says:
Implementations may convert some invalid address patterns into
|
By
Andrew Waterman
·
#162
·
|
|
Re: xTVAL Compliance restriction proposal
Yes: X (our implementation conforms to this constraint or implements XLEN bits)
Yes: X (our implementation conforms to this constraint or implements XLEN bits)
|
By
Greg Favor
·
#163
·
|
|
Re: xTVAL Compliance restriction proposal
Allen,
How is compliance testing going to handle this issue for software (versus hardware) writes to *tval CSRs? For example, when software writes stval with an address, how is the validity judged?
Allen,
How is compliance testing going to handle this issue for software (versus hardware) writes to *tval CSRs? For example, when software writes stval with an address, how is the validity judged?
|
By
Greg Favor
·
#164
·
|
|
Re: xTVAL Compliance restriction proposal
I focused on the HW writes to mtval when I described the Rocket core's behavior to Allen. The behavior for SW writes is that it unconditionally sign-extends from the most-significant implemented bit:
I focused on the HW writes to mtval when I described the Rocket core's behavior to Allen. The behavior for SW writes is that it unconditionally sign-extends from the most-significant implemented bit:
|
By
Andrew Waterman
·
#165
·
|
|
Re: xTVAL Compliance restriction proposal
That sounds good.
It would be great to see this software write behavior added to the Priv spec (along with whatever hardware write behavior that Allen's polling concludes with).
Thanks,
Greg
That sounds good.
It would be great to see this software write behavior added to the Priv spec (along with whatever hardware write behavior that Allen's polling concludes with).
Thanks,
Greg
|
By
Greg Favor
·
#166
·
|
|
Re: xTVAL Compliance restriction proposal
Thanks for your input, as always.
I agree that, if we ultimately agree to tighten the behavior here, we need to specify the behavior for both HW and SW writes.
Thanks for your input, as always.
I agree that, if we ultimately agree to tighten the behavior here, we need to specify the behavior for both HW and SW writes.
|
By
Andrew Waterman
·
#167
·
|
|
mtvec question
Hi Andrew, all,
The current priv spec reserves lower 2bits of mtvec (ad stvec) to indicate vectored interrupts, there’s an issue that if exception handler is word aligned but SW mis-program the
Hi Andrew, all,
The current priv spec reserves lower 2bits of mtvec (ad stvec) to indicate vectored interrupts, there’s an issue that if exception handler is word aligned but SW mis-program the
|
By
Joe Xie
·
#168
·
|
|
Re: mtvec question
I have been bitten by this, too, but I have little in the way of advice.
There are various software approaches to reduce the likelihood of encountering this problem, even if the programmer forgets to
I have been bitten by this, too, but I have little in the way of advice.
There are various software approaches to reduce the likelihood of encountering this problem, even if the programmer forgets to
|
By
Andrew Waterman
·
#169
·
|
|
Re: mtvec question
Are we going to use bit1 soon in the future? We are wondering if we can use bit1 to indicate there’s illegal value (WLRL) – if bit1 is written with 1 then fire exception.
From:
Are we going to use bit1 soon in the future? We are wondering if we can use bit1 to indicate there’s illegal value (WLRL) – if bit1 is written with 1 then fire exception.
From:
|
By
Joe Xie
·
#170
·
|
|
Re: mtvec question
It's already used: https://github.com/riscv/riscv-fast-interrupt/blob/master/clic.adoc#44-new-xtvec-csr-mode-for-clic
It's already used: https://github.com/riscv/riscv-fast-interrupt/blob/master/clic.adoc#44-new-xtvec-csr-mode-for-clic
|
By
Andrew Waterman
·
#171
·
|
|
Re: mtvec question
Lol
Do you feel it is worth to add a bit in sstatus to restrict csrw stvec to 1) mask bit1~0; 2) fire an exception when writing non-0 value to bit1~0?
A separate elf section can work in some
Lol
Do you feel it is worth to add a bit in sstatus to restrict csrw stvec to 1) mask bit1~0; 2) fire an exception when writing non-0 value to bit1~0?
A separate elf section can work in some
|
By
Joe Xie
·
#172
·
|
|
Re: mtvec question
I think this is one of dozens of little mistakes you can make in bare-metal RISC-V programming, and adding an sstatus bit for it is IMO not a great allocation of resources.
Hopefully you are
I think this is one of dozens of little mistakes you can make in bare-metal RISC-V programming, and adding an sstatus bit for it is IMO not a great allocation of resources.
Hopefully you are
|
By
Andrew Waterman
·
#173
·
|
|
Re: mtvec question
I think the solution is even simpler.
Even if MTVEC[1] had not been used, data dependent traps are prohibited in Risc-V (that might be too strong a word; I don't know that its explicited prohibited,
I think the solution is even simpler.
Even if MTVEC[1] had not been used, data dependent traps are prohibited in Risc-V (that might be too strong a word; I don't know that its explicited prohibited,
|
By
Allen Baum
·
#174
·
|
|
Re: Appearance of new M-mode CSR bits when Hypervisor is disabled
Greg Favor wrote:
The overriding statement in the document is this one:
When misa[7] (bit H) is clear, the hart behaves as though this
extension were not implemented, ....
I sympathize with
Greg Favor wrote:
The overriding statement in the document is this one:
When misa[7] (bit H) is clear, the hart behaves as though this
extension were not implemented, ....
I sympathize with
|
By
John Hauser
·
#175
·
|
|
Re: Appearance of new M-mode CSR bits when Hypervisor is disabled
Thanks. This is the interpretation we expected to be correct.
For the sake of some future readers of the spec that may not apply the broadest meaning of "behaves" when reading "behaves as though this
Thanks. This is the interpretation we expected to be correct.
For the sake of some future readers of the spec that may not apply the broadest meaning of "behaves" when reading "behaves as though this
|
By
Greg Favor
·
#176
·
|
|
Re: Appearance of new M-mode CSR bits when Hypervisor is disabled
And we should be careful to define the corner cases, e.g. the values that are in the registers when the features are enabled: the values they last held, or undefined, or.... something else.
And we should be careful to define the corner cases, e.g. the values that are in the registers when the features are enabled: the values they last held, or undefined, or.... something else.
|
By
Allen Baum
·
#177
·
|
|
Re: Appearance of new M-mode CSR bits when Hypervisor is disabled
While I would have to go through all the bits/fields affected by the H extension to double-check, the main issue are bits/fields that were previously reserved (and hardwired to zero). So there isn't
While I would have to go through all the bits/fields affected by the H extension to double-check, the main issue are bits/fields that were previously reserved (and hardwired to zero). So there isn't
|
By
Greg Favor
·
#178
·
|
|
Re: Appearance of new M-mode CSR bits when Hypervisor is disabled
Couldn't you just change the wording to be "disabled" when referring to having misa.H=0 and leave "unimplemented" to mean having misa.H hardwired to 0?
Jonathan
Couldn't you just change the wording to be "disabled" when referring to having misa.H=0 and leave "unimplemented" to mean having misa.H hardwired to 0?
Jonathan
|
By
Jonathan Behrens <behrensj@...>
·
#179
·
|
|
Re: Appearance of new M-mode CSR bits when Hypervisor is disabled
My response to Allen's post and my use of "unimplemented" in quotes was referring to the H extension spec's statement that "When misa[7] is clear, the hart behaves as though this extension were not
My response to Allen's post and my use of "unimplemented" in quotes was referring to the H extension spec's statement that "When misa[7] is clear, the hart behaves as though this extension were not
|
By
Greg Favor
·
#180
·
|