[BUG] Instruction Access Fault during transition from Machine to Hypervisor/Supervisor Mode #2687
Closed
1 task done
Labels
Type:Bug
For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Is there an existing CVA6 bug for this?
Bug Description
Bug Description:
Attempting to switch from Machine mode (M-mode) to Hypervisor/Supervisor mode (HS-mode/S-mode) using an instruction access fault exception, even when address translation is configured as Bare (satp.MODE = 0) and no memory protection is enabled, results in an unexpected Instruction Access Fault. The same scenario executes correctly on the Spike simulator.
According to the RISC-V ISA specification:
Therefore, in Bare mode, there should be no translation or access fault for valid physical addresses, and the exception should not occur unless physical memory protection (PMP) explicitly restricts access.
Code for Reproducing the Bug:
Expected Behavior:
Since address translation is disabled (Bare mode) and no PMP restrictions are configured, the transition to Supervisor mode and execution at the specified address should succeed without generating an instruction access fault.
Observed Behavior:
An instruction access fault occurs unexpectedly during the
mret
execution, despite the system being in Bare mode with unrestricted memory access.CVA6 commit: 2155d0e
Build config :
cv64a6_imafdch_sv39_wb
The text was updated successfully, but these errors were encountered: