diff --git a/src/message-protocol.adoc b/src/message-protocol.adoc index b0b4eb4..7b28ac8 100644 --- a/src/message-protocol.adoc +++ b/src/message-protocol.adoc @@ -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 @@ -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. @@ -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 @@ -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 [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_ |=== diff --git a/src/transport.adoc b/src/transport.adoc index 6f2be86..8b73f8a 100644 --- a/src/transport.adoc +++ b/src/transport.adoc @@ -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.