The C interface for a root of trust (RoT) Service in a partition. More...
Functions | |
psa_signal_t | psa_wait (psa_signal_t signal_mask, uint32_t timeout) |
Return the signals that have been asserted. More... | |
psa_status_t | psa_get (psa_signal_t signal, psa_msg_t *msg) |
Get the message that corresponds to a given signal. More... | |
void | psa_set_rhandle (psa_handle_t msg_handle, void *rhandle) |
Associate the caller-provided private data with a specified handle. More... | |
size_t | psa_read (psa_handle_t msg_handle, uint32_t invec_idx, void *buf, size_t num_bytes) |
Copy up to len bytes from position offset within the client message payload into the Secure Partition buffer buffer. More... | |
size_t | psa_skip (psa_handle_t msg_handle, uint32_t invec_idx, size_t num_bytes) |
Advance the current read offset by skipping num_bytes bytes for input vector indexed by @а invec_idx. More... | |
void | psa_write (psa_handle_t msg_handle, uint32_t outvec_idx, const void *buffer, size_t num_bytes) |
Write a response payload of bytes bytes starting at position offset in the client's response buffer. More... | |
void | psa_reply (psa_handle_t msg_handle, psa_status_t status) |
Complete handling of specific message and unblocks the client. More... | |
void | psa_notify (int32_t partition_id) |
Send a doorbell signal to a specific partition that is listening for that signal type. More... | |
void | psa_clear (void) |
Clear the doorbell signal. More... | |
void | psa_eoi (uint32_t irq_signal) |
Inform the SPM that an interrupt has been handled (end of interrupt). More... | |
The C interface for a root of trust (RoT) Service in a partition.
void psa_clear | ( | void | ) |
Clear the doorbell signal.
void psa_eoi | ( | uint32_t | irq_signal | ) |
Inform the SPM that an interrupt has been handled (end of interrupt).
[in] | irq_signal | The interrupt signal that has been processed. |
psa_status_t psa_get | ( | psa_signal_t | signal, |
psa_msg_t * | msg | ||
) |
Get the message that corresponds to a given signal.
[in] | signal | An asserted signal returned from psa_wait(). |
[out] | msg | Pointer to a psa_msg structure. |
void psa_notify | ( | int32_t | partition_id | ) |
Send a doorbell signal to a specific partition that is listening for that signal type.
[in] | partition_id | partition ID of the target partition. |
size_t psa_read | ( | psa_handle_t | msg_handle, |
uint32_t | invec_idx, | ||
void * | buf, | ||
size_t | num_bytes | ||
) |
Copy up to len bytes from position offset within the client message payload into the Secure Partition buffer buffer.
[in] | msg_handle | Handle for the client's message. |
[in] | invec_idx | psa_invec index to be read. |
[out] | buf | Buffer to copy the requested data to. |
[in] | num_bytes | Number of bytes to read from the client's message payload. |
void psa_reply | ( | psa_handle_t | msg_handle, |
psa_status_t | status | ||
) |
Complete handling of specific message and unblocks the client.
A return code must be specified, which is sent to the client.
Negative return code represent errors; positive integers are application-specific.
[in] | msg_handle | Handle for the client's message. |
[in] | status | Message result value to be reported to the client. |
void psa_set_rhandle | ( | psa_handle_t | msg_handle, |
void * | rhandle | ||
) |
Associate the caller-provided private data with a specified handle.
[in] | msg_handle | Handle for the caller's message. |
[in] | rhandle | Reverse handle allocated by the Root of Trust Service. |
size_t psa_skip | ( | psa_handle_t | msg_handle, |
uint32_t | invec_idx, | ||
size_t | num_bytes | ||
) |
Advance the current read offset by skipping num_bytes bytes for input vector indexed by @а invec_idx.
If num_bytes is greater than the remaining number of bytes in the vector, then all the remaining bytes are skipped.
[in] | msg_handle | Handle for the client's message. |
[in] | invec_idx | psa_invec index to be skipped. |
[in] | num_bytes | Number of bytes to skip. |
psa_signal_t psa_wait | ( | psa_signal_t | signal_mask, |
uint32_t | timeout | ||
) |
Return the signals that have been asserted.
[in] | signal_mask | A set of signals to query. |
[in] | timeout | timeout value: PSA_BLOCK block the caller until any signal is asserted. PSA_POLL Returns immediately. |
void psa_write | ( | psa_handle_t | msg_handle, |
uint32_t | outvec_idx, | ||
const void * | buffer, | ||
size_t | num_bytes | ||
) |
Write a response payload of bytes bytes starting at position offset in the client's response buffer.
[in] | msg_handle | Handle for the client's message. |
[in] | outvec_idx | psa_outvec index to be written to. |
[in] | buffer | Buffer with the data to write. |
[in] | num_bytes | Number of bytes to write. |