![]() |
![]() |
Defines | |
#define | sa_SWINFO_UPDATE_DEST_INFO(info, queueID, flowIndex) |
sa_SWINFO_UPDATE_DEST_INFO is used to update the destination information within swInfo[2] at Sa_SWInfo_t | |
#define | sa_RESET_SUBSYSTEM() |
sa_RESET_SUBSYSTEM is used to reset the SA Sub-System (PDSPs) | |
#define | sa_ENABLE_SUBSYSTEM() |
sa_ENABLE_SUBSYSTEM enables the SA subsystem. | |
#define | sa_DOWNLOAD_MODULE(id, img, size) SYSTEM_COPY(pSaRegs->PDSP_IRAM[id].DATA, img, size) |
sa_DOWNLOAD_MODULE downloads an image | |
#define | sa_GET_SYSTEM_STATE(x) |
sa_GET_SYSETM_STATE returns the state of the SA subsystem | |
SA LLD Macros | |
| |
static void | sa_mDmResetCmdLb (Sa_CmdLbUpdateInfo_t *updateInfo, uint32_t *cmdLb) |
sa_mDmResetCmdLb: Reset the Command Label for Data Mode | |
static void | sa_mDmUpdateCmdLb (uint8_t encOffset, uint16_t encSize, uint8_t *pEncIV, uint8_t authOffset, uint16_t authSize, uint8_t *pAuthIV, uint8_t aadSize, uint8_t *aad, uint8_t *pDataBuf, Sa_CmdLbUpdateInfo_t *updateInfo, uint32_t *cmdLb) |
sa_mDmUpdateCmdLb: Update the command label for Data Mode | |
#define | sa_MK_UINT32(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) |
sa_MK_UINT32 is a simple utility macro which constructs a 32-bit word from 4 input bytes |
#define sa_DOWNLOAD_MODULE | ( | id, | |||
img, | |||||
size | ) | SYSTEM_COPY(pSaRegs->PDSP_IRAM[id].DATA, img, size) |
sa_DOWNLOAD_MODULE downloads an image
This macro provides the same function as Sa_downloadImage. A single image is downloaded to one of the packet processing modules.
#define sa_ENABLE_SUBSYSTEM | ( | ) |
{ \ uint32_t value; \ value = SYSTEM_READ32(&(pSaRegs->PDSP_CONTROL_STATUS[0].PDSP_CONTROL)) | CSL_CP_ACE_PDSP_CONTROL_ENABLE_MASK; \ SYSTEM_WRITE32(&(pSaRegs->PDSP_CONTROL_STATUS[0].PDSP_CONTROL), (value)); \ value = SYSTEM_READ32(&(pSaRegs->PDSP_CONTROL_STATUS[1].PDSP_CONTROL)) | CSL_CP_ACE_PDSP_CONTROL_ENABLE_MASK; \ SYSTEM_WRITE32(&(pSaRegs->PDSP_CONTROL_STATUS[1].PDSP_CONTROL), (value)); \ }
sa_ENABLE_SUBSYSTEM enables the SA subsystem.
This macro is used to enable the SA sub-system (PDSPs). It performs the same function as Sa_resetControl, but in macro from.
#define sa_GET_SYSTEM_STATE | ( | x | ) |
{ int enable=0; int disable=0; \ if ( (SYSTEM_READ32(&(pSaRegs->PDSP_CONTROL_STATUS[0].PDSP_CONTROL)) & CSL_CP_ACE_PDSP_CONTROL_ENABLE_MASK) == \ (CSL_CP_ACE_PDSP_CONTROL_ENABLE_MASK) ) \ enable++; else disable++; \ if ( (SYSTEM_READ32(&(pSaRegs->PDSP_CONTROL_STATUS[1].PDSP_CONTROL)) & CSL_CP_ACE_PDSP_CONTROL_ENABLE_MASK) == \ (CSL_CP_ACE_PDSP_CONTROL_ENABLE_MASK) ) \ enable++; else disable++; \ if ( (enable > 0) && (disable > 0) ) (x) = sa_STATE_INCONSISTENT; \ else if (enable > 0) (x) = sa_STATE_ENABLE; \ else (x) = sa_STATE_RESET; \ } (x) = (x)
sa_GET_SYSETM_STATE returns the state of the SA subsystem
This macro provides the same functionality as Sa_resetControl and returns the current state in the macro argument.
#define sa_MK_UINT32 | ( | a, | |||
b, | |||||
c, | |||||
d | ) | (((a) << 24) | ((b) << 16) | ((c) << 8) | (d)) |
#define sa_RESET_SUBSYSTEM | ( | ) |
{ \ SYSTEM_WRITE32(&(pSaRegs->PDSP_CONTROL_STATUS[0].PDSP_CONTROL), 0); \ SYSTEM_WRITE32(&(pSaRegs->PDSP_CONTROL_STATUS[1].PDSP_CONTROL), 0); \ }
sa_RESET_SUBSYSTEM is used to reset the SA Sub-System (PDSPs)
This macro is used to issue the SA sub-system (PDSPs)reset. It performs the same function as Sa_resetControl, but in macro from.
#define sa_SWINFO_UPDATE_DEST_INFO | ( | info, | |||
queueID, | |||||
flowIndex | ) |
{ \ (info[0]) |= 0x40000000L; \ (info[2]) = ((queueID)) | (((flowIndex) & 0xFF) << 16) | ((info[2]) & 0xFF000000L); \ } \
sa_SWINFO_UPDATE_DEST_INFO is used to update the destination information within swInfo[2] at Sa_SWInfo_t
The application may want to deliver output packets to different queues for load balance. This macro is used to update the destination queue and CPPI flow number in the Sa_SWInfo_t data structure provided by Sa_chanSendData()
static void sa_mDmResetCmdLb | ( | Sa_CmdLbUpdateInfo_t * | updateInfo, | |
uint32_t * | cmdLb | |||
) | [inline, static] |
sa_mDmResetCmdLb: Reset the Command Label for Data Mode
Inline macro API can be used to reset the Command Label for Data Mode after first time initialization
[in] | updateInfo | Command label updating control structure returned from SA LLD |
[in] | cmdLb | Command Label Buffer |
Definition at line 2820 of file salld.h.
References Sa_CmdLbUpdateInfo_t::authOffsetInfo, Sa_CmdLbUpdateInfo_t::authSizeInfo, Sa_CmdLbUpdateInfo_t::encOffsetInfo, Sa_CmdLbUpdateInfo_t::encSizeInfo, Sa_CmdLbParamInfo_t::index, sa_CMDL_UPDATE_VALID_AUTH, sa_CMDL_UPDATE_VALID_ENC, sa_DM_CCM, Sa_CmdLbUpdateInfo_t::subMode, and Sa_CmdLbUpdateInfo_t::validBitfield.
static void sa_mDmUpdateCmdLb | ( | uint8_t | encOffset, | |
uint16_t | encSize, | |||
uint8_t * | pEncIV, | |||
uint8_t | authOffset, | |||
uint16_t | authSize, | |||
uint8_t * | pAuthIV, | |||
uint8_t | aadSize, | |||
uint8_t * | aad, | |||
uint8_t * | pDataBuf, | |||
Sa_CmdLbUpdateInfo_t * | updateInfo, | |||
uint32_t * | cmdLb | |||
) | [inline, static] |
sa_mDmUpdateCmdLb: Update the command label for Data Mode
Inline macro API can be used to update the command label per packet for Data Mode during Encryption/Decryption request to SA.
[in] | encOffset | Offset to the encrypted/decrypted data in the packet in bytes |
[in] | encSize | Number of bytes to be encrypted or decrypted |
[in] | pEncIV | Initialization vectors if applicable for encryption mode. |
[in] | authOffset | Offset to the (To be) authenticated data in the packet in bytes |
[in] | authSize | Number of bytes to be authenticated |
[in] | pAuthIV | Initialization vectors if applicable for authentication modes. |
[in] | aadSize | Number of additional data to be authenticated in bytes |
[in] | aad | Pointer to the additional authenticated data |
[in] | pDataBuf | Pointer to data buffer |
[in] | updateInfo | Command label updating control structure returned from SA LLD |
[in] | cmdLb | Command Label Buffer |
Definition at line 2873 of file salld.h.
References Sa_CmdLbUpdateInfo_t::authIvInfo, Sa_CmdLbUpdateInfo_t::authOffsetInfo, Sa_CmdLbUpdateInfo_t::authSizeInfo, Sa_CmdLbUpdateInfo_t::auxKey, Sa_CmdLbUpdateInfo_t::auxKeyInfo, Sa_CmdLbUpdateInfo_t::encIvInfo, Sa_CmdLbUpdateInfo_t::encOffsetInfo, Sa_CmdLbUpdateInfo_t::encSizeInfo, Sa_CmdLbParamInfo_t::index, sa_CMDL_UPDATE_VALID_AUTH, sa_CMDL_UPDATE_VALID_AUTH_IV, sa_CMDL_UPDATE_VALID_AUX_KEY, sa_CMDL_UPDATE_VALID_ENC, sa_CMDL_UPDATE_VALID_ENC_IV, sa_DM_CCM, sa_DM_GCM, sa_DM_GEN, sa_DM_GMAC, sa_DM_GMAC_AH, sa_MK_UINT32, Sa_CmdLbParamInfo_t::size, Sa_CmdLbUpdateInfo_t::subMode, and Sa_CmdLbUpdateInfo_t::validBitfield.