You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug:
In the NutShell implementation, when a store instruction causes a page fault exception in M-mode (mcause=0x0f), it incorrectly updates the stval register instead of the mtval register. According to the RISC-V Privileged Specification, during a page fault exception in M-mode, the mtval register should be updated with the faulting address or relevant information related to the exception. The behavior observed in NutShell deviates from the specification, as stval is updated, which is inconsistent with the defined behavior for handling exceptions in M-mode.
To Reproduce:
Set the processor to M-mode and execute a store instruction that will cause a page fault exception (mcause=0x0f).
Observe the values of mtval and stval registers after the exception is raised.
Note that stval is updated with the faulting address, whereas mtval remains unchanged.
Expected Behavior:
Upon a page fault exception in M-mode triggered by a store instruction, the mtval register should be updated with the faulting address or related exception information, not stval. This is in line with the RISC-V Privileged Specification, ensuring that exception handling behaves consistently across different implementations and modes of operation.
Screenshots Additional context
None
The text was updated successfully, but these errors were encountered:
Describe the Bug:
In the NutShell implementation, when a store instruction causes a page fault exception in M-mode (
mcause
=0x0f), it incorrectly updates thestval
register instead of themtval
register. According to the RISC-V Privileged Specification, during a page fault exception in M-mode, themtval
register should be updated with the faulting address or relevant information related to the exception. The behavior observed in NutShell deviates from the specification, asstval
is updated, which is inconsistent with the defined behavior for handling exceptions in M-mode.To Reproduce:
mcause
=0x0f).mtval
andstval
registers after the exception is raised.stval
is updated with the faulting address, whereasmtval
remains unchanged.Expected Behavior:
Upon a page fault exception in M-mode triggered by a store instruction, the
mtval
register should be updated with the faulting address or related exception information, notstval
. This is in line with the RISC-V Privileged Specification, ensuring that exception handling behaves consistently across different implementations and modes of operation.Screenshots
Additional context
None
The text was updated successfully, but these errors were encountered: