SE RT Services Utilities library

| SE RT Services Utilities library

Data Structures | Enumerations | Functions
MPC protection management
IFX SE Generic Syscall API

## General Description

MPC protection management definitions.

## Data Structures
struct | ifx_se_mpc_rot_cfg_t
| MPC configuration structure. More...
struct | ifx_se_mpc_rot_cfg_crc_t
| MPC configuration structure with checksum. More...

## Enumerations
enum | ifx_se_mpc_access_attr_t { IFX_SE_MPC_ACCESS_DISABLED = 0x00 , IFX_SE_MPC_ACCESS_R = 0x01 , IFX_SE_MPC_ACCESS_W = 0x02 , IFX_SE_MPC_ACCESS_RW = 0x03 , IFX_SE_MPC_ACCESS_MAX = INT32_MAX }
| MPC access permission. More...
enum | ifx_se_mpc_sec_attr_t { IFX_SE_MPC_SECURE = 0x0 , IFX_SE_MPC_NON_SECURE = 0x1 , IFX_SE_MPC_SEC_ATTR_MAX = INT32_MAX }
| MPC security permission. More...
enum | ifx_se_mpc_size_t { IFX_SE_MPC_SIZE_4KB = 7 , IFX_SE_MPC_SIZE_MAX = INT32_MAX }
| MPC block size. More...
enum | ifx_se_mpc_prot_context_t { IFX_SE_MPC_PC_2 = 2 , IFX_SE_MPC_PC_3 = 3 , IFX_SE_MPC_PC_4 = 4 , IFX_SE_MPC_PC_5 = 5 , IFX_SE_MPC_PC_6 = 6 , IFX_SE_MPC_PC_7 = 7 , IFX_SE_MPC_PC_MAX = INT32_MAX }
| MPC protection context. More...

## Functions
ifx_se_status_t | ifx_se_mpc_config_rot_mpc_struct (const ifx_se_mpc_rot_cfg_crc_t *mpc_config, void *ctx)
| Initializes the MPC by setting the PC, NS/S and RW/R/W permissions for RRAM memory region. More...
ifx_se_status_t | ifx_se_mpc_lock (void *ctx)
| Locks the MPC configuration. More...

## Data Structure Documentation

## ◆ ifx_se_mpc_rot_cfg_t

struct ifx_se_mpc_rot_cfg_t

Data Fields
uint32_t | addr_offset | Offset in the memory from the memory start address.
uint32_t | size | Size of the memory.
ifx_se_mpc_size_t | region_size | Size of the memory region.
ifx_se_mpc_prot_context_t | pc | Protection Context.
ifx_se_mpc_sec_attr_t | secure | Security permissions for the region.
ifx_se_mpc_access_attr_t | access | Access permissions for the region.

## ◆ ifx_se_mpc_rot_cfg_crc_t

struct ifx_se_mpc_rot_cfg_crc_t

Data Fields
ifx_se_mpc_rot_cfg_t | mpc_config | MPC configuration data.
uint32_t | crc | checksum

## Enumeration Type Documentation

## ◆ ifx_se_mpc_access_attr_t

enum ifx_se_mpc_access_attr_t

MPC access permission.

Enumerator
IFX_SE_MPC_ACCESS_DISABLED | Read and Write disabled.
IFX_SE_MPC_ACCESS_R | Read enabled.
IFX_SE_MPC_ACCESS_W | Write enabled.
IFX_SE_MPC_ACCESS_RW | Read and Write enabled.
IFX_SE_MPC_ACCESS_MAX | Maximum value to fix enum size.

## ◆ ifx_se_mpc_sec_attr_t

enum ifx_se_mpc_sec_attr_t

MPC security permission.

Enumerator
IFX_SE_MPC_SECURE | Secure.
IFX_SE_MPC_NON_SECURE | Non-secure.
IFX_SE_MPC_SEC_ATTR_MAX | Maximum value to fix enum size.

## ◆ ifx_se_mpc_size_t

enum ifx_se_mpc_size_t

MPC block size.

Enumerator
IFX_SE_MPC_SIZE_4KB | 4 Kilobytes
IFX_SE_MPC_SIZE_MAX | Maximum value to fix enum size.

## ◆ ifx_se_mpc_prot_context_t

enum ifx_se_mpc_prot_context_t

MPC protection context.

Enumerator
IFX_SE_MPC_PC_2 | PC 2.
IFX_SE_MPC_PC_3 | PC 3.
IFX_SE_MPC_PC_4 | PC 4.
IFX_SE_MPC_PC_5 | PC 5.
IFX_SE_MPC_PC_6 | PC 6.
IFX_SE_MPC_PC_7 | PC 7.
IFX_SE_MPC_PC_MAX | Maximum value to fix enum size.

## Function Documentation

## ◆ ifx_se_mpc_config_rot_mpc_struct()

ifx_se_status_t ifx_se_mpc_config_rot_mpc_struct | ( | const ifx_se_mpc_rot_cfg_crc_t * | mpc_config,
|  | void * | ctx
| ) |  |

Initializes the MPC by setting the PC, NS/S and RW/R/W permissions for RRAM memory region.

This function allows to configure only one MPC structure: RRAM Host port with permissions for PC>1. Can be called by PC=2 only and does not allow to modify MPC configuration for the regions PC=2 does not have access to.

Parameters

  [in] | mpc_config | The pointer to the MPC configuration structure.
  [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

## ◆ ifx_se_mpc_lock()

ifx_se_status_t ifx_se_mpc_lock | ( | void * | ctx | ) |

Locks the MPC configuration.

This function allows to lock only one MPC structure: RRAM Host port

Parameters

  [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