 |
AM261x MCU+ SDK
10.02.00
|
|
Go to the documentation of this file.
56 #define LABEL_AND_CONTEXT_LEN_MAX 48U
62 #define HSMRT_LOAD_NOT_REQUESTED (0U)
67 #define HSMRT_LOAD_REQUESTED (1U)
72 #define HSMRT_LOAD_FAILED (2U)
77 #define HSMRT_LOAD_SUCCEEDED (3U)
99 #if defined(_TMS320C6X)
110 typedef struct HsmClient_t_
128 typedef struct NvmOtpRead_t_
142 typedef struct NvmOtpRowWrite_t_
155 typedef struct NvmOtpRowCount_t_
169 typedef struct NvmOtpRowProt_t_
181 typedef struct keywriter_cert_header_t_
194 typedef struct FirewallRegionReq_t_
208 typedef struct FirewallReq_t_
222 typedef struct FirewallIntrReq_t_
240 typedef struct SWRev_t_
257 typedef struct DKEK_t_
276 typedef struct RNGReq_t_
306 typedef struct FirmwareUpdateReq_t_
418 HsmVer_t* verId,uint32_t timeToWaitInTick);
436 uint8_t *uid, uint32_t timeout);
591 SecureBoot_Stream_t *secureBootInfo);
608 SecureBoot_Stream_t *secureBootInfo);
625 SecureBoot_Stream_t *secureBootInfo);
uint8_t encrAesKey[16]
Definition: hsmclient.h:330
This is the entire OTFA structure which holds all regions' information 4 regions in AM263Px and AM261...
Definition: hsmclient.h:356
Parameters used by SIPC_init.
Definition: sipc_notify.h:84
type for reading HSMRt version.
Definition: hsmclient.h:85
uint8_t encMode
Definition: hsmclient.h:342
int32_t HsmClient_checkAndWaitForBootNotification(void)
This API waits for HSMRT load if requested and then waits for boot notification. In case of failure i...
Definition: hsmclient.c:398
#define LABEL_AND_CONTEXT_LEN_MAX
Definition: hsmclient.h:56
int32_t HsmClient_setFirewall(HsmClient_t *HsmClient, FirewallReq_t *FirewallReqObj, uint32_t timeout)
The service issued to HSM Server sets the firewall for the given firewall id and region.
Definition: hsmclient.c:1310
int32_t HsmClient_writeSWRev(HsmClient_t *HsmClient, SWRev_t *writeSWRev)
The service issued to HSM Server writes the SWRevision value based on identifier as param.
Definition: hsmclient.c:1658
uint8_t PatchVer
Definition: hsmclient.h:89
uint8_t keySize
Definition: hsmclient.h:359
uint8_t * dataIn
Definition: hsmclient.h:293
int32_t HsmClient_firmwareUpdate_CodeProgram(HsmClient_t *HsmClient, FirmwareUpdateReq_t *pFirmwareUpdateObject)
service request issued to HSM server to program the incoming firmware to device dormant banks This se...
Definition: hsmclient.c:1884
uint8_t rowSize
Definition: hsmclient.h:158
uint16_t region
Definition: hsmclient.h:197
uint8_t RespFlag
Definition: hsmclient.h:116
This is the SecureBoot Stream type which holds the data for a specific bootloader to HSM call....
Definition: hsmclient.h:292
int32_t HsmClient_firmwareUpdate_CodeVerify(HsmClient_t *HsmClient, FirmwareUpdateReq_t *pFirmwareUpdateObject)
service request issued to HSM server to decrypt the firmware programmed in dormant flash bank in plac...
Definition: hsmclient.c:1959
This is DKEK type which holds the label and context for derivation. This also holds the 256 derived K...
Definition: hsmclient.h:258
uint16_t rowIdx
Definition: hsmclient.h:131
uint16_t reservedArea
Definition: hsmclient.h:323
uint8_t canBeEncrypted
Definition: hsmclient.h:295
int32_t HsmClient_readOTPRow(HsmClient_t *HsmClient, NvmOtpRead_t *readRow)
The service issued to HSM Server retrieves the data of GP OTP row based on row index provided as para...
Definition: hsmclient.c:795
This is an NvmOtpRowWrite type which holds the information regarding programming NvmOtp row....
Definition: hsmclient.h:143
int32_t HsmClient_readSWRev(HsmClient_t *HsmClient, SWRev_t *readSWRev)
The service issued to HSM Server retrieves the SWRevision value based on identifier as param.
Definition: hsmclient.c:1590
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 call...
Definition: hsmclient_loadhsmrt.c:404
int32_t HsmClient_importKeyring(HsmClient_t *HsmClient, uint8_t *cert, uint32_t cert_size, uint32_t timeout)
The service issued to HSM Server verifies the certificate and imports the keys from the certificate.
Definition: hsmclient.c:723
uint8_t HsmType
Definition: hsmclient.h:95
OTFA_Region_t OTFA_Reg[4]
Definition: hsmclient.h:357
int32_t HsmClient_procAuthBootStart(HsmClient_t *HsmClient, SecureBoot_Stream_t *secureBootInfo)
The service issued to HSM Server helps with extended secure boot for applications.
Definition: hsmclient.c:1203
uint32_t * seedValue
Definition: hsmclient.h:281
uint8_t MajorVer
Definition: hsmclient.h:91
uint16_t firewallId
Definition: hsmclient.h:224
uint32_t regionStAddr
Definition: hsmclient.h:324
uint8_t regionIV[16]
Definition: hsmclient.h:331
FirewallRegionReq_t * FirewallRegionArr
Definition: hsmclient.h:212
uint16_t rowIdx
Definition: hsmclient.h:146
uint8_t * pStartAddress
Definition: hsmclient.h:308
This is a FirewallRegionReq type which holds the information of Firewall region configuration.
Definition: hsmclient.h:195
uint8_t * resultPtr
Definition: hsmclient.h:278
This is a HSMClient type which holds the information needed by hsm client to communicate with HSM .
Definition: hsmclient.h:111
int32_t HsmClient_UpdateKeyRevsion(HsmClient_t *HsmClient, uint32_t timeout)
service request issued to HSM server to update key revision to 0x2 which changes the root of trust ke...
Definition: hsmclient.c:2107
uint8_t encrKeyFetchMode
Definition: hsmclient.h:328
This is a NvmOtpRowProt type which holds the information of NvmOtp row index and protection status co...
Definition: hsmclient.h:170
uint8_t SocType
Definition: hsmclient.h:93
uint8_t ApiVer
Definition: hsmclient.h:92
int32_t HsmClient_procAuthBootFinish(HsmClient_t *HsmClient, SecureBoot_Stream_t *secureBootInfo)
The service issued to HSM Server helps with extended secure boot for applications.
Definition: hsmclient.c:1271
uint64_t HsmrtVer
Definition: hsmclient.h:86
uint8_t writeProt
Definition: hsmclient.h:173
uint8_t encrKeyID
Definition: hsmclient.h:327
uint8_t DevType
Definition: hsmclient.h:96
uint8_t authMode
Definition: hsmclient.h:341
uint8_t seedSizeInDWords
Definition: hsmclient.h:282
int32_t HsmClient_firmwareUpdate_CertProcess(HsmClient_t *HsmClient, FirmwareUpdateReq_t *pFirmwareUpdateObject)
service request issued to HSM server to parse the certificate to validate authenticity and identify t...
Definition: hsmclient.c:1808
uint8_t readProt
Definition: hsmclient.h:172
HsmMsg_t RespMsg
Definition: hsmclient.h:115
uint32_t endAddress
Definition: hsmclient.h:200
int32_t HsmClient_openDbgFirewall(HsmClient_t *HsmClient, uint8_t *cert, uint32_t cert_size, uint32_t timeout)
The service issued to HSM Server verifies the certificate and by default the hsm flag is set to HSM_F...
Definition: hsmclient.c:651
uint32_t revValue
Definition: hsmclient.h:242
int32_t HsmClient_register(HsmClient_t *HsmClient, uint8_t clientId)
register a client to a particular ClientId
Definition: hsmclient.c:452
This is a FirewallIntrReq type which holds the information of MPU Firewall request for interrupt enab...
Definition: hsmclient.h:223
uint32_t bankMode
Definition: hsmclient.h:310
uint32_t rowBitMask
Definition: hsmclient.h:145
int32_t HsmClient_getOTPRowCount(HsmClient_t *HsmClient, NvmOtpRowCount_t *rowCount)
The service issued to HSM Server retrieves the count of extended OTP rows.
Definition: hsmclient.c:997
int32_t HsmClient_VerifyROTSwitchingCertificate(HsmClient_t *HsmClient, uint8_t *cert, uint32_t cert_size, uint32_t timeout)
service request issued to HSM server to validate RoT Switching Certificate
Definition: hsmclient.c:2037
uint32_t rowData
Definition: hsmclient.h:130
This is a FirewallReq_t type which holds the information of Firewall configuration.
Definition: hsmclient.h:209
uint8_t interruptEnableClear
Definition: hsmclient.h:226
uint32_t permissionAttributes
Definition: hsmclient.h:198
uint16_t regionIV[16]
Definition: hsmclient.h:347
uint16_t rowidx
Definition: hsmclient.h:171
int32_t HsmClient_init(SIPC_Params *params)
Initialize the HSM client for current core.
Definition: hsmclient.c:482
int32_t HsmClient_FirewallIntr(HsmClient_t *HsmClient, FirewallIntrReq_t *FirewallIntrReqObj, uint32_t timeout)
The service issued to HSM Server sets the firewall interrupt request for the given firewall id.
Definition: hsmclient.c:1385
This is SWRev type which holds the information regarding Revision identifier and value corresponding ...
Definition: hsmclient.h:241
uint8_t BinType
Definition: hsmclient.h:94
uint32_t startAddress
Definition: hsmclient.h:199
struct HsmVer_t_::@0 VerStruct
uint8_t encMode
Definition: hsmclient.h:322
uint32_t dataLen
Definition: hsmclient.h:294
uint16_t statusFirewallRegionArr
Definition: hsmclient.h:213
uint16_t regionCount
Definition: hsmclient.h:210
uint8_t encKeyHash[64]
Definition: hsmclient.h:344
uint8_t context_length
Definition: hsmclient.h:260
int32_t HsmClient_readOTFARegions(HsmClient_t *HsmClient, OTFA_readRegion_t *OTFA_readRegion, uint32_t timeout)
Client request to read the OTFA regions.
Definition: hsmclient.c:2226
uint8_t revId
Definition: hsmclient.h:243
uint32_t regionStAddr
Definition: hsmclient.h:345
void HsmClient_unregister(HsmClient_t *HsmClient, uint8_t clientId)
unregister a client to a particular ClientId
Definition: hsmclient.c:508
uint8_t faultClear
Definition: hsmclient.h:228
uint32_t regionSize
Definition: hsmclient.h:346
uint32_t dataLength
Definition: hsmclient.h:309
uint8_t interruptEnable
Definition: hsmclient.h:225
uint32_t rowData
Definition: hsmclient.h:144
int32_t Hsmclient_loadHSMRtFirmware(HsmClient_t *gHSMClient, const uint8_t *pHSMRt_firmware)
Loads the HSMRt firmware. This is typically called by SBL.
Definition: hsmclient_loadhsmrt.c:323
uint8_t authKeyHash[64]
Definition: hsmclient.h:343
int32_t HsmClient_procAuthBootUpdate(HsmClient_t *HsmClient, SecureBoot_Stream_t *secureBootInfo)
The service issued to HSM Server helps with extended secure boot for applications.
Definition: hsmclient.c:1237
This is an NvmOtpRowCount type which holds the information regarding NvmOtp row count and size of eac...
Definition: hsmclient.h:156
int32_t HsmClient_getOTPRowProtection(HsmClient_t *HsmClient, NvmOtpRowProt_t *rowProt)
The service issued to HSM Server retrieves the extended otp efuse row protection status....
Definition: hsmclient.c:1064
This is the OTFA Region structure which holds individual region specific information to be read from ...
Definition: hsmclient.h:339
int32_t HsmClient_waitForBootNotify(HsmClient_t *HsmClient, uint32_t timeToWaitInTicks)
Current core will wait for bootnotify message from HSM core.
SemaphoreP_Object Semaphore
Definition: hsmclient.h:112
int32_t HsmClient_lockOTPRow(HsmClient_t *HsmClient, NvmOtpRowProt_t *rowProt)
The service issued to HSM Server sets the protection status bit of the specified row to 1....
Definition: hsmclient.c:930
int32_t HsmClient_writeOTPRow(HsmClient_t *HsmClient, NvmOtpRowWrite_t *writeRow)
The service issued to HSM Server writes the data to extended OTP efuse row based on row index provide...
Definition: hsmclient.c:863
uint8_t MinorVer
Definition: hsmclient.h:90
uint16_t firewallId
Definition: hsmclient.h:196
uint32_t * resultLengthPtr
Definition: hsmclient.h:279
int32_t HsmClient_getUID(HsmClient_t *HsmClient, uint8_t *uid, uint32_t timeout)
The service issued to HSM Server populates the Device UID by default the hsm flag is set to HSM_FLAG_...
Definition: hsmclient.c:583
uint8_t masterEnable
Definition: hsmclient.h:361
int32_t HsmClient_keyWriter(HsmClient_t *HsmClient, KeyWriterCertHeader_t *certHeader, uint32_t timeout)
The service issued to HSM Server verifies the certificate and process the keywriter operations,...
Definition: hsmclient.c:1520
uint8_t authMode
Definition: hsmclient.h:321
uint8_t macSize
Definition: hsmclient.h:360
uint8_t ClientId
Definition: hsmclient.h:117
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
int32_t HsmClient_getRandomNum(HsmClient_t *HsmClient, RNGReq_t *getRandomNum)
Returns the Random Number Generated.
Definition: hsmclient.c:1726
int32_t HsmClient_getDKEK(HsmClient_t *HsmClient, DKEK_t *getDKEK, uint32_t timeout)
The service issued to HSM Server retrieves the derived KEK based on identifier as param.
Definition: hsmclient.c:1453
uint8_t reserved
Definition: hsmclient.h:283
int32_t HsmClient_configOTFARegions(HsmClient_t *HsmClient, OTFA_Config_t *OTFA_ConfigInfo, uint32_t timeout)
Client request to configure the OTFA regions.
Definition: hsmclient.c:2158
uint8_t authKeyID
Definition: hsmclient.h:326
uint32_t rowCount
Definition: hsmclient.h:157
uint32_t regionSize
Definition: hsmclient.h:325
This is Firmware Update request structure passed to HSM core via SIPC as argument,...
Definition: hsmclient.h:307
uint8_t label_length
Definition: hsmclient.h:259
union HsmVer_t_ __attribute__((packed)) HsmVer_t
type for reading HSMRt version.
void HsmClient_SecureBootQueueInit(uint32_t configured_hsm_client_msg_queue_size)
Customize the size of the HSM client message queue.
Definition: hsmclient.c:497
uint8_t interruptEnableStatusClear
Definition: hsmclient.h:227
uint8_t regionNumber
Definition: hsmclient.h:340
uint16_t crcArr
Definition: hsmclient.h:211
This is RNG type which holds the resultPtr for derivation which is returned by TIFS....
Definition: hsmclient.h:277
uint8_t numRegions
Definition: hsmclient.h:358
int32_t HsmClient_procAuthBoot(HsmClient_t *HsmClient, uint8_t *cert, uint32_t cert_size, uint32_t timeout)
The service issued to HSM Server helps with extended secure boot for applications.
Definition: hsmclient.c:1131
int32_t HsmClient_getVersion(HsmClient_t *HsmClient, HsmVer_t *verId, uint32_t timeToWaitInTick)
populates the current HSMRT version Id by default the hsm flag is set to HSM_FLAG_AOP for this servic...
Definition: hsmclient.c:514
This is the OTFA Region structure which holds individual region specific information to be written to...
Definition: hsmclient.h:320
uint8_t DRBGMode
Definition: hsmclient.h:280
uint8_t authAesKey[16]
Definition: hsmclient.h:329
HsmMsg_t ReqMsg
Definition: hsmclient.h:114
This is an NvmOtpRead type which holds the information of NvmOtp row index and row data corresponding...
Definition: hsmclient.h:129
void HsmClient_deInit(void)
De initialize the HSM client for current core.