Mistake on this page?
Report an issue in GitHub or email us
Functions
RoT-Service-API

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...
 

Detailed Description

The C interface for a root of trust (RoT) Service in a partition.

Function Documentation

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).

Parameters
[in]irq_signalThe 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.

Parameters
[in]signalAn asserted signal returned from psa_wait().
[out]msgPointer to a psa_msg structure.
Returns
0 for success or
PSA_ERR_NOMSG if the message could not be delivered.
void psa_notify ( int32_t  partition_id)

Send a doorbell signal to a specific partition that is listening for that signal type.

Parameters
[in]partition_idpartition 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.


Note
Callers should know how much data is available to read based on the
size attribute of the psa_msg structure returned from psa_get().
The copy is truncated if the requested range extends beyond the end of the payload.
In such a case, the remaining space in buffer is not modified.
Parameters
[in]msg_handleHandle for the client's message.
[in]invec_idxpsa_invec index to be read.
[out]bufBuffer to copy the requested data to.
[in]num_bytesNumber of bytes to read from the client's message payload.
Returns
Number of bytes copied or 0 if offset is greater than the size attribute of psa_msg.
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.

Parameters
[in]msg_handleHandle for the client's message.
[in]statusMessage 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.

Parameters
[in]msg_handleHandle for the caller's message.
[in]rhandleReverse 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.

Parameters
[in]msg_handleHandle for the client's message.
[in]invec_idxpsa_invec index to be skipped.
[in]num_bytesNumber of bytes to skip.
Returns
Number of bytes skipped or 0 if offset is greater than the size attribute of psa_msg.
psa_signal_t psa_wait ( psa_signal_t  signal_mask,
uint32_t  timeout 
)

Return the signals that have been asserted.


Parameters
[in]signal_maskA set of signals to query.
[in]timeouttimeout value:
PSA_BLOCK block the caller until any signal is asserted.
PSA_POLL Returns immediately.
Returns
asserted signals.
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.

Note
If the caller writes data beyond the client's response buffer size (response_size attribute of the psa_msg structure returned from psa_get()) a fatal error occurs.
Parameters
[in]msg_handleHandle for the client's message.
[in]outvec_idxpsa_outvec index to be written to.
[in]bufferBuffer with the data to write.
[in]num_bytesNumber of bytes to write.
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.