Is it a normal user-mode instruction?
No. These instructions are constrained by privilege level and extension support; user-mode legality must follow the privileged rules.
Wait-for-interrupt hint: an implementation may stall the hart until an interrupt may need service; a legal implementation may also treat it as NOP.
WFI uses opcode 1110011 (0x73), funct3 000, funct12 000100000101. The rs1 field selects the source register, the 12-bit immediate provides the second operand, and rd selects the destination.
WFI informs the implementation that the current hart may be stalled until an interrupt might need service. If a locally enabled interrupt is already pending or later becomes pending, the trap is taken on a following instruction; implementations may also resume for any reason, so software must handle WFI returning as if it were a NOP. WFI is available in all privileged modes; U-mode availability and trapping when TW=1 are governed by the privileged specification.
WFI is a system-level instruction defined by the privileged architecture. This page covers architectural semantics only, not platform firmware policy.
Understand this scenario with real code like «wfi # Wait for interrupt».
Understand this scenario with real code like «wfi # Wait for interrupt».
No. These instructions are constrained by privilege level and extension support; user-mode legality must follow the privileged rules.
No. Address translation, instruction fetch, and data-memory ordering use different fence/invalidation instructions.