Macros | Functions
HSMLPF3.h File Reference

Detailed Description

Interface to initialize and shutdown the HSM.

This module provides functions for use of the Hardware Security Module.

The HSM initialization procedure must first enable the clock, then initialize the mailbox, and finally boot the device.

Crypto drivers that use the HSM may vary in usage of either HSMLPF3_Clock_Disable() or HSMLPF3_Sleep() when closing their handles.

Go to the source code of this file.

Macros

#define HSMLPF3_STATUS_SUCCESS   ((int_fast16_t)0)
 Successful status code. More...
 
#define HSMLPF3_STATUS_ERROR   ((int_fast16_t)-1)
 Generic error status code. More...
 

Functions

void HSMLPF3_enableClock (void)
 Enables clock for HSM, readying it for boot. More...
 
void HSMLPF3_disableClock (void)
 Disables clock for HSM, effectively powering it off. More...
 
int_fast16_t HSMLPF3_boot (void)
 Boots the HSM, readying it for crypto operations. More...
 
void HSMLPF3_initMbox (void)
 Initializes HSM mailbox, allowing token exchanges. More...
 
int_fast16_t HSMLPF3_sleep (void)
 Puts the HSM to sleep, lowering its power consumption. More...
 

Macro Definition Documentation

§ HSMLPF3_STATUS_SUCCESS

#define HSMLPF3_STATUS_SUCCESS   ((int_fast16_t)0)

Successful status code.

Functions return HSMLPF3_STATUS_SUCCESS if the function was executed successfully.

§ HSMLPF3_STATUS_ERROR

#define HSMLPF3_STATUS_ERROR   ((int_fast16_t)-1)

Generic error status code.

Functions return HSMLPF3_STATUS_ERROR if the function was not executed successfully and no more specific error is applicable.

Function Documentation

§ HSMLPF3_enableClock()

void HSMLPF3_enableClock ( void  )

Enables clock for HSM, readying it for boot.

Calling this function is the first step to making use of the HSM for crypto operations.

§ HSMLPF3_disableClock()

void HSMLPF3_disableClock ( void  )

Disables clock for HSM, effectively powering it off.

This function provides an alternative to putting the HSM in sleep when it no longer needs to be used.

§ HSMLPF3_boot()

int_fast16_t HSMLPF3_boot ( void  )

Boots the HSM, readying it for crypto operations.

This function submits a boot token to the HSM, and waits for a successful token result and for the firmware image to be accepted.

Calling this function when the HSM is already booted should return successfully without an unnecessary token submission.

Precondition
HSMLPF3_enableClock() has to be called first.
HSMLPF3_initMbox() has to be called first
Return values
HSMLPF3_STATUS_SUCCESSHSM booted successfully.
HSMLPF3_STATUS_ERRORError. Error output token, or HSM in bad state.

§ HSMLPF3_initMbox()

void HSMLPF3_initMbox ( void  )

Initializes HSM mailbox, allowing token exchanges.

Calling this function allows for the boot token and all future tokens to be sent to the HSM. HSMLPF3_initMbox() links to the mailbox(es), and specifies lockout and secure/non-secure access.

§ HSMLPF3_sleep()

int_fast16_t HSMLPF3_sleep ( void  )

Puts the HSM to sleep, lowering its power consumption.

This function submits a sleep token to the HSM, and waits for a successful token result.

Calling this function when the HSM is already asleep will still submit a sleep token.

Precondition
HSMLPF3_boot() has to be called first.
Return values
HSMLPF3_STATUS_SUCCESSHSM put to sleep successfully.
HSMLPF3_STATUS_ERRORError. Error output token, or HSM in bad state.
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale