Function sbi_rt::cppc_read_hi
source · pub fn cppc_read_hi(cppc_reg_id: u32) -> SbiRet
Expand description
Read the upper 32-bit value of the CPPC register identified by cppc_reg_id
.
§Parameters
The cppc_reg_id
parameter specifies the CPPC register ID.
§Return value
SbiRet.value
will contain the upper 32 bits of the register value. This function always
returns zero in SbiRet.value
when supervisor mode XLEN is 64 or higher.
The possible error codes returned in SbiRet.error
are shown in the table below:
Return code | Description |
---|---|
SbiRet::success() | Read completed successfully. |
SbiRet::invalid_param() | cppc_reg_id is reserved. |
SbiRet::not_supported() | cppc_reg_id is not implemented by the platform. |
SbiRet::denied() | cppc_reg_id is a write-only register. |
SbiRet::failed() | The read operation request failed for unspecified or unknown other reasons. |
This function is defined in RISC-V SBI Specification chapter 14.3.