Skip to content

Commit

Permalink
Merge pull request #55 from lftan/spec-update
Browse files Browse the repository at this point in the history
Spec update
  • Loading branch information
pathakraul authored Sep 7, 2024
2 parents 784c6af + d13cebf commit 0febcc0
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 75 deletions.
4 changes: 4 additions & 0 deletions src/rpmi.bib
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ @electronic{DT
title = {DeviceTree},
url = {https://www.devicetree.org/}
}
@electronic{libRPMI,
title = {libRPMI},
url = {https://github.com/riscv-software-src/librpmi}
}
2 changes: 1 addition & 1 deletion src/srvgrp-base.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The following table lists the services in the BASE service group:
| Name

| 0x0
| libRPMI
| libRPMI cite:[libRPMI]
|===

[#base-notifications]
Expand Down
10 changes: 6 additions & 4 deletions src/srvgrp-clock.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -298,20 +298,22 @@ the future, as needed.
! Bits
! Description

! [31:30] ! CLOCK_FORMAT
! [31:2] ! _Reserved_ and must be `0`.

! [1:0] ! CLOCK_FORMAT

Refer to <<clock-rate-format-section>> for more details.
----
0b00: Discrete Format
0b01: Linear Range
----

! [29:0] ! _Reserved_ and must be `0`.
!===

| 2
| NUM_RATES
| uint32
| Number of clock rates depending on CLOCK_FORMAT.
| Number of clock rates.

| 3
| TRANSITION_LATENCY
Expand All @@ -321,7 +323,7 @@ Refer to <<clock-rate-format-section>> for more details.
| 4:7
| CLOCK_NAME
| uint8[16]
| Clock name
| Clock name, a NULL-terminated ASCII string up to 16-bytes.
|===

==== Service: CLK_GET_SUPPORTED_RATES (SERVICE_ID: 0x04)
Expand Down
14 changes: 2 additions & 12 deletions src/srvgrp-cppc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -668,17 +668,7 @@ may need to call this service again with the appropriate `START_INDEX` until the
| Number of Hart IDs returned in this request.

| 3
| HART_ID[0]
| HART_ID[N]
| uint32
| Hart ID

| 4
| HART_ID[1]
| uint32
| Hart ID

| N+2
| HART_ID[N-1]
| uint32
| Hart ID
| Hart IDs
|===
16 changes: 8 additions & 8 deletions src/srvgrp-device-power.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,16 @@ encoding for the power state.
| Name
| Description

| [31]
| CONTEX
| [31:17]
| RESERVED
| _Reserved_ and must be `0`.

| [16]
| CONTEXT
|
0b0: Context is preserved
0b1: Context is lost

| [30:16]
| RESERVED
| _Reserved_ and must be `0`.

| [15:0]
| VALUE
|
Expand All @@ -95,7 +95,7 @@ encoding for the power state.
! Description

! 0x0000
! ON with POWER_STATE[31] = 0
! ON with POWER_STATE[16] = 0

! 0x0001
! _Reserved_ and must be `0`.
Expand All @@ -104,7 +104,7 @@ encoding for the power state.
! _Reserved_ and must be `0`.

! 0x0003
! OFF with POWER_STATE[31] = 1
! OFF with POWER_STATE[16] = 1

! 0x0004 - 0x0FFF
! _Reserved_ and must be `0`.
Expand Down
45 changes: 14 additions & 31 deletions src/srvgrp-hart-state-management.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ The following table lists the services in the HSM service group:

|===

[#section-hart-states]
==== 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
Expand All @@ -75,9 +76,11 @@ 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
[#section-hart-suspend-types]
==== Hart Suspend Types
The RPMI supports the hart suspend types encoding as defined in
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_hart_suspend_types[*HSM Suspend Types*^]. The values for the
platform supported suspend types are discovered through a service defined in
this service group.

Expand Down Expand Up @@ -190,7 +193,7 @@ set in `STATUS` field.

| 1
| HART_STATE
| uint32 | Hart HSM state
| uint32 | Hart state. See <<section-hart-states>> for more details.
|===

==== Service: HSM_GET_HART_LIST (SERVICE_ID: 0x03)
Expand Down Expand Up @@ -255,19 +258,9 @@ may need to call this service again with the appropriate `START_INDEX` until the
| 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
| HART_ID[N]
| uint32
| Hart IDs
|===

==== Service: HSM_GET_SUSPEND_TYPES (SERVICE_ID: 0x04)
Expand Down Expand Up @@ -338,19 +331,9 @@ items.
| 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]
| SUSPEND_TYPE[N]
| uint32
| Suspend type
| Suspend types. See <<section-hart-suspend-types>> for more details.
|===

==== Service: HSM_GET_SUSPEND_INFO (SERVICE_ID: 0x05)
Expand All @@ -368,7 +351,7 @@ This service is used to get the attributes of a suspend type.
| 0
| SUSPEND_TYPE
| uint32
| Suspend type.
| Suspend type. See <<section-hart-suspend-types>> for more details.
|===

[#table_hsm_getsuspendinfo_response_data]
Expand Down Expand Up @@ -598,7 +581,7 @@ provided resume address.
| 1
| SUSPEND_TYPE
| uint32
| Hart suspend type
| Suspend type. See <<section-hart-suspend-types>> for more details.

| 2
| RESUME_ADDR_LOW
Expand Down
18 changes: 9 additions & 9 deletions src/srvgrp-performance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,9 @@ level.
! Bits
! Description

! [31]
! [31:11] ! _Reserved_ and must be `0`.

! [10]
! PERF_LIMIT_SETTING

This attribute indicates whether the platform allows software to set the
Expand All @@ -376,7 +378,7 @@ performance limit for a specific performance domain.
0b0: Performance limit change is not allowed.
0b1: Performance limit change is allowed.

! [30]
! [9]
! PERF_LEVEL_SETTING

This attribute indicates whether the platform allows software to set the
Expand All @@ -385,7 +387,7 @@ performance level for a specific performance domain.
0b0: Performance level change is not allowed.
0b1: Performance level change is allowed.

! [29]
! [8]
! FAST_CHANNEL_SUPPORT

This attribute indicates whether the platform supports fast-channel
Expand All @@ -394,13 +396,11 @@ for a specific performance domain.
0b0: Fast-channel is not supported.
0b1: Fast-channel is supported.

! [28:21]
! [7:0]
! NUM_PERF_LEVELS

The total number of supported performance levels.

! [20:0] ! _Reserved_

!===
| 2
| RATE_LIMIT_US
Expand All @@ -427,8 +427,8 @@ performance level based on the system's workload and power constraints.

index = 0;
num = 0;
/* Allocate a buffer based on the value returned from the flags[28:21] */
total_num_levels = perf_domain_attributes.flags[28:21];
/* Allocate a buffer based on the value returned from the flags[7:0] */
total_num_levels = perf_domain_attributes.flags[7:0];

loop:
list = get_domain_opp_list(index, domain_id);
Expand All @@ -450,7 +450,7 @@ loop:
```
The pseudocode above demonstrates the process for retrieving the level
information for a specific performance domain. First, the number of
performance levels is determined by checking the `FLAGS[28:21]` parameter
performance levels is determined by checking the `FLAGS[7:0]` parameter
returned by the `PERF_GET_ATTRIBUTES` service.

The total number of performance levels included in one message must not exceed
Expand Down
6 changes: 3 additions & 3 deletions src/srvgrp-ras-agent.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,14 @@ subsequent byte offset of the remaining bytes.
! Bits
! Description

! [31:4]
! _Reserved_ and must be `0`.

! [3:0]
! Format of the error source descriptor. Value `0` indicates that the error
source descriptor is in GHESv2 format. Rest of the values (1-15) are
implementation specific.

! [31:4]
! _Reserved_ and must be `0`.

!===

| 2
Expand Down
17 changes: 10 additions & 7 deletions src/srvgrp-voltage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ for operation. The number of levels indicates the total count of voltage levels
supported within a voltage domain. Transition latency denotes the maximum time
required for the voltage to stabilize upon a change in the regulator. Depending
on the hardware, voltage levels can be of various formats, and the current
service supports Simple-linear, Multi-linear, and Discrete range formats.
Additional voltage formats can be accommodated in the future if required.
service supports Fixed voltage, Simple-linear, Multi-linear, and Discrete range
formats. Additional voltage formats can be accommodated in the future if required.

[#table_voltage_getdomainattrs_request_data]
.Request Data
Expand Down Expand Up @@ -303,7 +303,10 @@ Additional voltage formats can be accommodated in the future if required.
! Bits
! Description

! [31:29]
! [31:4]
! _Reserved_ and must be `0`.

! [3:1]
! VOLTAGE_FORMAT

Refer to <<voltage-level-format-section>> for more details.
Expand All @@ -314,8 +317,7 @@ Refer to <<voltage-level-format-section>> for more details.
0b011: Discrete range
0b100 - 0b111: Reserved
----
! [28:1]
! _Reserved_ and must be `0`.

! [0]
! ALWAYS_ON

Expand Down Expand Up @@ -581,7 +583,7 @@ This service is used to get the configuration of a voltage domain.


==== Service: VOLT_SET_LEVEL (SERVICE_ID: 0x07)
Set the voltage level in microvolts of a voltage domain.
This service is used to set the voltage level in microvolts of a voltage domain.

[#table_voltage_setdomainlevel_request_data]
.Request Data
Expand Down Expand Up @@ -636,7 +638,8 @@ Set the voltage level in microvolts of a voltage domain.


==== Service: VOLT_GET_LEVEL (SERVICE_ID: 0x08)
Get the current voltage level in microvolts of a voltage domain.
This service is used to get the current voltage level in microvolts of a
voltage domain.

[#table_voltage_getdomainlevel_request_data]
.Request Data
Expand Down

0 comments on commit 0febcc0

Please sign in to comment.