generated from riscv/docs-spec-template
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Define request forward service group #63
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,252 @@ | ||
:path: src/ | ||
:imagesdir: ../images | ||
|
||
ifdef::rootpath[] | ||
:imagesdir: {rootpath}{path}{imagesdir} | ||
endif::rootpath[] | ||
|
||
ifndef::rootpath[] | ||
:rootpath: ./../ | ||
endif::rootpath[] | ||
|
||
=== Service Group - REQUEST_FORWARD (SERVICEGROUP_ID: 0x000C) | ||
The REQUEST_FORWARD service group allows application processors to retrieve and | ||
process RPMI request messages which are forwarded by platform microcontroller from | ||
some other RPMI client. This service group also allows an SBI implementation to | ||
forward RPMI request messages from one system-level partition (or domain) to another | ||
using the SBI MPXY extension cite:[SBI]. | ||
|
||
The platform microcontroller (or SBI implementation) should maintain a first-in | ||
first-out queue of forwarded RPMI request messages. The first (or oldest) forwarded | ||
RPMI request message in the queue is referred to as the current forwarded RPMI request | ||
message. The RPMI services defined by the REQUEST_FORWARD service group allow application | ||
processors to retrieve and process one forwarded RPMI request message at a time. | ||
|
||
The <<table_reqfwd_services>> below lists the services defined by the REQUEST_FORWARD | ||
service group: | ||
|
||
[#table_reqfwd_services] | ||
.Request Forward Services | ||
[cols="1, 4, 2", width=100%, align="center", options="header"] | ||
|=== | ||
| Service ID | ||
| Service Name | ||
| Request Type | ||
|
||
| 0x01 | ||
| REQFWD_ENABLE_NOTIFICATION | ||
| NORMAL_REQUEST | ||
|
||
| 0x02 | ||
| REQFWD_RETRIEVE_CURRENT_MESSAGE | ||
| NORMAL_REQUEST | ||
|
||
| 0x03 | ||
| REQFWD_COMPLETE_CURRENT_MESSAGE | ||
| NORMAL_REQUEST | ||
|=== | ||
|
||
[#reqfwd-notifications] | ||
==== Notifications | ||
The <<table_reqfwd_notification_events>> below list the notification events | ||
defined by the REQUEST_FORWARD service group. | ||
|
||
[#table_reqfwd_notification_events] | ||
.Request Forward Notification Events | ||
[cols="1, 2, 2, 2", width=100%, align="center", options="header"] | ||
|=== | ||
| Event ID | ||
| Name | ||
| Event Data | ||
| Description | ||
|
||
| 0x01 | ||
| REQFWD_NEW_MESSAGE | ||
| An array of `N` bytes representing the first `N` bytes of the current forwarded | ||
RPMI request message. The value `N` is specified by the `EVENT_DATALEN` field of | ||
the RPMI notification event as shown in <<table_notification_message_format>>. | ||
| This RPMI notification event represents the arrival of a new forwarded RPMI | ||
request message when there were no other pending forwarded RPMI request message | ||
in the queue. | ||
|=== | ||
|
||
==== Service: REQFWD_ENABLE_NOTIFICATION (SERVICE_ID: 0x01) | ||
This service allows the application processor to subscribe to REQUEST_FORWARD | ||
service group notifications. The supported events are described in the | ||
<<table_reqfwd_notification_events>>. | ||
|
||
[#table_reqfwd_enable_notif_request_data] | ||
.Request Data | ||
[cols="1, 2, 1, 7", width=100%, align="center", options="header"] | ||
|=== | ||
| Word | ||
| Name | ||
| Type | ||
| Description | ||
|
||
| 0 | ||
| EVENT_ID | ||
| uint32 | ||
| Event to be subscribed for notification. | ||
|=== | ||
|
||
[#table_reqfwd_enable_notif_response_data] | ||
.Response Data | ||
[cols="1, 2, 1, 7a", width=100%, align="center", options="header"] | ||
|=== | ||
| Word | ||
| Name | ||
| Type | ||
| Description | ||
|
||
| 0 | ||
| STATUS | ||
| int32 | ||
| Return error code | ||
|
||
[cols="5,5", options="header"] | ||
!=== | ||
! Error Code | ||
! Description | ||
|
||
! RPMI_SUCCESS | ||
! Event is subscribed successfully. | ||
|
||
! RPMI_ERR_INVALID_PARAM | ||
! `EVENT_ID` is invalid. | ||
|
||
! RPMI_ERR_NOT_SUPPORTED | ||
! Notification is not supported. | ||
|
||
!=== | ||
- Other errors <<table_error_codes>> | ||
|=== | ||
|
||
==== Service: REQFWD_RETRIEVE_CURRENT_MESSAGE (SERVICE_ID: 0x02) | ||
This service allows application processors to retrieve the current forwarded RPMI | ||
request message. The current message may be the oldest forwarded RPMI request | ||
message in the platform microcontroller (or SBI implementation) queue. | ||
|
||
[#table_reqfwd_retireve_current_message_request_data] | ||
.Request Data | ||
[cols="1, 3, 1, 7", width=100%, align="center", options="header"] | ||
|=== | ||
| Word | ||
| Name | ||
| Type | ||
| Description | ||
|
||
| 0 | ||
| START_INDEX | ||
| uint32 | ||
| Starting index of first byte of the current forwarded RPMI request message. Use | ||
`0` for the first call, subsequent calls will use the next index of the remaining | ||
bytes. | ||
|=== | ||
|
||
[#table_reqfwd_retireve_current_message_response_data] | ||
.Response Data | ||
[cols="1, 3, 1, 7a", width=100%, align="center", options="header"] | ||
|=== | ||
| Word | ||
| Name | ||
| Type | ||
| Description | ||
|
||
| 0 | ||
| STATUS | ||
| int32 | ||
| Return error code | ||
|
||
[cols="7,5", options="header"] | ||
!=== | ||
! Error Code | ||
! Description | ||
|
||
! RPMI_SUCCESS | ||
! Service completed successfully. | ||
|
||
! RPMI_ERR_INVALID_PARAM | ||
! `START_INDEX` is invalid. | ||
|
||
! RPMI_ERR_NO_DATA | ||
! No forwarded RPMI request message available. | ||
|
||
!=== | ||
- Other errors <<table_error_codes>> | ||
|
||
| 1 | ||
| REMAINING | ||
| uint32 | ||
| Remaining number of bytes in the current forwarded RPMI request message. | ||
|
||
| 2 | ||
| RETURNED | ||
| uint32 | ||
| Number of bytes `N` of the current forwarded RPMI request message returned in | ||
this request. | ||
|
||
| 3 | ||
| REQUEST_MESSAGE[N] | ||
| uint8 | ||
| An array of `N` bytes representing a part of the current forwarded RPMI request | ||
message at byte offset specified by `START_INDEX`. | ||
|=== | ||
|
||
==== Service: REQFWD_COMPLETE_CURRENT_MESSAGE (SERVICE_ID: 0x03) | ||
This service allows the application processors to inform the platform microcontroller | ||
(or SBI implementation) that: | ||
|
||
* The processing of the current forwarded RPMI request message has completed and | ||
RPMI response message must be sent to the original source of RPMI request message. | ||
* The current forwarded RPMI request message must now point to the next forwarded | ||
RPMI request message if available. | ||
|
||
[#table_reqfwd_complete_current_message_request_data] | ||
.Request Data | ||
[cols="1, 3, 1, 7", width=100%, align="center", options="header"] | ||
|=== | ||
| Word | ||
| Name | ||
| Type | ||
| Description | ||
|
||
| 0 | ||
| RESPONSE_DATA[N] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need a word for length (N) of RESPONSE_DATA? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| uint8 | ||
| An array of bytes representing the RPMI message data to be send as | ||
response data for the current forwarded RPMI request message. The `N` | ||
represents the total number of bytes in the response data which can be | ||
inferred by the platform microcontroller (or SBI implementation) from | ||
the overall size of the `REQFWD_COMPLETE_CURRENT_MESSAGE` service message. | ||
|=== | ||
|
||
[#table_reqfwd_complete_current_message_response_data] | ||
.Response Data | ||
[cols="1, 3, 1, 7a", width=100%, align="center", options="header"] | ||
|=== | ||
| Word | ||
| Name | ||
| Type | ||
| Description | ||
|
||
| 0 | ||
| STATUS | ||
| int32 | ||
| Return error code | ||
|
||
[cols="7,5", options="header"] | ||
!=== | ||
! Error Code | ||
! Description | ||
|
||
! RPMI_SUCCESS | ||
! Service completed successfully. | ||
|
||
! RPMI_ERR_NO_DATA | ||
! No forwarded RPMI request message available. | ||
|
||
!=== | ||
- Other errors <<table_error_codes>> | ||
|
||
|=== |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Don't we need a word in the event data for either the total or remaining message length, so the caller knows if it needs to call
REQFWD_RETRIEVE_CURRENT_MESSAGE
at all?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 event data has the first
N
bytes of the forwarded RPMI request message so it will include the forwarded RPMI header which can be used to compute the total message length (i.e.datalen
in RPMI header +8
).If event data size is less than
8
bytes then event data is of no use since it has partial RPMI header and we have to useREQFWD_RETRIEVE_CURRENT_MESSAGE
service to get the forwarded RPMI request 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.
Ah, that makes sense, since we are limiting the payload to RPMI. Thanks.