SE RT Services Utilities library

| SE RT Services Utilities library

Functions
Anti-rollback counter manipulation
IFX SE Generic Syscall API

## 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] | number | Anti-rollback counter number (0-15).
  [out] | value | The pointer to the counter value of ifx_se_fih_uint type.
  [in] | ctx | The 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] | number | Anti-rollback counter number (0-15).
  [in] | value | A new 32-bit counter value.
  [in] | ctx | The 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] | key | Identifier of the key which usage limit counter to read.
  [out] | value | The pointer to the 32-bit counter value.
  [in] | ctx | The 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