#include <stddef.h>
#include <stdint.h>
#include "psa/error.h"
#include "psa/client.h"
Go to the source code of this file.
|
psa_signal_t | psa_wait (psa_signal_t signal_mask, uint32_t timeout) |
| Return the Secure Partition interrupt signals that have been asserted from a subset of signals provided by the caller. More...
|
|
psa_status_t | psa_get (psa_signal_t signal, psa_msg_t *msg) |
| Retrieve the message which corresponds to a given RoT Service signal and remove the message from the RoT Service queue. More...
|
|
void | psa_set_rhandle (psa_handle_t msg_handle, void *rhandle) |
| Associate some RoT Service private data with a client connection. More...
|
|
size_t | psa_read (psa_handle_t msg_handle, uint32_t invec_idx, void *buffer, size_t num_bytes) |
| Read a message parameter or part of a message parameter from a client input vector. More...
|
|
size_t | psa_skip (psa_handle_t msg_handle, uint32_t invec_idx, size_t num_bytes) |
| Skip over part of a client input vector. More...
|
|
void | psa_write (psa_handle_t msg_handle, uint32_t outvec_idx, const void *buffer, size_t num_bytes) |
| Write a message response to a client output vector. More...
|
|
void | psa_reply (psa_handle_t msg_handle, psa_status_t status) |
| Complete handling of a specific message and unblock the client. More...
|
|
void | psa_notify (int32_t partition_id) |
| Send a PSA_DOORBELL signal to a specific Secure Partition. More...
|
|
void | psa_clear (void) |
| Clear the PSA_DOORBELL signal. More...
|
|
void | psa_eoi (psa_signal_t irq_signal) |
| Inform the SPM that an interrupt has been handled (end of interrupt). More...
|
|
void | psa_panic (void) |
| Terminate execution within the calling Secure Partition and will not return. More...
|
|
#define PSA_BLOCK (0x80000000u) |
A timeout value that requests a blocking wait operation.
Definition at line 31 of file service.h.
#define PSA_DOORBELL (0x00000008u) |
The signal number for the Secure Partition doorbell.
Definition at line 41 of file service.h.
#define PSA_IPC_CONNECT (-1) |
#define PSA_IPC_DISCONNECT (-2) |
#define PSA_POLL (0x00000000u) |
A timeout value that requests a polling wait operation.
Definition at line 26 of file service.h.
#define PSA_WAIT_ANY (0xFFFFFFFFu) |
A mask value that includes all Secure Partition signals.
Definition at line 36 of file service.h.
Describe a message received by an RoT Service after calling psa_get().
Clear the PSA_DOORBELL signal.
- Return values
-
void | Success. |
PROGRAMMER ERROR | The Secure Partition's doorbell signal is not currently asserted. |
Definition at line 83 of file psa_service.c.
Inform the SPM that an interrupt has been handled (end of interrupt).
- Parameters
-
[in] | irq_signal | The interrupt signal that has been processed. |
- Return values
-
void | Success. |
PROGRAMMER ERROR | The call is invalid, one or more of the following are true:
- irq_signal is not an interrupt signal.
- irq_signal indicates more than one signal.
- irq_signal is not currently asserted.
|
Definition at line 91 of file psa_service.c.
Retrieve the message which corresponds to a given RoT Service signal and remove the message from the RoT Service queue.
- Parameters
-
[in] | signal | The signal value for an asserted RoT Service. |
[out] | msg | Pointer to psa_msg_t object for receiving the message. |
- Return values
-
PSA_SUCCESS | Success, *msg will contain the delivered message. |
PSA_ERROR_DOES_NOT_EXIST | Message could not be delivered. |
PROGRAMMER ERROR | The call is invalid because one or more of the following are true:
- signal has more than a single bit set.
- signal does not correspond to an RoT Service.
- The RoT Service signal is not currently asserted.
- The msg pointer provided is not a valid memory reference.
|
Definition at line 24 of file psa_service.c.
void psa_notify |
( |
int32_t |
partition_id | ) |
|
Send a PSA_DOORBELL signal to a specific Secure Partition.
- Parameters
-
[in] | partition_id | Secure Partition ID of the target partition. |
- Return values
-
void | Success. |
PROGRAMMER ERROR | partition_id does not correspond to a Secure Partition. |
Definition at line 75 of file psa_service.c.
Terminate execution within the calling Secure Partition and will not return.
- Return values
-
Definition at line 99 of file psa_service.c.
size_t psa_read |
( |
psa_handle_t |
msg_handle, |
|
|
uint32_t |
invec_idx, |
|
|
void * |
buffer, |
|
|
size_t |
num_bytes |
|
) |
| |
Read a message parameter or part of a message parameter from a client input vector.
- Parameters
-
[in] | msg_handle | Handle for the client's message. |
[in] | invec_idx | Index of the input vector to read from. Must be less than PSA_MAX_IOVEC. |
[out] | buffer | Buffer in the Secure Partition to copy the requested data to. |
[in] | num_bytes | Maximum number of bytes to be read from the client input vector. |
- Return values
-
>0 | Number of bytes copied. |
0 | There was no remaining data in this input vector. |
PROGRAMMER ERROR | The call is invalid, one or more of the following are true:
- msg_handle is invalid.
- msg_handle does not refer to a PSA_IPC_CALL message.
- invec_idx is equal to or greater than PSA_MAX_IOVEC.
- the memory reference for buffer is invalid or not writable.
|
Definition at line 40 of file psa_service.c.
Complete handling of a specific message and unblock the client.
- Parameters
-
[in] | msg_handle | Handle for the client's message. |
[in] | status | Message result value to be reported to the client. |
- Return values
-
void | Success. |
PROGRAMMER ERROR | The call is invalid, one or more of the following are true:
- msg_handle is invalid.
- An invalid status code is specified for the type of message.
|
Definition at line 67 of file psa_service.c.
void psa_set_rhandle |
( |
psa_handle_t |
msg_handle, |
|
|
void * |
rhandle |
|
) |
| |
Associate some RoT Service private data with a client connection.
- Parameters
-
[in] | msg_handle | Handle for the client's message. |
[in] | rhandle | Reverse handle allocated by the RoT Service. |
- Return values
-
void | Success, rhandle will be provided with all subsequent messages delivered on this connection. |
PROGRAMMER ERROR | msg_handle is invalid. |
Definition at line 32 of file psa_service.c.
size_t psa_skip |
( |
psa_handle_t |
msg_handle, |
|
|
uint32_t |
invec_idx, |
|
|
size_t |
num_bytes |
|
) |
| |
Skip over part of a client input vector.
- Parameters
-
[in] | msg_handle | Handle for the client's message. |
[in] | invec_idx | Index of input vector to skip from. Must be less than PSA_MAX_IOVEC. |
[in] | num_bytes | Maximum number of bytes to skip in the client input vector. |
- Return values
-
>0 | Number of bytes skipped. |
0 | There was no remaining data in this input vector. |
PROGRAMMER ERROR | The call is invalid, one or more of the following are true:
- msg_handle is invalid.
- msg_handle does not refer to a request message.
- invec_idx is equal to or greater than PSA_MAX_IOVEC.
|
Definition at line 50 of file psa_service.c.
Return the Secure Partition interrupt signals that have been asserted from a subset of signals provided by the caller.
- Parameters
-
[in] | signal_mask | A set of signals to query. Signals that are not in this set will be ignored. |
[in] | timeout | Specify either blocking PSA_BLOCK or polling PSA_POLL operation. |
- Return values
-
>0 | At least one signal is asserted. |
0 | No signals are asserted. This is only seen when a polling timeout is used. |
Definition at line 15 of file psa_service.c.
void psa_write |
( |
psa_handle_t |
msg_handle, |
|
|
uint32_t |
outvec_idx, |
|
|
const void * |
buffer, |
|
|
size_t |
num_bytes |
|
) |
| |
Write a message response to a client output vector.
- Parameters
-
[in] | msg_handle | Handle for the client's message. |
[out] | outvec_idx | Index of output vector in message to write to. Must be less than PSA_MAX_IOVEC. |
[in] | buffer | Buffer with the data to write. |
[in] | num_bytes | Number of bytes to write to the client output vector. |
- Return values
-
void | Success |
PROGRAMMER ERROR | The call is invalid, one or more of the following are true:
- msg_handle is invalid.
- msg_handle does not refer to a request message.
- outvec_idx is equal to or greater than PSA_MAX_IOVEC.
- The memory reference for buffer is invalid.
- The call attempts to write data past the end of the client output vector.
|
Definition at line 58 of file psa_service.c.