AM263x MCU+ SDK  10.00.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...
 
static void Hsmclient_mboxRxISRNonBlocking (void *args)
 Non blocking 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...
 
int32_t Hsmclient_loadHSMRtFirmwareNonBlocking (const uint8_t *pHSMRt_firmware)
 Loads the HSMRt firmware but does wait for ROM response and boot notification. This is typically called by SBL. More...
 
void Hsmclient_updateBootNotificationRegister (void)
 

Variables

volatile int32_t gHsmrtLoadStatus
 
volatile uint32_t gHsmRtDownloadComplete = 0
 
CSL_mss_ctrlRegs * ptrMSSCtrlRegs = (CSL_mss_ctrlRegs *)CSL_MSS_CTRL_U_BASE
 
Hsmclient_ipcLoadHSM gLoadHSMImage
 
Hsmclient_ipcLoadHSMResult gLoadHSMResult = {{0}}
 
HwiP_Params gHwiParams
 
HwiP_Object gHwiObjReadReq
 

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

◆ Hsmclient_mboxRxISRNonBlocking()

static void Hsmclient_mboxRxISRNonBlocking ( void *  args)
static

Non blocking mailbox Rx ISR.

Parameters
argsloadHSMResult passing as argument

◆ Hsmclient_updateBootNotificationRegister()

void Hsmclient_updateBootNotificationRegister ( void  )

Variable Documentation

◆ gHsmrtLoadStatus

volatile int32_t gHsmrtLoadStatus
extern

◆ gHsmRtDownloadComplete

volatile uint32_t gHsmRtDownloadComplete = 0

◆ ptrMSSCtrlRegs

CSL_mss_ctrlRegs* ptrMSSCtrlRegs = (CSL_mss_ctrlRegs *)CSL_MSS_CTRL_U_BASE

◆ gLoadHSMImage

Hsmclient_ipcLoadHSM gLoadHSMImage

◆ gLoadHSMResult

Hsmclient_ipcLoadHSMResult gLoadHSMResult = {{0}}

◆ gHwiParams

HwiP_Params gHwiParams

◆ gHwiObjReadReq

HwiP_Object gHwiObjReadReq