CRM_CM_LOAD_MASK

C

typedef int (*FUNC_CRM_CM_LOAD_MASK)(struct crmcmmask *c, uint32_t value);
#define CRM_CM_LOAD_MASK                                ((FUNC_CRM_CM_LOAD_MASK)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_CRM_CM_LOAD_MASK)))

Description

Loads random used in the AES counter-measures.

Counter-measures are available for the AES, if enabled in HW. This function initializes the user allocated object \p c with a new counter-measures mask load operation context and reserves the HW resource. After the initialization of \p c, this function starts the load of the counter-measure cryptographically secure random \p value. The function will return immediately. No data will be received for the load operation. The operation is considered successful if the status returned by CRM_CM_LOAD_MASK_WAIT() or CRM_CM_LOAD_MASK_STATUS() is ::CRM_OK. remark - it is under the user responsibility to call it after system boot (not automatically called).

Parameters

ParamDescription
ccounter-measures mask load operation context
valuecounter-measures random value to be loaded

Returns

CRM_OK CRM_ERR_INCOMPATIBLE_HW CRM_ERR_RETRY

CRM_CM_LOAD_MASK_WAIT

C

typedef int (*FUNC_CRM_CM_LOAD_MASK_WAIT)(struct crmcmmask *c);
#define CRM_CM_LOAD_MASK_WAIT                           ((FUNC_CRM_CM_LOAD_MASK_WAIT)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_CRM_CM_LOAD_MASK_WAIT)))

Description

Waits until the given AES counter-measures load operation has finished. This function returns when the counter-measures load operation was successfully completed, or when an error has occurred that caused the operation to terminate. The return value of this function is the operation status. After this call, all resources have been released and \p c cannot be used again unless CRM_CM_LOAD_MASK() is used. pre - CRM_CM_LOAD_MASK() function must be called first remark - this function is blocking until operation finishes.

Parameters

ParamDescription
ccounter-measures mask load operation context

See

CRM_CM_LOAD_MASK_STATUS()

Returns

CRM_OK CRM_ERR_INCOMPATIBLE_HW CRM_ERR_RETRY

CRM_CM_LOAD_MASK_STATUS

C

typedef int (*FUNC_CRM_CM_LOAD_MASK_STATUS)(struct crmcmmask *c);
#define CRM_CM_LOAD_MASK_STATUS                         ((FUNC_CRM_CM_LOAD_MASK_STATUS)(*(uint32_t *)(API_TABLE_BASE_ADDRESS + ATO_CRM_CM_LOAD_MASK_STATUS)))

Description

Returns the status of the given AES counter-measures load operation context.

If the operation is still ongoing, return ::CRM_ERR_HW_PROCESSING. In that case, the user can retry later.

When this function returns with a code different than ::CRM_ERR_HW_PROCESSING, the counter-measures mask load operation has ended and all resources used by counter-measures mask load operation context \p c have been released. In this case, \p c cannot be used for a new operation until CRM_CM_LOAD_MASK() is called again. pre - CRM_CM_LOAD_MASK() function must be called first

Parameters

ParamDescription
ccounter-measures mask load operation context

See

CRM_CM_LOAD_MASK_STATUS()

Returns

CRM_OK CRM_ERR_UNITIALIZED_OBJ CRM_ERR_HW_PROCESSING CRM_ERR_DMA_FAILED