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

Update the error codes and move the shmem firmware section #43

Merged
merged 2 commits into from
Sep 4, 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
122 changes: 89 additions & 33 deletions src/message-protocol.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ endif::rootpath[]

== Message Protocol
The RPMI protocol defines the message format and different messages
for system management and control tasks. A message is called a *Service* if its
for system management and control tasks. A message is called a Service if its
designated to perform a specific task. Multiple similar services are grouped
logically into a *Service Group* like Clock, Voltage, Power management, etc.
logically into a Service Group like Clock, Voltage, Perf Management, etc.
A service call results in a request message being sent on a transport
channel from the application processor to the platform microcontroller or
vice-versa. If the request has an associated response, the platform
Expand All @@ -33,7 +33,7 @@ application processor to the platform microcontroller does not require a
response message. If a request message has an associated acknowledgement message
then it is called a NORMAL REQUEST otherwise it is called a POSTED REQUEST.

The Aknowledgement message indicates the status of the request message after it
The Acknowledgement message indicates the status of the request message after it
has been processed by the platform microcontroller.
The acknowledgement messages may also contain additional data depending on the
defined service.
Expand Down Expand Up @@ -245,19 +245,30 @@ image::event-header.png[800,800, align="center"]
.Event Format
[cols="3,2,7a", width=100%, align="center", options="header"]
|===
| Word | Name | Description
| 0 | *EVENT_HDR* | `32-bit` field represents a single event.
[cols="1,7a"]
| Word
| Name
| Description

| 0
| EVENT_HDR
| `32-bit` field represents a single event.
[cols="1,7a", options="header"]
!===
! *Bits* ! *Description*
! Bits
! Description

! [31:24] ! _Reserved, must be initialized to_ `0`.
! [23:16] ! *EVENT_ID* +
! [23:16] ! EVENT_ID +
Unique identifier for an event in a service group.

! [15:0] ! *EVENT_DATALEN* +
! [15:0]
! EVENT_DATALEN +
`16-bit` field to store event data size in bytes.
!===
| 1 : (*EVENT_DATALEN/4*) | *EVENT_DATA* | Event Data

| 1 : (EVENT_DATALEN/4)
| EVENT_DATA
| Event Data
|===

The table above shows the format for an event and its data. Subsequent events
Expand All @@ -266,33 +277,78 @@ packing of multiple events and its implementation defined.

=== Return Error Codes
The following table lists all the error codes that can be returned by a service
in the `STATUS` field of the acknowledgement message.
in the `STATUS` field of the acknowledgement message. The `STATUS` field returns
`0` on success otherwise a negative `32-bit` integer to indicate a error
condition.

[#table_error_codes]
.Return Status Codes
.Return Error Codes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we change this, all these below need to be changed as well.

image

Copy link
Collaborator Author

@pathakraul pathakraul Sep 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, i was thinking to raise separate PRs for those, since we already need to update the error code names in all tables in each service

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can update the CLOCK to RAS service groups, i will update rest

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, i will update CLOCK and RAS

[cols="4, 2, 6", width=100%, align="center", options="header"]
|===
| Name | Status Code | Description
| RPMI_SUCCESS | 0 | Service has been completed successfully
| 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
invalid
| RPMI_ERROR_DENIED | -4 | Requested operation denied due to
insufficient permissions or failed dependency check
| RPMI_ERROR_NOT_FOUND | -5 | Requested resource not found
| RPMI_ERROR_OUT_OF_RANGE | -6 | Index out of range
| RPMI_ERROR_OUT_OF_RESOURCE | -7 | Resource limit reached
| RPMI_ERROR_HW_FAULT | -8 | Operation failed due to hardware fault.
| RPMI_ERROR_BUSY | -9 | System is currently busy and cannot
respond to requests
| RPMI_ERROR_TIMEOUT | -10 | Operation timed out
| RPMI_ERROR_COMMS | -11 | Error in communication
| RPMI_ERROR_ALREADY | -12 | Operation already in progress or state
| Name
| Error Code
| Description

| RPMI_SUCCESS
| 0
| Service has been completed successfully

| RPMI_ERR_FAILED
| -1
| Failed due to general error.

| RPMI_ERR_NOT_SUPPORTED
| -2
| Service or feature not supported

| RPMI_ERR_INVALID_PARAM
| -3
| One or more parameters passed are invalid

| RPMI_ERR_DENIED
| -4
| Requested operation denied due to insufficient permissions or failed
dependency check.

| RPMI_ERR_INVALID_ADDR
| -5
| One or more addresses are invalid.

| RPMI_ERR_ALREADY
| -6
| Operation already in progress or state
changed already for which the operation was performed.
| RPMI_ERROR_EXTENSION | -13 | Error in extension implementation that
violates the extension specification or the extension version mismatch
| | -14 to -127 | Reserved
| | > -127 | Vendor specific

| RPMI_ERR_EXTENSION
| -7
| Error in extension implementation that
violates the extension specification or the extension version mismatch.

| RPMI_ERR_HW_FAULT
| -8
| Failed due to hardware fault.

| RPMI_ERR_BUSY
| -9
| Service cannot be completed due to system or device is busy.

| RPMI_ERR_INVALID_STATE
| -10
| Invalid state

| RPMI_ERR_BAD_RANGE
| -11
| Index out of range

| RPMI_ERR_TIMEOUT
| -12
| Failed due to timeout

| RPMI_ERR_IO
| -13
| Input/Output error.

| | -14 to -127 | _Reserved_
| | > -127 | _Vendor specific_
|===

2 changes: 1 addition & 1 deletion src/transport.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ The slot size of `64-byte` is also sufficient to accommodate most of the defined
RPMI services.
====

=== Shared Memory Representation in Firmware
==== Shared Memory Representation in Firmware
The queue `slot-size` and queue shared memory region `base-address` and `size`
in bytes can be discovered through supported hardware description mechanism.

Expand Down
Loading