Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve spec perf #50

Merged
merged 4 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 80 additions & 32 deletions src/srvgrp-clock.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,9 @@ The topology of the devices and the clock source is dependent on how the system
is designed and implementation specific. The OS can discover this topology
through supported hardware description mechanisms.

*Clock Rate Format*::
Each clock rate is a array of two 32-bit values `(uint32, uint32)` represented
as `(clock_rate_low, clock_rate_high)` and packed in the same order where
`clock_rate_low` is at the lower index than the `clock_rate_high`.

*Clock Rate Structure*::
[#table_clock_rate_format]
.Clock Rate Structure
[cols="1,1,5" width=100%, align="center"]
|===
3+| *Discrete Format*
| *Word* | *Name* | *Description*
| 0 | rate_lower | Lower 32-bit clock rate in Hz.
| 1 | rate_upper | Upper 32-bit clock rate in Hz.
3+|
3+| *Linear Format*
| *Word* | *Name* | *Description*
| 0 | min_lower | Lower 32-bit of the lowest clock rate in Hz.
| 1 | min_upper | Upper 32-bit of the lowest clock rate in Hz.
| 2 | max_lower | Lower 32-bit of the highest clock rate in Hz.
| 3 | max_upper | Upper 32-bit of the highest clock rate in Hz.
| 4 | step_lower | Lower 32-bit of the step between two successive rates in Hz.
| 5 | step_upper | Upper 32-bit of the step between two successive rates in Hz.
|===

Below table lists the services in this group:
The following table lists the services in the CLOCK service group:

[#table_clock_services]
.CLOCK Services
[cols="1, 3, 2", width=100%, align="center", options="header"]
Expand Down Expand Up @@ -93,6 +70,70 @@ Below table lists the services in this group:
| NORMAL_REQUEST
|===

Clock Rate Representation::
Each clock rate is a array of two 32-bit values `(uint32, uint32)` represented
as `(clock_rate_low, clock_rate_high)` and packed in the same order where
`clock_rate_low` is at the lower index than the `clock_rate_high`.

[#clock-rate-format-section]
Clock Rate Format::

* Discrete Clock Format

The following table shows the structure of the Discrete clock format.

.Discrete Clock Format Structure
[cols="1,2,5" width=100%, align="center", options="header"]
|===
| Word
| Name
| Description

| 0
| CLOCK_RATE_LOW
| Lower 32-bit clock rate in Hz.

| 1
| CLOCK_RATE_HIGH
| Upper 32-bit clock rate in Hz.
|===

* Linear Clock Format

The following table shows the structure of the Linear clock format.

.Linear Clock Format Structure
[cols="1,3,5" width=100%, align="center", options="header"]
|===
| Word
| Name
| Description

| 0
| MIN_CLOCK_RATE_LOW
| Lower 32-bit of the lowest clock rate in Hz.

| 1
| MIN_CLOCK_RATE_HIGH
| Upper 32-bit of the lowest clock rate in Hz.

| 2
| MAX_CLOCK_RATE_LOW
| Lower 32-bit of the highest clock rate in Hz.

| 3
| MAX_CLOCK_RATE_HIGH
| Upper 32-bit of the highest clock rate in Hz.

| 4
| STEP_LOW
| Lower 32-bit of the step between two successive rates in Hz.

| 5
| STEP_HIGH
| Upper 32-bit of the step between two successive rates in Hz.
|===

[#clock-notifications]
==== Notifications
This service group does not support any event for notification.
Expand Down Expand Up @@ -140,7 +181,7 @@ described in <<clock-notifications>>.
! Description

! RPMI_SUCCESS
! Notification is subscribed successfully.
! Event is subscribed successfully.

! RPMI_ERR_INVALID_PARAM
! `EVENT_ID` is invalid.
Expand All @@ -158,7 +199,10 @@ called CLOCK_ID. CLOCK_ID are sequential starting from `0`.

[#table_clock_getnumclocks_request_data]
.Request Data
- NA
[cols="1", width=100%, align="center", options="header"]
|===
| NA
|===

[#table_clock_getnumclocks_response_data]
.Response Data
Expand Down Expand Up @@ -256,7 +300,9 @@ the future, as needed.
! Bits
! Description

! [31:30] ! CLOCK_FORMAT (Refer to <<table_clock_rate_format>>)
! [31:30] ! CLOCK_FORMAT

Refer to <<clock-rate-format-section, Clock Rate Format>> for more details.
----
0b00: Discrete Format
0b01: Linear Range
Expand Down Expand Up @@ -371,11 +417,13 @@ RETURNED field will be set to `3`.
| 4
| CLOCK_RATE[N]
| uint32[2]
| Clock rate. (Refer to <<table_clock_rate_format>>)
| Clock rate.

Refer to <<clock-rate-format-section, Clock Rate Format>> for more details.
|===

==== Service: CLK_SET_CONFIG (SERVICE_ID: 0x05)
Set clock config, enable or disable the clock.
This service is used to configure a clock device.

[#table_clock_setconfig_request_data]
.Request Data
Expand All @@ -402,7 +450,7 @@ Set clock config, enable or disable the clock.
! Description

! [31:1] ! _Reserved_ and must be `0`.
! [0] !
! [0] ! Disable/enable clock.

0b0: Disable clock
0b1: Enable clock
Expand Down Expand Up @@ -440,7 +488,7 @@ Set clock config, enable or disable the clock.


==== Service: CLK_GET_CONFIG (SERVICE_ID: 0x06)
Get the current status of a clock, if it's enabled or disabled.
This serivce is used to get the configuration of a clock device.

[#table_clock_getconfig_request_data]
.Request Data
Expand Down
5 changes: 4 additions & 1 deletion src/srvgrp-device-power.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ the actual number of domains present with the platform.

[#table_devpower_getdomains_request_data]
.Request Data
- NA
[cols="1", width=100%, align="center", options="header"]
|===
| NA
|===

[#table_devpower_getdomains_response_data]
.Response Data
Expand Down
5 changes: 4 additions & 1 deletion src/srvgrp-management.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,10 @@ This service returns the version of a Management Mode.

[#table_mm_version_request_data]
.Request Data
- NA
[cols="1", width=100%, align="center", options="header"]
|===
| NA
|===

[#table_mm_version_response_data]
.Response Data
Expand Down
Loading
Loading