The Hart State Management (HSM) service group defines a set of Hart states and functionality equivalent to the RISC-V SBI HSM extension.
Below table lists the services in this group:
Service ID | Service Name | Request Type |
---|---|---|
0x01 |
ENABLE_NOTIFICATION |
NORMAL_REQUEST |
0x02 |
HART_START |
NORMAL_REQUEST |
0x03 |
HART_STOP |
NORMAL_REQUEST |
0x04 |
HART_SUSPEND |
NORMAL_REQUEST |
0x05 |
GET_HART_STATUS |
NORMAL_REQUEST |
0x06 |
GET_HART_LIST |
NORMAL_REQUEST |
0x07 |
GET_SUSPEND_TYPES |
NORMAL_REQUEST |
0x08 |
GET_SUSPEND_INFO |
NORMAL_REQUEST |
This service allows AP to subscribe to system reset service group notifications. Platform can optionally support notifications of events which might occur in the platform. PuC can send these notification messages to AP if they are implemented and AP has subscribed to these. Events supported are described above in Hart State Management Notifications.
Word | Name | Type | Description |
---|---|---|---|
0 |
EVENT_ID |
uint32 |
Event to be subscribed for notification. |
Word | Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
This service helps start (or power up) a hart with a specified hart-id. Successful completion of this service means that hart with specified hart-id has started execution from the provided 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 hart with specified hart-id does not exist. Implementation should return proper error code in the status field accordingly.
Word | Name | Type | Description |
---|---|---|---|
0 |
HART_ID |
uint32 |
Hart ID of the hart to be started. |
1 |
START_ADDR_LOW |
uint32 |
Lower |
2 |
START_ADDR_HIGH |
uint32 |
Higher |
Word | Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
This service stops the calling hart. Mechanism to stop the hart is platform specific. Hart can be powered down if supported or it can be put into a deepest sleep state supported. Platform must acknowledge that hart can be stopped and return success. Application Processor must execute WFI upon successful acknowledgement. Platform then proceeds to stop the hart. Detecting the WFI state from PuC is implementation defined. Once the hart is stopped it can only be started using an explicit HART_START service call from the application processor.
Word | Name | Type | Description |
---|---|---|---|
0 |
HART_ID |
uint32 |
Hart ID of the calling hart. |
Word | Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
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.
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 Extension[[TODO LINK HERE]] |
2 |
RESUME_ADDR_LOW |
uint32 |
Lower |
3 |
RESUME_ADDR_HIGH |
uint32 |
Higher |
Word | Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
This service gets the running status of a Hart.
Word | Name | Type | Description |
---|---|---|---|
0 |
HART_ID |
uint32 |
Hart ID. |
Word | Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
||||||||||||||||
1 |
HART_STATUS |
uint32 |
Hart status values
|
This service gets the list of harts with a specified Hart ID start index
Word | Name | Type | Description |
---|---|---|---|
0 |
START_INDEX |
uint32 |
Starting index of Hart ID. |
Word | Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
||||||
1 |
REMAINING |
uint32 |
Number of remaining items in the list pending to be returned. |
||||||
2 |
RETURNED |
uint32 |
Total number of items returned so far. |
||||||
3 |
HART_ID[0] |
uint32 |
HART_ID |
||||||
4 |
HART_ID[1] |
uint32 |
HART_ID |
||||||
5 |
HART_ID[N - 1] |
uint32 |
HART_ID |
This service gets a list of all supported suspend types. The system types in the list must be ordered based on increasing power savings.
Word | Name | Type | Description |
---|---|---|---|
0 |
START_INDEX |
uint32 |
Starting index of Hart ID list. |
Word | Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
||||||
1 |
REMAINING |
uint32 |
Number of remaining items in the list pending to be returned. |
||||||
2 |
RETURNED |
uint32 |
Total number of items returned so far. |
||||||
3 |
SUSPEND_TYPE[0] |
uint32 |
Suspend Type |
||||||
4 |
SUSPEND_TYPE[1] |
uint32 |
Suspend Type |
||||||
5 |
SUSPEND_TYPE[N - 1] |
uint32 |
Suspend Type |
Get attributes of a suspend type.
Word | Name | Type | Description |
---|---|---|---|
0 |
SUSPEND_TYPE |
uint32 |
Suspend type. |
Word | Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
||||||
1 |
FLAGS |
uint32 |
|
||||||
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. |