SE RT Services Utilities library
Anti-rollback counter manipulation

General Description

Anti-rollback counter manipulation definitions.

Functions

ifx_se_status_t ifx_se_get_rollback_counter (ifx_se_fih_t number, ifx_se_fih_ptr_t value, void *ctx)
 This function reads the Anti-rollback counter. More...
 
ifx_se_status_t ifx_se_update_rollback_counter (ifx_se_fih_t number, ifx_se_fih_t value, void *ctx)
 Updates the anti-rollback counter to a higher value only. More...
 
ifx_se_status_t ifx_se_get_usage_limit_counter (ifx_se_key_id_fih_t key, ifx_se_fih_ptr_t value, void *ctx)
 This function reads the usage limit counter value for the given key. More...
 

Function Documentation

◆ ifx_se_get_rollback_counter()

ifx_se_status_t ifx_se_get_rollback_counter ( ifx_se_fih_t  number,
ifx_se_fih_ptr_t  value,
void *  ctx 
)

This function reads the Anti-rollback counter.

Parameters
[in]numberAnti-rollback counter number (0-15).
[out]valueThe pointer to the counter value of ifx_se_fih_uint type.
[in]ctxThe pointer to the SE syscall context that contain a special syscall data (IPC release callback etc).
Note
For OTP counters if the function is called in concurrent environment and RRAM controller is locked by another PC, the function immediately returns an error.
Returns
IFX_SE_SUCCESS for success or error code

◆ ifx_se_update_rollback_counter()

ifx_se_status_t ifx_se_update_rollback_counter ( ifx_se_fih_t  number,
ifx_se_fih_t  value,
void *  ctx 
)

Updates the anti-rollback counter to a higher value only.

Counters 0...7 are stored in OTP. Counters 8...15 are stored in SFLASH.

Parameters
[in]numberAnti-rollback counter number (0-15).
[in]valueA new 32-bit counter value.
[in]ctxThe pointer to the SE syscall context that contain a special syscall data (IPC release callback etc).
Note
For OTP counters if the function is called in concurrent environment and RRAM controller is locked by another PC, the function immediately returns an error.
Returns
IFX_SE_SUCCESS for success or error code

◆ ifx_se_get_usage_limit_counter()

ifx_se_status_t ifx_se_get_usage_limit_counter ( ifx_se_key_id_fih_t  key,
ifx_se_fih_ptr_t  value,
void *  ctx 
)

This function reads the usage limit counter value for the given key.

Parameters
[in]keyIdentifier of the key which usage limit counter to read.
[out]valueThe pointer to the 32-bit counter value.
[in]ctxThe pointer to the SE syscall context that contain a special syscall data (IPC release callback etc).
Returns
IFX_SE_SUCCESS for success or error code