AM263x MCU+ SDK  09.02.00
hsmclient_loadhsmrt.c File Reference

Data Structures

struct  Hsmclient_ipcExportHeader
 IPC Load HSM Runtime. More...
 
struct  Hsmclient_ipcLoadHSM
 IPC Load HSM Runtime. More...
 
struct  Hsmclient_ipcLoadHSMResult
 IPC Load HSM Result. More...
 

Macros

#define HSMCLIENT_IPC_EXPORT_VERSION   (0x1U)
 This is the version number for the IPC Export Interface. The version number should be the same between the HSM Boot ROM and the R5 SBL. In the case of a mismatch the HSM Boot ROM will generate an error. More...
 

Enumerations

enum  Hsmclient_ipcExportMsgType { Hsmclient_ipcExportMsgType_LOAD_HSM = 0x9980A1D4U, Hsmclient_ipcExportMsgType_LOAD_HSM_RESULT = 0xA70915DEU }
 hsmclient IPC Message Type for HSMRt load function. More...
 
enum  Hsmclient_ipcLoadHSMStatus { Hsmclient_ipcLoadHSMStatus_SUCCESS = 0x4A43AB6CU, Hsmclient_ipcLoadHSMStatus_FAILURE = 0x7021AE4BU }
 IPC Load HSM Status. More...
 

Functions

static uint16_t Hsmclient_computeIPCChecksum (uint8_t *ptrBuffer, uint32_t sizeMsg)
 This is a utility function which is used to compute the checksum on the provided buffer. More...
 
static void Hsmclient_mboxRxISR (void *args)
 mailbox Rx ISR More...
 
int32_t Hsmclient_loadHSMRtFirmware (HsmClient_t *NotifyClient, const uint8_t *pHSMRt_firmware)
 Loads the HSMRt firmware. This is typically called by SBL. More...
 

Variables

volatile uint32_t gHsmRtDownloadComplete = 0
 
CSL_mss_ctrlRegs * ptrMSSCtrlRegs = (CSL_mss_ctrlRegs *)CSL_MSS_CTRL_U_BASE
 

Macro Definition Documentation

◆ HSMCLIENT_IPC_EXPORT_VERSION

#define HSMCLIENT_IPC_EXPORT_VERSION   (0x1U)

This is the version number for the IPC Export Interface. The version number should be the same between the HSM Boot ROM and the R5 SBL. In the case of a mismatch the HSM Boot ROM will generate an error.

Enumeration Type Documentation

◆ Hsmclient_ipcExportMsgType

hsmclient IPC Message Type for HSMRt load function.

The enumeration describes the messages which are supported by the IPC Module executing in the HSM Runtime state.

Enumerator
Hsmclient_ipcExportMsgType_LOAD_HSM 

Load the HSM Runtime R5 SBL -> HSM Payload = ipcLoadHSM.

Hsmclient_ipcExportMsgType_LOAD_HSM_RESULT 

HSM Runtime Load Status HSM -> R5 SBL Payload = ipcLoadHSMResult.

◆ Hsmclient_ipcLoadHSMStatus

IPC Load HSM Status.

The enumeration describes the status of the HSM Runtime loading status. This is sent back to the R5 SBL

Enumerator
Hsmclient_ipcLoadHSMStatus_SUCCESS 

HSM Runtime was loaded successfully.

Hsmclient_ipcLoadHSMStatus_FAILURE 

HSM Runtime could not be loaded.

Function Documentation

◆ Hsmclient_computeIPCChecksum()

static uint16_t Hsmclient_computeIPCChecksum ( uint8_t *  ptrBuffer,
uint32_t  sizeMsg 
)
static

This is a utility function which is used to compute the checksum on the provided buffer.

Parameters
ptrBufferBuffer pointer.
sizeMsgmessage size in bytes.
Returns
Computed checksum

◆ Hsmclient_mboxRxISR()

static void Hsmclient_mboxRxISR ( void *  args)
static

mailbox Rx ISR

Parameters
argsloadHSMResult passing as arument

Variable Documentation

◆ gHsmRtDownloadComplete

volatile uint32_t gHsmRtDownloadComplete = 0

◆ ptrMSSCtrlRegs

CSL_mss_ctrlRegs* ptrMSSCtrlRegs = (CSL_mss_ctrlRegs *)CSL_MSS_CTRL_U_BASE