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

Clarify the sbiret.value #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion src/binary-encoding.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ of SBI extensions. The SBI specification follows the below calling convention.
----
struct sbiret {
long error;
long value;
union {
long value;
unsigned long uvalue;
};
};
----

Expand Down
6 changes: 3 additions & 3 deletions src/ext-debug-console.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ XLEN bits of the input memory physical base address.
This is a non-blocking SBI call and it may do partial/no writes if
the debug console is not able to accept more bytes.

The number of bytes written is returned in `sbiret.value` and the
The number of bytes written is returned in `sbiret.uvalue` and the
possible error codes returned in `sbiret.error` are shown in
<<table_debug_console_write_errors>> below.

Expand Down Expand Up @@ -75,7 +75,7 @@ This is a non-blocking SBI call and it will not write anything
into the output memory if there are no bytes to be read in the
debug console.

The number of bytes read is returned in `sbiret.value` and the
The number of bytes read is returned in `sbiret.uvalue` and the
possible error codes returned in `sbiret.error` are shown in
<<table_debug_console_read_errors>> below.

Expand Down Expand Up @@ -106,7 +106,7 @@ This is a blocking SBI call and it will only return after writing
the specified byte to the debug console. It will also return, with
SBI_ERR_FAILED, if there are I/O errors.

The `sbiret.value` is set to zero and the possible error codes returned
The `sbiret.uvalue` is set to zero and the possible error codes returned
in `sbiret.error` are shown in <<table_debug_console_write_byte_errors>>
below.

Expand Down
8 changes: 4 additions & 4 deletions src/ext-mpxy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ passed accordingly. The supervisor software may require multiple SBI calls to
get the complete list of channel IDs depending on the `RETURNED` and
`REMAINING` fields.

The `sbiret.value` is always set to zero whereas the possible error codes
The `sbiret.uvalue` is always set to zero whereas the possible error codes
returned in `sbiret.error` are below.

[#table_sbi_mpxy_get_channel_ids_errors]
Expand Down Expand Up @@ -598,15 +598,15 @@ specifications.

Upon calling this function the SBI implementation MUST write the response
message data at the offset `0x0` in the shared memory setup by the calling hart
and the number of bytes written will be returned through `sbiret.value`.
and the number of bytes written will be returned through `sbiret.uvalue`.
The layout of data in case of both request and response is according to the
respective message protocol specification message format.

Upon success, this function: +
1) Writes the message response data at offset `0x0` of the shared memory setup
by the calling hart. +
2) Returns `SBI_SUCCESS` in `sbiret.error`. +
3) Returns message response data length in `sbiret.value`. +
3) Returns message response data length in `sbiret.uvalue`. +

This function is optional. If this function is implemented, the corresponding
bit in the `CHANNEL_CAPABILITY` attribute is set to `1`.
Expand Down Expand Up @@ -769,7 +769,7 @@ SBI implementation at the offset `0x10` in the shared memory setup by the
calling hart irrespective of events state data reporting. If events state data
reporting is disabled or not supported, then the values in events state fields
are undefined. The number of the bytes written to the shared memory will be
returned through `sbiret.value` which is the number of bytes starting from
returned through `sbiret.uvalue` which is the number of bytes starting from
offset `0x10`. The layout and encoding of notification events are defined by
the message protocol specification associated with the message proxy channel
(`channel_id`).
Expand Down
Loading