![]() |
PDK API Guide for J721E
|
Files | |
file | sciserver_secproxyTransfer.h |
Secure Proxy Transfer (Messaging) APIs. | |
Functions | |
int32_t | Sciserver_SproxyMsgIsPending (uint16_t rx_config_id) |
Check to see if a message is pending on a Rx sec proxy thread. More... | |
int32_t | Sciserver_SproxyMsgGetSenderHostId (uint16_t rx_config_id, uint32_t *sender_host_id) |
Find the Sender's Host ID for a pending message. More... | |
int32_t | Sciserver_SproxyMsgRead (uint16_t rx_config_id, uint32_t *rx_buff, uint32_t rx_num_words) |
read a message (but dont ack) More... | |
int32_t | Sciserver_SproxyMsgReadAtOffset (uint16_t rx_config_id, uint32_t *rx_buff, uint32_t rx_num_words, uint32_t offset) |
read a portion of the message (but dont ack) More... | |
int32_t | Sciserver_SproxyMsgAck (uint16_t rx_config_id) |
acknowledge receipt of message to hardware More... | |
int32_t | Sciserver_SproxyCanSend (uint16_t tx_config_id) |
Check to see if we can indeed transmit a message. More... | |
int32_t | Sciserver_SproxyMsgSend (uint16_t tx_config_id, uint32_t *tx_buff, uint32_t tx_num_words) |
send a message (stage it, but don't complete transmissions) More... | |
int32_t | Sciserver_SproxyMsgSendAtOffset (uint16_t tx_config_id, uint32_t *tx_buff, uint32_t tx_num_words, uint32_t offset) |
send a message (stage it, but don't complete transmissions) More... | |
int32_t | Sciserver_SproxyMsgFinish (uint16_t tx_config_id) |
Confirm to hardware to transmit a staged message. More... | |
int32_t | Sciserver_SproxyMsgValidateHostId (uint16_t host_id) |
Function to trivially verify if the provided host_id is a valid ID. More... | |
int32_t | Sciserver_SproxyGetResponseConfId (uint16_t host_id, uint16_t *tx_config_id) |
Retrieve the Tx thread config ID for response to a host ID. More... | |
int32_t | Sciserver_SproxyGetNotifyConfId (uint16_t host_id, uint16_t *tx_config_id) |
Retrieve the Tx thread config ID for notification to a host ID. More... | |
int32_t Sciserver_SproxyMsgIsPending | ( | uint16_t | rx_config_id | ) |
Check to see if a message is pending on a Rx sec proxy thread.
rx_config_id | - Index into gSciserverSecureProxyRxConfigurations |
int32_t Sciserver_SproxyMsgGetSenderHostId | ( | uint16_t | rx_config_id, |
uint32_t * | sender_host_id | ||
) |
Find the Sender's Host ID for a pending message.
Since every Tx thread is mapped to an Rx thread, when we get a message, the hardware mechanisms allow us to identify the tx thread that send the original message. This allows a lookup into what the exact host ID should have been for the transmitting party. This, in conjunction with appropriate firewall settings, should detect a spoof message being send on a secure proxy thread that is incorrect.
rx_config_id | - Index into gSciserverSecureProxyRxConfigurations |
sender_host_id | - Returns the host ID from SoC database |
int32_t Sciserver_SproxyMsgRead | ( | uint16_t | rx_config_id, |
uint32_t * | rx_buff, | ||
uint32_t | rx_num_words | ||
) |
read a message (but dont ack)
This reads a message from a Rx secure proxy thread, without notifying the hardware doorbell register that the message read is complete.
rx_config_id | - Index into gSciserverSecureProxyRxConfigurations |
rx_buff | - Rx buffer |
rx_num_words | - number of words to read (sizeof(uint32_t) elements) |
int32_t Sciserver_SproxyMsgReadAtOffset | ( | uint16_t | rx_config_id, |
uint32_t * | rx_buff, | ||
uint32_t | rx_num_words, | ||
uint32_t | offset | ||
) |
read a portion of the message (but dont ack)
This is a companion API to Sciserver_SproxyMsgRead. It can be used to read specific portions of the message from Rx secure proxy thread without always starting at offset 0.
rx_config_id | - Index into gSciserverSecureProxyRxConfigurations |
rx_buff | - Rx buffer |
rx_num_words | - number of words to read (sizeof(uint32_t) elements) |
offset | - word offset from which we need to read the message. |
int32_t Sciserver_SproxyMsgAck | ( | uint16_t | rx_config_id | ) |
acknowledge receipt of message to hardware
if there was a pending message, let secure proxy hardware know that the message has been consumed and to make the next message available (if any).
rx_config_id | - Index into gSciserverSecureProxyRxConfigurations |
int32_t Sciserver_SproxyCanSend | ( | uint16_t | tx_config_id | ) |
Check to see if we can indeed transmit a message.
Check secure proxy thread to see if we have enough credits to be able to send at least 1 message.
tx_config_id | - Index into Sciserver_SecureProxyTxConfigurations |
int32_t Sciserver_SproxyMsgSend | ( | uint16_t | tx_config_id, |
uint32_t * | tx_buff, | ||
uint32_t | tx_num_words | ||
) |
send a message (stage it, but don't complete transmissions)
This stages a message for transmission on a Tx secure proxy thread, without notifying the hardware doorbell register that the message is ready to be transmitted. So there is a very good chance that you may overwrite a staged message with another staged message if Sciserver_SproxyMsgFinish was failed to be called in the middle.
This API does not provide mutual exclusion for threads or against race against Sciserver_SproxyMsgFinish
tx_config_id | - Index into Sciserver_SecureProxyTxConfigurations |
tx_buff | - Transmit buffer |
tx_num_words | - number of words to write (sizeof(uint32_t) elements) |
int32_t Sciserver_SproxyMsgSendAtOffset | ( | uint16_t | tx_config_id, |
uint32_t * | tx_buff, | ||
uint32_t | tx_num_words, | ||
uint32_t | offset | ||
) |
send a message (stage it, but don't complete transmissions)
This is a companion API to Sciserver_SproxyMsgSend. It can be used to construct a secure proxy message in parts as opposed to Sciserver_SproxyMsgSend which always overwrites the existing data.
The parameter offset can be used to control where we start writing to into the secure proxy data registers. When offset is 0, this function is equivalent to Sciserver_SproxyMsgSend.
This API does not provide mutual exclusion for threads or against race against Sciserver_SproxyMsgFinish
tx_config_id | - Index into Sciserver_SecureProxyTxConfigurations |
tx_buff | - Transmit buffer |
tx_num_words | - number of words to write (sizeof(uint32_t) elements) |
offset | - number of words to index into the secure proxy registers when writing. |
int32_t Sciserver_SproxyMsgFinish | ( | uint16_t | tx_config_id | ) |
Confirm to hardware to transmit a staged message.
NOTE: This API does not verify to make sure an actual data was made available in the secure proxy via Sciserver_SproxyMsgSend. Any call to this API will result in reduction by 1 of available credits.
This API does not provide mutual exclusion for threads
tx_config_id | - Index into Sciserver_SecureProxyTxConfigurations |
int32_t Sciserver_SproxyMsgValidateHostId | ( | uint16_t | host_id | ) |
Function to trivially verify if the provided host_id is a valid ID.
host_id | - Host ID to verify |
int32_t Sciserver_SproxyGetResponseConfId | ( | uint16_t | host_id, |
uint16_t * | tx_config_id | ||
) |
Retrieve the Tx thread config ID for response to a host ID.
Retrieve a Tx thread Config ID for a valid Host ID
host_id | - valid host id for the SoC |
tx_config_id | - returns if valid a corresponding tx config id |
int32_t Sciserver_SproxyGetNotifyConfId | ( | uint16_t | host_id, |
uint16_t * | tx_config_id | ||
) |
Retrieve the Tx thread config ID for notification to a host ID.
Retrieve a Tx thread Config ID for a valid Host ID
host_id | - valid host id for the SoC |
tx_config_id | - returns if valid a corresponding tx config id |