From 266eee368e1c4aabd4cdb40fa3266620747f76ed Mon Sep 17 00:00:00 2001 From: Rahul Pathak Date: Sun, 1 Sep 2024 08:12:18 +0530 Subject: [PATCH] HSM service group changes Signed-off-by: Rahul Pathak --- src/srvgrp-cppc.adoc | 2 +- src/srvgrp-hart-state-management.adoc | 694 +++++++++++++++++++------- 2 files changed, 517 insertions(+), 179 deletions(-) diff --git a/src/srvgrp-cppc.adoc b/src/srvgrp-cppc.adoc index 05908c1..8ac18b8 100644 --- a/src/srvgrp-cppc.adoc +++ b/src/srvgrp-cppc.adoc @@ -611,7 +611,7 @@ for performance control. If the number of words required for all available Hart IDs exceeds the number of words that can be returned in one acknowledgement message then the platform microcontroller will set the `REMAINING` and `RETURNED` fields accordingly and -only return the hart IDs which can be accommodated. The application processor +only return the Hart IDs which can be accommodated. The application processor may need to call this service again with the appropriate `START_INDEX` until the `REMAINING` field returns `0`. diff --git a/src/srvgrp-hart-state-management.adoc b/src/srvgrp-hart-state-management.adoc index c48e6da..3a03ed8 100644 --- a/src/srvgrp-hart-state-management.adoc +++ b/src/srvgrp-hart-state-management.adoc @@ -9,295 +9,633 @@ ifndef::rootpath[] :rootpath: ./../ endif::rootpath[] -=== Service Group - *HART_STATE_MANAGEMENT* (servicegroup_id: 0x00004) -The HART_STATE_MANAGEMENT (HSM) service group defines a set of hart states and -functionality equivalent to the HSM extension in the RISC-V SBI Specification -cite:[SBI]. +=== Service Group - HART_STATE_MANAGEMENT (SERVICEGROUP_ID: 0x00004) +This service group defines services to control and manage the application +processor (hart) power states. A hart power states includes power on, power off, +suspend modes, etc. A hart is identified by a 32-bit identifier called `HART_ID`. + +In a platform, depending on the sharing of power controls and common +resources, the harts can be grouped in a hierarchical topology to form cores, +clusters, nodes, etc. In such cases the power state change for a hart can affect +the entire hierarchical group in which the hart is located, requiring coordination +for the power state change. RPMI supports the coordination mechanisms and hart +power states defined by the RISC-V SBI Specification cite:[SBI]. + +The following table lists the services in the HSM service group: -Below table lists the services in this group: [#table_hsm_services] .HART_STATE_MANAGEMENT Services [cols="1, 3, 2", width=100%, align="center", options="header"] |=== -| Service ID | Service Name | Request Type -| 0x01 | HSM_ENABLE_NOTIFICATION | NORMAL_REQUEST -| 0x02 | HSM_HART_START | NORMAL_REQUEST -| 0x03 | HSM_HART_STOP | NORMAL_REQUEST -| 0x04 | HSM_HART_SUSPEND | NORMAL_REQUEST -| 0x05 | HSM_GET_HART_STATUS | NORMAL_REQUEST -| 0x06 | HSM_GET_HART_LIST | NORMAL_REQUEST -| 0x07 | HSM_GET_SUSPEND_TYPES | NORMAL_REQUEST -| 0x08 | HSM_GET_SUSPEND_INFO | NORMAL_REQUEST +| Service ID +| Service Name +| Request Type + +| 0x01 +| HSM_ENABLE_NOTIFICATION +| NORMAL_REQUEST + +| 0x02 +| HSM_GET_HART_STATUS +| NORMAL_REQUEST + +| 0x03 +| HSM_GET_HART_LIST +| NORMAL_REQUEST + +| 0x04 +| HSM_GET_SUSPEND_TYPES +| NORMAL_REQUEST + +| 0x05 +| HSM_GET_SUSPEND_INFO +| NORMAL_REQUEST + +| 0x06 +| HSM_HART_START +| NORMAL_REQUEST + +| 0x07 +| HSM_HART_STOP +| NORMAL_REQUEST + +| 0x08 +| HSM_HART_SUSPEND +| NORMAL_REQUEST + |=== +==== Hart States +Hart HSM states and the HSM state machine supported by the RPMI +are defined in the RISC-V SBI Specification cite:[SBI]. Refer to +https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/src/ext-hsm.adoc#table_hsm_states[*HSM States*^]. + +From a hart perspective a start state means hart has started execution of +instructions and stop state means that hart is not executing the instructions. +The platform can implement the stop state either by powering down the hart or +just putting the hart in a platform supported low-power state. + +The RPMI supports the hart suspend states encoding as defined in +RISC-V SBI Specification:[SBI]. +Refer to https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/src/ext-hsm.adoc#table_hsm_hart_suspend_types[*HSM Suspend States*^]. The values for the +platform supported suspend types are discovered through a service defined in +this service group. + [#hsm-notifications] ==== Notifications This service group does not support any event for notification. -==== Service: *HSM_ENABLE_NOTIFICATION* -This service allows the AP to subscribe to HART_STATE_MANAGEMENT service group -notifications. The platform can optionally support notifications of events may -occur in the platform. PuC can send these notification messages to the AP if -they are implemented and the AP has subscribed to them. Supported events are -described in <<#hsm-notifications>>. +==== Service: HSM_ENABLE_NOTIFICATION (SERVICE_ID: 0x01) +This service allows the application processor to subscribe to the +`HART_STATE_MANAGEMENT` service group defined events for notifications. +The platform can optionally support notifications of events that may occur in +the platform. The platform microcontroller can send these notification messages +to the application processor if they are implemented and the application +processor has subscribed to them. Supported events are described in +<>. [#table_hsm_ennotification_request_data] .Request Data [cols="1, 2, 1, 7", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | EVENT_ID | uint32 | Event to be subscribed for -notification. +| Word +| Name +| Type +| Description + +| 0 +| EVENT_ID +| uint32 +| Event to be subscribed for notification. |=== [#table_hsm_ennotification_response_data] .Response Data -[cols="1, 2, 1, 7a", width=100%, align="center", options="header"] +[cols="1, 1, 1, 7a", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | STATUS | int32 | Return Status Code -[cols="5,5"] +| Word +| Name +| Type +| Description + +| 0 +| STATUS +| int32 +| Return error code +[cols="6,5a", options="header"] !=== -! *Error Code* ! *Description* -! RPMI_SUCCESS ! Notifications are subscribed successfully. -! RPMI_ERROR_NOT_FOUND ! EVENT_ID is not supported or invalid. -! RPMI_ERROR_NOT_SUPPORTED ! Notifications are not supported. +! Error Code +! Description + +! RPMI_SUCCESS +! Event is subscribed successfully. + +! RPMI_ERR_INVALID_PARAM +! `EVENT_ID` is invalid. + +! RPMI_ERR_NOT_SUPPORTED +! Notification is not supported. !=== - Other errors <> |=== -==== Service: *HSM_HART_START* -This service is used to start (or power up) a hart with a specified `HART_ID`. -Successful completion of this service means that the hart with the specified -`HART_ID` has started execution from the specified start address. The previous -state of the hart before this service was called is platform specific. It's -possible that hart was already started or the hart with the given `HART_ID` -does not exist. The implementation should return an appropriate error code in -the status field. +==== Service: HSM_GET_HART_STATUS (SERVICE_ID: 0x02) +This service returns the current HSM state of a hart. In case if a hart is +in a invalid state which is not a defined HSM state then error code will be +set in `STATUS` field. -[#table_hsm_hartstart_request_data] +[#table_hsm_gethartstatus_request_data] .Request Data -[cols="1, 3, 1, 7", width=100%, align="center", options="header"] +[cols="1, 2, 1, 7", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | HART_ID | uint32 | Hart ID of the hart to be started. -| 1 | START_ADDR_LOW | uint32 | Lower `32 bits` of the start address. -| 2 | START_ADDR_HIGH | uint32 | Upper `32 bits` of the start address. +| Word +| Name +| Type +| Description + +| 0 +| HART_ID +| uint32 +| Hart ID |=== -[#table_hsm_hartstart_response_data] +[#table_hsm_gethartstatus_response_data] .Response Data -[cols="1, 3, 1, 7a", width=100%, align="center", options="header"] +[cols="1, 2, 1, 7a", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | STATUS | int32 | Return Status Code -[cols="7,5"] +| Word +| Name +| Type +| Description + +| 0 +| STATUS +| int32 +| Return error code +[cols="6,5a", options="header"] !=== -! *Error Code* ! *Description* -! RPMI_SUCCESS ! Service completed successfully and hart is started. -! RPMI_ERROR_INVALID_PARAMETER ! HART_ID is invalid. +! Error Code +! Description + +! RPMI_SUCCESS +! Service completed successfully. + +! RPMI_ERR_INVALID_PARAM +! `HART_ID` is invalid. + +! RPMI_ERR_INVALID_STATE +! Hart is in invalid state. !=== - Other errors <> + +| 1 +| HART_STATE +| uint32 | Hart HSM state |=== -==== Service: *HSM_HART_STOP* -This service stops the execution of the calling hart. The mechanism to stop the -hart is platform specific. The hart can be powered down if supported, or put -into the deepest sleep state available. The platform must acknowledge that the -hart can be stopped and return success. The Application Processor must execute -WFI upon successful acknowledgement. Subsequently, the platform shall then -proceed to stop the hart. Detecting the WFI state from the PuC is implementation -defined. Once the hart is stopped, it can only be restarted by invoking the -`HSM_HART_START` service call explicitly from the Application Processor. +==== Service: HSM_GET_HART_LIST (SERVICE_ID: 0x03) +This service retrieves the list of Hart IDs managed by this service group. -[#table_hsm_hartstop_request_data] +If the number of words required for all available Hart IDs exceeds the number of +words that can be returned in one acknowledgement message then the platform +microcontroller will set the `REMAINING` and `RETURNED` fields accordingly and +only return the Hart IDs which can be accommodated. The application processor +may need to call this service again with the appropriate `START_INDEX` until the +`REMAINING` field returns `0`. + +[#table_hsm_gethartlist_request_data] .Request Data [cols="1, 2, 1, 7", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | HART_ID | uint32 | Hart ID of the calling hart. +| Word +| Name +| Type +| Description + +| 0 +| START_INDEX +| uint32 +| Start index of the Hart ID. |=== -[#table_hsm_hartstop_response_data] +[#table_hsm_gethartlist_response_data] .Response Data [cols="1, 2, 1, 7a", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | STATUS | int32 | Return Status Code -[cols="5,5"] +| Word +| Name +| Type +| Description + +| 0 +| STATUS +| int32 +| Return error code +[cols="6,5a"] !=== -! *Error Code* ! *Description* -! RPMI_SUCCESS ! Service completed successfully and hart is stopped. -! RPMI_ERROR_DENIED ! Not allowed due to current hart state which is platform -specific. +! Error Code +! Description + +! RPMI_SUCCESS +! Service completed successfully. + +! RPMI_ERR_BAD_RANGE +! `START_INDEX` is not in valid range. !=== - Other errors <> + +| 1 +| REMAINING +| uint32 +| Remaining number of Hart IDs to be returned. + +| 2 +| RETURNED +| uint32 +| Number of Hart IDs returned in this request. + +| 3 +| HART_ID[0] +| uint32 +| Hart ID + +| 4 +| HART_ID[1] +| uint32 +| Hart ID + +| N+2 +| HART_ID[N - 1] +| uint32 +| Hart ID |=== -==== Service: *HSM_HART_SUSPEND* -This service puts the calling hart in suspended (or low power) state. Upon -success, the calling hart is suspended only after it executes WFI instruction. +==== Service: HSM_GET_SUSPEND_TYPES (SERVICE_ID: 0x04) +This service gets the list of all supported suspend types for a hart. +The suspend types in the list must be ordered based on increasing power savings. -[#table_hsm_hartsuspend_request_data] +If the number of words required for all available suspend types exceeds the +number of words that can be returned in one acknowledgement message then the +platform microcontroller will set the `REMAINING` and `RETURNED` fields +accordingly and only return the suspend types which can be accommodated. +The application processor may need to call this service again with the +appropriate `START_INDEX` until the `REMAINING` field returns `0`. + +The attributes and details of each suspend type can be discovered using the +`HSM_GET_SUSPEND_INFO` service. + +[#table_hsm_getsuspendtypes_request_data] .Request Data [cols="1, 3, 1, 7", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | HART_ID | uint32 | Hart ID of the calling hart. -| 1 | SUSPEND_TYPE | uint32 | Hart suspend type as defined by RISC-V -SBI Specification cite:[SBI]. -| 2 | RESUME_ADDR_LOW | uint32 | Lower `32 bits` of the resume address. + -_Only used for non-retentive suspend types._ -| 3 | RESUME_ADDR_HIGH | uint32 | Upper `32 bits` of the resume address. + -_Only used for non-retentive suspend types._ +| Word +| Name +| Type +| Description + +| 0 +| START_INDEX +| uint32 +| Start index of the Hart ID. + +`0` for the first call, subsequent calls will use the next index of the remaining +items. |=== -[#table_hsm_hartsuspend_response_data] +[#table_hsm_getsuspendtypes_response_data] .Response Data -[cols="1, 2, 1, 7a", width=100%, align="center", options="header"] +[cols="1, 3, 1, 7a", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | STATUS | int32 | Return Status Code -[cols="6,5"] +| Word +| Name +| Type +| Description + +| 0 +| STATUS +| int32 +| Return error code +[cols="7,5a"] !=== -! *Error Code* ! *Description* -! RPMI_SUCCESS ! Service completed successfully. -! RPMI_ERROR_INVALID_PARAMETER ! Invalid SUSPEND_TYPE. +! Error Code +! Description + +! RPMI_SUCCESS +! Service completed successfully. + +! RPMI_ERR_BAD_RANGE +! `START_INDEX` is not in valid range. !=== - Other errors <> + +| 1 +| REMAINING +| uint32 +| Remaining number of suspend types to be returned. + +| 2 +| RETURNED +| uint32 +| Number of suspend types returned in this request. + +| 3 +| SUSPEND_TYPE[0] +| uint32 +| Suspend type + +| 4 +| SUSPEND_TYPE[1] +| uint32 +| Suspend type + +| N+2 +| SUSPEND_TYPE[N - 1] +| uint32 +| Suspend type |=== -==== Service: *HSM_GET_HART_STATUS* -This service gets the running status of a hart. +==== Service: HSM_GET_SUSPEND_INFO (SERVICE_ID: 0x05) +This service is used to get the attributes of a suspend type. -[#table_hsm_gethartstatus_request_data] +[#table_hsm_getsuspendinfo_request_data] .Request Data -[cols="1, 2, 1, 7", width=100%, align="center", options="header"] +[cols="1, 3, 1, 7", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | HART_ID | uint32 | Hart ID. +| Word +| Name +| Type +| Description + +| 0 +| SUSPEND_TYPE +| uint32 +| Suspend type. |=== -[#table_hsm_gethartstatus_response_data] +[#table_hsm_getsuspendinfo_response_data] .Response Data -[cols="1, 2, 1, 7a", width=100%, align="center", options="header"] +[cols="1, 3, 1, 7a", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | STATUS | int32 | Return Status Code -[cols="6,5"] +| Word +| Name +| Type +| Description + +| 0 +| STATUS +| int32 +| Return error code +[cols="7,5a", options="header"] !=== -! *Error Code* ! *Description* -! RPMI_SUCCESS ! Service completed successfully. -! RPMI_ERROR_INVALID_PARAMETER ! Invalid HART_ID. +! Error Code +! Description + +! RPMI_SUCCESS +! Service completed successfully. + +! RPMI_ERR_INVALID_PARAM +! `SUSPEND_TYPE` is invalid. !=== - Other errors <> -| 1 | HART_STATE | uint32 | Hart state value + -Refer to https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/src/ext-hsm.adoc#table_hsm_states[*HSM Hart States*^] -in the RISC-V SBI Specification cite:[SBI] for the HART_STATE definition. + +| 1 +| FLAGS +| uint32 +| +[cols="1,5a", options="header"] +!=== +! Bits +! Description + +! [31: 1] +! _Reserved_, must be initialized to `0`. + +! [0] +! + 0b0: Counter does not stop if this bit is cleared. + 0b1: Local timer stops when the hart is suspended if this bit is set. +!=== +| 2 +| ENTRY_LATENCY +| uint32 +| Entry latency in microseconds. + +| 3 +| EXIT_LATENCY +| uint32 +| Exit latency in microseconds. + +| 4 +| WAKEUP_LATENCY +| uint32 +| Wakeup latency in microseconds. + +| 5 +| MIN_RESIDENCY +| uint32 +| Minimum residency time in microseconds. |=== -==== Service: *HSM_GET_HART_LIST* -This service gets the list of harts with a specified Hart ID start index. +==== Service: HSM_HART_START (SERVICE_ID: 0x06) +This service is used to start the execution on a hart identified by `HART_ID`. +This service requires a start address which is the physical address from which +the target hart will start execution. Successful completion of this service means +that the hart has started execution from the specified start address. -[#table_hsm_gethartlist_request_data] +[#table_hsm_hartstart_request_data] .Request Data -[cols="1, 2, 1, 7", width=100%, align="center", options="header"] +[cols="1, 3, 1, 7", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | START_INDEX | uint32 | Start index of the Hart ID. +| Word +| Name +| Type +| Description + +| 0 +| HART_ID +| uint32 +| Hart ID of the target hart to be started. + +| 1 +| START_ADDR_LOW +| uint32 +| Lower 32-bit of the start address. + +| 2 +| START_ADDR_HIGH +| uint32 +| Upper 32-bit of the start address. |=== -[#table_hsm_gethartlist_response_data] +[#table_hsm_hartstart_response_data] .Response Data [cols="1, 2, 1, 7a", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | STATUS | int32 | Return Status Code -[cols="6,5"] +| Word +| Name +| Type +| Description + +| 0 +| STATUS +| int32 +| Return error code +[cols="7,5a", options="header"] !=== -! *Error Code* ! *Description* -! RPMI_SUCCESS ! Service completed successfully. -! RPMI_ERROR_INVALID_PARAMETER ! Invalid START_INDEX. +! Error Code +! Description + +! RPMI_SUCCESS +! Service completed successfully and hart has started. + +! RPMI_ERR_INVALID_PARAM +! `HART_ID` or start address is invalid. + +! RPMI_ERR_ALREADY +! Hart is already in transition to start state or has already started. + +! RPMI_ERR_DENIED +! Hart is not in stopped state. + +! RPMI_ERR_HW_FAULT +! Failed due to hardware fault. + !=== - Other errors <> -| 1 | REMAINING | uint32 | Number of remaining items in the list pending to be returned. -| 2 | RETURNED | uint32 | Total number of items returned in this request. -| 3 | HART_ID[0] | uint32 | Hart ID -| 4 | HART_ID[1] | uint32 | Hart ID -| N+2 | HART_ID[N - 1] | uint32 | Hart ID |=== -==== Service: *HSM_GET_SUSPEND_TYPES* -This service gets a list of all supported suspend types. The suspend types in -the list must be ordered based on increasing power savings. +==== Service: HSM_HART_STOP (SERVICE_ID: 0x07) +This service stops the execution on the calling hart. The mechanism for stopping +the hart is platform specific. The hart can be powered down, if supported, or put +into the deepest available sleep state. -[#table_hsm_getsuspendtypes_request_data] +This service returns successful if the platform microcontroller has successfully +acknowledged that the target hart can be stopped. 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. + +Once the hart is stopped, it can only be restarted by explicitly invoking the +`HSM_HART_START` service call explicitly by any other hart. + +[#table_hsm_hartstop_request_data] .Request Data -[cols="1, 3, 1, 7", width=100%, align="center", options="header"] +[cols="1, 2, 1, 7", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | START_INDEX | uint32 | Start index of the Hart ID. + -`0` for the first call, subsequent calls will use the next index of the remaining -items. +| Word +| Name +| Type +| Description + +| 0 +| HART_ID +| uint32 +| Hart ID of the calling hart. |=== -[#table_hsm_getsuspendtypes_response_data] +[#table_hsm_hartstop_response_data] .Response Data -[cols="1, 3, 1, 7a", width=100%, align="center", options="header"] +[cols="1, 2, 1, 7a", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | STATUS | int32 | Return Status Code -[cols="7,5"] +| Word +| Name +| Type +| Description + +| 0 +| STATUS +| int32 +| Return error code +[cols="6,5a"] !=== -! *Error Code* ! *Description* -! RPMI_SUCCESS ! Service completed successfully. -! RPMI_ERROR_INVALID_PARAMETER ! Invalid START_INDEX. +! Error Code +! Description + +! RPMI_SUCCESS +! Service completed successfully and hart is stopped. + +! RPMI_ERR_ALREADY +! Hart is already in transition to stop state or has already stopped. + +! RPMI_ERR_DENIED +! Hart is not in start state. + +! RPMI_ERR_HW_FAULT +! Failed due to hardware failure. !=== - Other errors <> -| 1 | REMAINING | uint32 | Number of remaining items in the list pending to be returned. -| 2 | RETURNED | uint32 | Total number of items returned in this request. -| 3 | SUSPEND_TYPE[0] | uint32 | Suspend type -| 4 | SUSPEND_TYPE[1] | uint32 | Suspend type -| N+2 | SUSPEND_TYPE[N - 1] | uint32 | Suspend type |=== -==== Service: *HSM_GET_SUSPEND_INFO* -This service gets attributes of a suspend type. +==== Service: HSM_HART_SUSPEND (SERVICE_ID: 0x08) +This service is used to put a hart in a low power suspend state supported by the +platform. Each suspend type is a 32-bit value which is discovered through the +`HSM_GET_SUSPEND_TYPES` service. -[#table_hsm_getsuspendinfo_request_data] +This service returns successful if the platform microcontroller has successfully +acknowledged that the target hart can be put into the requested `SUSPEND_TYPE` +state. The target hart after the successful acknowledgement must enter into a +quiesced state such as WFI which can be detected and allow the platform +microcontroller complete the suspend state transition. The mechanism to detect +the hart quiesced state by the platform microcontroller is platform specific. + +For non-retentive suspend state the hart will resume its execution from the +provided resume address. + +[#table_hsm_hartsuspend_request_data] .Request Data [cols="1, 3, 1, 7", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | SUSPEND_TYPE | uint32 | Suspend type. +| Word +| Name +| Type +| Description + +| 0 +| HART_ID +| uint32 +| Hart ID of the calling hart. + +| 1 +| SUSPEND_TYPE +| uint32 +| Hart suspend type + +| 2 +| RESUME_ADDR_LOW +| uint32 +| Lower 32-bit of the resume address. + +_Only used for non-retentive suspend types._ + +| 3 +| RESUME_ADDR_HIGH +| uint32 +| Upper 32-bit of the resume address. + +_Only used for non-retentive suspend types._ |=== -[#table_hsm_getsuspendinfo_response_data] +[#table_hsm_hartsuspend_response_data] .Response Data -[cols="1, 3, 1, 7a", width=100%, align="center", options="header"] +[cols="1, 2, 1, 7a", width=100%, align="center", options="header"] |=== -| Word | Name | Type | Description -| 0 | STATUS | int32 | Return Status Code -[cols="7,5"] -!=== -! *Error Code* ! *Description* -! RPMI_SUCCESS ! Service completed successfully. -! RPMI_ERROR_INVALID_PARAMETER ! Invalid SUSPEND_TYPE. -!=== -- Other errors <> -| 1 | FLAGS | uint32 | -[cols="2,5a"] +| Word +| Name +| Type +| Description + +| 0 +| STATUS +| int32 +| Return error code +[cols="6,5a"] !=== -! *Bits* ! *Description* -! [31] ! +! Error Code +! Description - 0b0: Counter does not stop if this bit is cleared. - 0b1: Local timer stops when the hart is suspended if this bit is set. -! [30:0] ! _Reserved, must be initialized to_ `0`. +! RPMI_SUCCESS +! Service completed successfully. + +! RPMI_ERR_INVALID_PARAM +! `HART_ID` or `SUSPEND_TYPE` is invalid. !=== -| 2 | ENTRY_LATENCY_US | uint32 | Entry latency in microseconds. -| 3 | EXIT_LATENCY_US | uint32 | Exit latency in microseconds. -| 4 | WAKEUP_LATENCY_US | uint32 | Wakeup latency in microseconds. -| 5 | MIN_RESIDENCY_US | uint32 | Minimum residency latency in -microseconds. +- Other errors <> |=== \ No newline at end of file