-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update RPMI Message Protocol chapter #35
Conversation
@lftan I suggest getting this PR merged first before others since it changes the message format which will affect all service groups |
src/message-protocol.adoc
Outdated
message request being sent to the Platform Microcontroller for a specific | ||
purpose. Each service may have an associated response message which enables the | ||
Platform Microcontroller to provide the status or information for that request. | ||
RPMI message protocol defines the message format and different messages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The RPMI Message Protocol..."
missing 'The'
src/message-protocol.adoc
Outdated
designated to perform a specific task. Multiple similar services are grouped | ||
logically into a *Service Group* like Clock, Voltage, Power management, etc. | ||
A service call results in a request message being sent on a transport | ||
channel from application processor to platform micro-controller or vice-versa. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"channel from the application processor to the Platform Microcontroller or vice-versa."
src/message-protocol.adoc
Outdated
logically into a *Service Group* like Clock, Voltage, Power management, etc. | ||
A service call results in a request message being sent on a transport | ||
channel from application processor to platform micro-controller or vice-versa. | ||
If the request has an associated response, the platform micro-controller after |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we standardize to use "Platform Microcontroller" in other chapters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have done the suggested changes
edfd82c
to
3af2531
Compare
src/message-protocol.adoc
Outdated
|
||
Not every request message needs an acknowledgement due the the nature of the | ||
action requested by the application processor when taken by the platform | ||
microcontroller may leave the application processor in a state where it cannot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change to "Platform Microcontroller", can u search all in this adoc? Got 4 places need to update this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also for "Application Processor".
Other adoc files use "Application Processor" instead of 'application processor'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not expecting having first letter in caps in between the sentence for these names. Its will look odd, since these are not acronyms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other chapters use these now. I am ok if not use capital letter for the first letter, just need to standardize for all.
Can have another commit to update them.
src/message-protocol.adoc
Outdated
to any previous message request. Acknowledgment is dependent on the service and | ||
each service dictates if acknowledgment is mandatory or not. | ||
Messages which carry the status of the request message after its been processed | ||
successfully. Acknowledgement message may also carry the additional data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The Acknowledgement message ..."
src/message-protocol.adoc
Outdated
acknowledgment must follow byte ordering defined by the RPMI transport. | ||
Size of message header is fixed, but size of data is implementation defined, | ||
based on the transport queues layout. All fields message must follow byte | ||
ordering defined by the RPMI transport. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All message fields must follow the byte order defined by the RPMI transport.
Message header has a fixed size of `12-byte` which further contains three | ||
fields each of `4-byte`. Each message gets a unique identity in an RPMI instance | ||
through its header. | ||
image::message-format.png[700,900] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Figure title.
src/message-protocol.adoc
Outdated
|
||
Both REQUEST and ACKNOWLEDGEMENT messages have the same message format. | ||
==== Message layout tables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Message Layout Tables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use capital letter for first character of each word for section title
src/message-protocol.adoc
Outdated
|
||
image::message-format.png[700,900] | ||
[#table_message_layout_table_example] | ||
.Message layout table example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Message Layout Table Example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use capital letter for first character of each word for table title.
src/message-protocol.adoc
Outdated
Both REQUEST and ACKNOWLEDGEMENT messages have the same message format. | ||
==== Message layout tables | ||
Message layout which includes header and data is represented in the form of | ||
tables like below. Some columns mentioned below may be omitted from some of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"..... tables as shown below."
src/message-protocol.adoc
Outdated
|
||
Both REQUEST and ACKNOWLEDGEMENT messages have the same message format. | ||
==== Message layout tables | ||
Message layout which includes header and data is represented in the form of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The message layout ..."
src/message-protocol.adoc
Outdated
|
||
| Every message is indexed with *Word* starting from `0` and each index | ||
represents a `4-byte` portion of a message. | ||
| Name of a `4-byte` size portion of a message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have Name for a struct, so need change description here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont understand this comment
src/message-protocol.adoc
Outdated
|=== | ||
|
||
==== Message Header | ||
Message header of `8-byte` has a fixed layout which consists of multiple fields. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can change to :
The 8-byte message header has a fixed layout composed of multiple fields. Each message is uniquely identified within an RPMI instance by its header.
src/message-protocol.adoc
Outdated
|
||
FLAGS[3]: DOORBELL | ||
0b0: Doorbell interrupt enabled. | ||
0b1: Doorbell interrupt disabled. PuC will not ring the doorbell to AP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PuC will not ring the doorbell to the AP.
src/message-protocol.adoc
Outdated
`FLAGS` with notification `MESSAGE_TYPE` marked. Notification messages do not | ||
require any acknowledgement and how data from notification messages is utilized | ||
is dependent on the implementation. | ||
In case of normal request which require acknowledgement, platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"In the case of normal ...."
src/message-protocol.adoc
Outdated
require any acknowledgement and how data from notification messages is utilized | ||
is dependent on the implementation. | ||
In case of normal request which require acknowledgement, platform | ||
microcontroller must preserve the `TOKEN`, `SERVICEGROUP_ID`, `SERVICE_ID` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the Platform Microcontroller"
src/message-protocol.adoc
Outdated
is dependent on the implementation. | ||
In case of normal request which require acknowledgement, platform | ||
microcontroller must preserve the `TOKEN`, `SERVICEGROUP_ID`, `SERVICE_ID` | ||
from the request message header and use these fields in acknowledgement message |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" ... in the acknowledgement message ...."
src/message-protocol.adoc
Outdated
In case of normal request which require acknowledgement, platform | ||
microcontroller must preserve the `TOKEN`, `SERVICEGROUP_ID`, `SERVICE_ID` | ||
from the request message header and use these fields in acknowledgement message | ||
header. Platform microcontroller must mark the message type as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The Platform Microcontroller ....."
src/message-protocol.adoc
Outdated
In case of normal request which require acknowledgement, platform | ||
microcontroller must preserve the `TOKEN`, `SERVICEGROUP_ID`, `SERVICE_ID` | ||
from the request message header and use these fields in acknowledgement message | ||
header. Platform microcontroller must mark the message type as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change 'mark' to 'set' is better
src/message-protocol.adoc
Outdated
from the request message header and use these fields in acknowledgement message | ||
header. Platform microcontroller must mark the message type as | ||
`ACKNOWLEDGEMENT` in the `FLAGS` and update the `DATALEN` depending on the | ||
data supported by that acknowledgement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
".... this acknowledgement."
header. Platform microcontroller must mark the message type as | ||
`ACKNOWLEDGEMENT` in the `FLAGS` and update the `DATALEN` depending on the | ||
data supported by that acknowledgement. | ||
In case of notification, the platform microcontroller will generate the `TOKEN` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"In the case of a notification, ..."
src/message-protocol.adoc
Outdated
In case of notification, the platform microcontroller will generate the `TOKEN` | ||
and set the `SERVICEGROUP_ID` and fixed `SERVICE_ID=0x00` assigned for each | ||
notification message in each service group and set the | ||
`FLAGS` with message type as `NOTIFICATION`. Notification messages do not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" ... with the message type"
src/message-protocol.adoc
Outdated
|
||
==== Message Data | ||
Request message data format and acknowledgement data format depends on each | ||
Message data for any message type if present must be multiple of `4-byte`. Each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"... must be a multiple of 4-bytes."
src/message-protocol.adoc
Outdated
|
||
==== Message Data | ||
Request message data format and acknowledgement data format depends on each | ||
Message data for any message type if present must be multiple of `4-byte`. Each | ||
of that `4-byte` portion is called a *Word*. + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Each of these 4-bytes .... "
src/message-protocol.adoc
Outdated
Request message data format and acknowledgement data format depends on each | ||
Message data for any message type if present must be multiple of `4-byte`. Each | ||
of that `4-byte` portion is called a *Word*. + | ||
Data format for request and acknowledgement message depends on each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The data format for the request and .."
src/message-protocol.adoc
Outdated
|
||
Message data formats in this specification are tabulated with a list of `32 bits` | ||
wide Word in each of the service groups section as depicted below. | ||
respective service groups. Maximum size of data each message can accommodate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The maximum size .."
src/message-protocol.adoc
Outdated
.Return Status Codes | ||
[cols="4, 2, 6", width=100%, align="center", options="header"] | ||
|=== | ||
| Name | Status Code | Description | ||
| RPMI_SUCCESS | 0 | Successful operation | ||
| RPMI_SUCCESS | 0 | Successful operation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary change
src/message-protocol.adoc
Outdated
Apart from status code, an acknowledgement may encode more data as response to | ||
the request message and details are subsequently present in each service section | ||
below. | ||
Acknowledgement message data contains `32-bit` STATUS code which represents the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STATUS
, so that align with STATUS in line 169
src/message-protocol.adoc
Outdated
notification messages. Notification message will only be sent for events which | ||
the application processor has subscribed. When there are multiple events | ||
supported in each service group, the application processor has to subscribe to | ||
each event individually through reserved enable notification service in each |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think " reserved enable notification service" can be changed to "_ENABLE_NOTIFICATION" service"
src/message-protocol.adoc
Outdated
|
||
[#img-notification-format] | ||
.Notification Format | ||
image::notification-format.png[500,600] | ||
|
||
==== Events | ||
Event consists of header containing two fields to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An event consists of a header containing two fields to identify an event:
src/message-protocol.adoc
Outdated
The number of events which can be accommodated in the message data depends on | ||
the message data field size. The `DATALEN` field in the message header | ||
represents the data size in bytes present in the message which is the aggregate | ||
of all events size. Then the application processor must parse each event and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The Application Processor must then parse each .... "
src/message-protocol.adoc
Outdated
of all events size. Then the application processor must parse each event and | ||
its data according to the event header. | ||
|
||
Event data and its format are specific to each service group and details are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Event data and its format are specific to each service group, and details are provided in the respective
Service Group sections.
images/event-header.png
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can add "EVENT_HDR" for Word 0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"EVENT_DATALEN-byte" here means in byte, rights?
If yes, then change to "EVENT_DATALEN (bytes)" is better.
src/message-protocol.adoc
Outdated
!=== | ||
| 1 : (*EVENT_DATALEN* - 1) | *EVENT_DATA* | Event Data | ||
| 1:(*EVENT_DATALEN/4*) | *EVENT_DATA* | Event Data | ||
|=== | ||
|
||
Above table represents the format for one event with its data. Subsequent events |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The table above shows ....."
src/message-protocol.adoc
Outdated
!=== | ||
| 1 : (*EVENT_DATALEN* - 1) | *EVENT_DATA* | Event Data | ||
| 1:(*EVENT_DATALEN/4*) | *EVENT_DATA* | Event Data | ||
|=== | ||
|
||
Above table represents the format for one event with its data. Subsequent events | ||
will be packed in the same manner. This spec does not define any ordering of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"This specification ....."
src/message-protocol.adoc
Outdated
probable error codes for each service are also provided in each service response | ||
message format. AP must check for each error code and action based on that is | ||
dependent on the AP. | ||
Below table lists all the error codes which can be returned by any service in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The following table lists .... "
src/message-protocol.adoc
Outdated
|
||
[#table_error_codes] | ||
[#table_rpmi_error_codes] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change breaks the reference link from all the services.
.Return Status Codes | ||
[cols="4, 2, 6", width=100%, align="center", options="header"] | ||
|=== | ||
| Name | Status Code | Description | ||
| RPMI_SUCCESS | 0 | Successful operation | ||
| RPMI_SUCCESS | 0 | Successful operation | ||
| RPMI_ERROR_FAILED | -1 | Failed due to general error | ||
| RPMI_ERROR_NOT_SUPPORTED | -2 | Service or feature not supported | ||
| RPMI_ERROR_INVALID_PARAMETER | -3 | One or more parameters passed are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, we can use ChatGPT to check the grammar or fine-tune any sentence. You can try. :)
or can use this website: https://www.deepl.com/en/write
images/message-format.png
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, DATALEN (bytes)
a06b0c8
to
a0acb19
Compare
src/message-protocol.adoc
Outdated
dependent on the AP. | ||
=== Return Error Codes | ||
The table below lists all the error codes that can be returned by any service | ||
in the in the `STATUS' word of the acknowledgement message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after generating pdf doc, it shows word `STATUS'.
Should be STATUS
, should be "`".
a0acb19
to
a85d6e6
Compare
Signed-off-by: Rahul Pathak <[email protected]>
a85d6e6
to
96c3d48
Compare
This PR contains improvements to message protocol chapter.