-
Notifications
You must be signed in to change notification settings - Fork 37
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
WFI Illegal in User Mode #23
Comments
Note: This is showing up with --override riscvOVPsim/cpu/wfi_is_nop=T |
I have investigated what you are asking. |
@duncangraham-Imperas The implementation that I am working on has implemented WFI as a NOP, so I do not believe that the instruction should cause a trap even with a time limit equal to 0. The implementation I am working on has TW (Timeout Wait in mstatus) set to read only 0, so the time limit equal 0 should not apply from what I understand.
|
According to OVPsim's webpage, the overall understanding aligns with the RISC-V Architecture sections that I have provided in the original post and the message prior to this. |
The platform I am operating on is compliant to the 1.12 version of the privilege architecture. If you disagree with WFI should not result in a trap when operating in User Mode and TW=0, could you provide the privilege architecture version and a quote for your understanding? |
It seems ilke if
Is this a possible update? |
After some internal discussion regarding your comments we believe that our initial interpretation of the privilege specification for WFI may not be correct for all conditions. |
Please could you let us know if your implementation includes supervisor mode and if this is enabled when the WFI instruction is executing? |
Our implementation does not include Supervisor mode |
The platform I am running on allows WFI to execute in usermode without an exception, but there is no flag in OVPsim to allow this.
`
Info 27735: 'riscvOVPsim/cpu', 0x00000000012649f6(snippet_id_8_start_SNP_ISA_WFI_run_block0_3_8_0_hv_0): User 10500073 wfi
Warning (RISCV_UDM) CPU 'riscvOVPsim/cpu' 0x012649f6 10500073 wfi: Illegal in User mode
Info mstatus 00000088 -> 00000080
Info mepc 0126332c -> 012649f6
Info mcause 00000008 -> 00000002
`
Is there a way to avoid trapping on WFI in user mode?
Thank you
The text was updated successfully, but these errors were encountered: