riscv-non-isa / riscv-rpmi

RISC-V Platform Management Interface Specification. OS-agnostic messaging interface for system management and control
https://jira.riscv.org/browse/RVG-151
Creative Commons Attribution 4.0 International
8 stars 8 forks source link

`SYSSUSP_SUSPEND` should allow platform-specific quiescent states, not only WFI #65

Closed SiFiveHolland closed 1 month ago

SiFiveHolland commented 1 month ago

Currently, the SYSSUSP_SUSPEND service description contains the following requirement:

The application processor which called this service must enter into the WFI state by executing the WFI instruction. The platform microcontroller will transition the system to the requested SUSPEND_STATE upon the successful WFI state transition of the application processor.

However, not all implementations use the WFI instruction to enter into a quiescent state. The HSM_HART_STOP service allows for this flexibility:

The hart upon successful acknowledgement can perform the final context saving if required and must enter into a quiesced state such as WFI which can be detected and allow the platform microcontroller to proceed to stop the hart. The mechanism to detect the hart quiesced state by the platform microcontroller is platform specific.

The SYSSUSP_SUSPEND service should be updated to use similar language.

pathakraul commented 1 month ago

Yes thanks @SiFiveHolland , let me raise the PR