This service group defines the services to control CPU performance by managing a set of registers and a dedicated physical memory block, which will define fast channel access to each hart in the system. Hart writes a specific 32-Bit desired performance number in fast channel memory. PuC decodes the request and performs the corresponding CPPC operations.
CPPC physical memory will have enough space to accommodate all available harts. Hart can send an RPMI message GET_CPPC_PERF_CHAN_ADDR to query the physical address of that particular hart.
Once Hart receives the physical address of the REQ-ACK registers, Hart clears the acknowledgement register and writes a performance counter value in the request register and a sequence number in the sequence number register. On observing this request, PuC changes the performance state and writes the sequence number value of the original request in the Acknowledgement register. That completes the request.
PROBE_CPPC_REG service can be used to check if a particular CPPC register is implemented. The service READ_CPPC_REG can be used to read all implemented CPPC register values and WRITE_CPPC_REG can be used to write the registers.
For extra debugging, Hart can send a GET_CPPC_PERF_POKE message to exclusively request PuC to process the pending CPPC requests, if any.
CPPC Fast Channel REQ-ACK Memory Entry per Hart:
Word | Description | Entity which writes the word |
---|---|---|
0 |
Request Sequence Number Register |
AP |
1 |
Request Register |
AP |
2 |
Acknowledgement Register |
PuC |
3 |
Reserved |
None |
Below table lists the services in this group:
Service ID | Service Name | Request Type |
---|---|---|
0x01 |
ENABLE_NOTIFICATION |
NORMAL_REQUEST |
0x02 |
PROBE_REG |
NORMAL_REQUEST |
0x03 |
READ_REG |
NORMAL_REQUEST |
0x04 |
WRITE_REG |
NORMAL_REQUEST |
0x05 |
GET_FAST_CHANNEL_ADDR |
NORMAL_REQUEST |
0x06 |
POKE_FAST_CHANNEL |
NORMAL_REQUEST |
0x07 |
GET_HART_LIST |
NORMAL_REQUEST |
This service allows AP to subscribe to CPPC 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 CPPC 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
|
Probe for CPPC register and get its length in bytes. If the register is not implemented, REG_LENGTH returned will be zero.
Word | Name | Type | Description |
---|---|---|---|
0 |
HART_ID |
uint32 |
Hart ID |
1 |
REG_ID |
uint32 |
Register ID (refer register ids in SBI Spec) |
Word | Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
||||||
1 |
REG_LENGTH |
uint32 |
Register Length |
Read CPPC register value
Word | Name | Type | Description |
---|---|---|---|
0 |
HART_ID |
uint32 |
Hart ID |
1 |
REG_ID |
uint32 |
Register ID (refer register ids in SBI Spec) |
Word | Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
||||||||
1 |
DATA_LOW |
uint32 |
Low |
||||||||
2 |
DATA_HIGH |
uint32 |
High |
Write a CPPC register
Word | Name | Type | Description |
---|---|---|---|
0 |
HART_ID |
uint32 |
Hart ID |
1 |
REG_ID |
uint32 |
Register ID (refer register ids in SBI Spec) |
2 |
DATA_LOW |
uint32 |
Low |
3 |
DATA_HIGH |
uint32 |
High |
Word | Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
Request for physical address of CPPC fast channel for the hart ID specified, this physical address shall be used to write the value of CPPC Desired Performance Register.
Word | Name | Type | Description |
---|---|---|---|
0 |
HART_ID |
uint32 |
Hart ID |
Word | Name | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
||||||||
1 |
FLAGS |
uint32 |
|
||||||||
2 |
PHYS_ADDR_LOW |
uint32 |
Low |
||||||||
3 |
PHYS_ADDR_HIGH |
uint32 |
High |
||||||||
4 |
DB_ADDR_LOW |
uint32 |
Low |
||||||||
5 |
DB_ADDR_HIGH |
uint32 |
High |
||||||||
6 |
DB_ID_LOW |
uint32 |
Low |
||||||||
7 |
DB_ID_HIGH |
uint32 |
High |
Debug request message to poke the PuC FW to process the pending CPPC messages if any.
-
NA
Word | Name | Type | Description | ||||
---|---|---|---|---|---|---|---|
0 |
STATUS |
int32 |
Return Status Code
|
This service gets the list of a hart 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 |
Remaining number of items 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 |