RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures | Enumerator | Variables
Bee

Data Structures

struct  _bee_region_config
 BEE region configuration structure. More...
 

Variables

bee_aes_mode_t _bee_region_config::region0Mode
 
bee_aes_mode_t _bee_region_config::region1Mode
 
uint32_t _bee_region_config::region0AddrOffset
 
uint32_t _bee_region_config::region1AddrOffset
 
bee_security_level _bee_region_config::region0SecLevel
 
bee_security_level _bee_region_config::region1SecLevel
 
uint32_t _bee_region_config::region1Bot
 
uint32_t _bee_region_config::region1Top
 
bee_ac_prot_enable _bee_region_config::accessPermission
 
bee_endian_swap_enable _bee_region_config::endianSwapEn
 

Driver version

enum  _bee_aes_mode { kBEE_AesEcbMode = 0U , kBEE_AesCtrMode = 1U }
 BEE aes mode. More...
 
enum  _bee_region { kBEE_Region0 = 0U , kBEE_Region1 = 1U }
 BEE region. More...
 
enum  _bee_ac_prot_enable { kBEE_AccessProtDisabled = 0U , kBEE_AccessProtEnabled = 1U }
 BEE ac prot enable. More...
 
enum  _bee_endian_swap_enable { kBEE_EndianSwapDisabled = 1U , kBEE_EndianSwapEnabled = 0U }
 BEE endian swap enable. More...
 
enum  _bee_security_level { kBEE_SecurityLevel0 = 0U , kBEE_SecurityLevel1 = 1U , kBEE_SecurityLevel2 = 2U , kBEE_SecurityLevel3 = 3U }
 BEE security level. More...
 
enum  _bee_status_flags {
  kBEE_DisableAbortFlag = 1U , kBEE_Reg0ReadSecViolation = 2U , kBEE_ReadIllegalAccess = 4U , kBEE_Reg1ReadSecViolation = 8U ,
  kBEE_Reg0AccessViolation = 16U , kBEE_Reg1AccessViolation = 32U , kBEE_IdleFlag = BEE_STATUS_BEE_IDLE_MASK
}
 BEE status flags. More...
 
typedef enum _bee_aes_mode bee_aes_mode_t
 BEE aes mode.
 
typedef enum _bee_region bee_region_t
 BEE region.
 
typedef enum _bee_ac_prot_enable bee_ac_prot_enable
 BEE ac prot enable.
 
typedef enum _bee_endian_swap_enable bee_endian_swap_enable
 BEE endian swap enable.
 
typedef enum _bee_security_level bee_security_level
 BEE security level.
 
typedef enum _bee_status_flags bee_status_flags_t
 BEE status flags.
 
typedef struct _bee_region_config bee_region_config_t
 BEE region configuration structure.
 
void BEE_Init (BEE_Type *base)
 Resets BEE module to factory default values.
 
void BEE_Deinit (BEE_Type *base)
 Resets BEE module, clears keys for both regions and disables clock to the BEE.
 
void BEE_GetDefaultConfig (bee_region_config_t *config)
 Loads default values to the BEE region configuration structure.
 
void BEE_SetConfig (BEE_Type *base, const bee_region_config_t *config)
 Sets BEE configuration.
 
status_t BEE_SetRegionKey (BEE_Type *base, bee_region_t region, const uint8_t *key, size_t keySize)
 Loads the AES key for selected region into BEE key registers.
 
status_t BEE_SetRegionNonce (BEE_Type *base, bee_region_t region, const uint8_t *nonce, size_t nonceSize)
 Loads the nonce for selected region into BEE nonce registers.
 
uint32_t BEE_GetStatusFlags (BEE_Type *base)
 Gets the BEE status flags.
 
void BEE_ClearStatusFlags (BEE_Type *base, uint32_t mask)
 Clears the BEE status flags.
 
#define FSL_BEE_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))
 BEE driver version. Version 2.0.2.
 

Detailed Description

Macro Definition Documentation

◆ FSL_BEE_DRIVER_VERSION

#define FSL_BEE_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))

BEE driver version. Version 2.0.2.

Current version: 2.0.2

Change log:

  • 2.0.2
    • Bug Fixes
      • Fixed MISRA issue.
  • 2.0.1
    • Bug Fixes
      • Fixed bug in key user key loading sequence. BEE must be enabled during loading of user key.
      • Fixed typos in comments.
    • New Features
      • Added configuration setting for endian swap, access permission and region security level.
    • Improvements
      • Setting of AES nonce was moved from BEE_SetRegionKey() into separate BEE_SetRegionNonce() function.
        • Changed handling of region settings. Both regions are configured simultaneously by BEE_SetConfig() function. Configuration of FAC start and end address using IOMUXC_GPRs was moved to application.
      • Default value for region address offset was changed to 0.
  • 2.0.0
    • Initial version

Enumeration Type Documentation

◆ _bee_ac_prot_enable

BEE ac prot enable.

Enumerator
kBEE_AccessProtDisabled 

BEE access permission control disabled

kBEE_AccessProtEnabled 

BEE access permission control enabled

◆ _bee_aes_mode

BEE aes mode.

Enumerator
kBEE_AesEcbMode 

AES ECB Mode

kBEE_AesCtrMode 

AES CTR Mode

◆ _bee_endian_swap_enable

BEE endian swap enable.

Enumerator
kBEE_EndianSwapDisabled 

BEE endian swap disabled

kBEE_EndianSwapEnabled 

BEE endian swap enabled

◆ _bee_region

BEE region.

Enumerator
kBEE_Region0 

BEE region 0

kBEE_Region1 

BEE region 1

◆ _bee_security_level

BEE security level.

Enumerator
kBEE_SecurityLevel0 

BEE security level 0

kBEE_SecurityLevel1 

BEE security level 1

kBEE_SecurityLevel2 

BEE security level 2

kBEE_SecurityLevel3 

BEE security level 3

◆ _bee_status_flags

BEE status flags.

Enumerator
kBEE_DisableAbortFlag 

Disable abort flag.

kBEE_Reg0ReadSecViolation 

Region-0 read channel security violation

kBEE_ReadIllegalAccess 

Read channel illegal access detected

kBEE_Reg1ReadSecViolation 

Region-1 read channel security violation

kBEE_Reg0AccessViolation 

Protected region-0 access violation

kBEE_Reg1AccessViolation 

Protected region-1 access violation

kBEE_IdleFlag 

Idle flag

Function Documentation

◆ BEE_ClearStatusFlags()

void BEE_ClearStatusFlags ( BEE_Type base,
uint32_t  mask 
)

Clears the BEE status flags.

Parameters
baseBEE peripheral base address.
maskThe status flags to clear. This is a logical OR of members of the enumeration bee_status_flags_t

brief Clears the BEE status flags.

param base BEE peripheral base address. param mask The status flags to clear. This is a logical OR of members of the enumeration bee_status_flags_t

◆ BEE_Deinit()

void BEE_Deinit ( BEE_Type base)

Resets BEE module, clears keys for both regions and disables clock to the BEE.

This function performs hardware reset of BEE module and disables clocks. Attributes and keys from software for both regions are cleared.

Parameters
baseBEE peripheral address.

brief Resets BEE module, clears keys for both regions and disables clock to the BEE.

This function performs hardware reset of BEE module and disables clocks. Attributes and keys from software for both regions are cleared.

param base BEE peripheral address.

◆ BEE_GetDefaultConfig()

void BEE_GetDefaultConfig ( bee_region_config_t config)

Loads default values to the BEE region configuration structure.

Loads default values to the BEE region configuration structure. The default values are as follows:

config->region0Mode = kBEE_AesCtrMode;
config->region1Mode = kBEE_AesCtrMode;
config->region0AddrOffset = 0U;
config->region1AddrOffset = 0U;
config->region0SecLevel = kBEE_SecurityLevel3;
config->region1SecLevel = kBEE_SecurityLevel3;
config->region1Bot = 0U;
config->region1Top = 0U;
config->accessPermission = kBEE_AccessProtDisabled;
@ kBEE_AccessProtDisabled
Definition: fsl_bee.h:70
@ kBEE_EndianSwapEnabled
Definition: fsl_bee.h:78
@ kBEE_SecurityLevel3
Definition: fsl_bee.h:87
@ kBEE_AesCtrMode
Definition: fsl_bee.h:57
Definition: deflate.c:114
Parameters
configConfiguration structure for BEE peripheral.

brief Loads default values to the BEE region configuration structure.

Loads default values to the BEE region configuration structure. The default values are as follows: code config->region0Mode = kBEE_AesCtrMode; config->region1Mode = kBEE_AesCtrMode; config->region0AddrOffset = 0U; config->region1AddrOffset = 0U; config->region0SecLevel = kBEE_SecurityLevel3; config->region1SecLevel = kBEE_SecurityLevel3; config->region1Bot = 0U; config->region1Top = 0U; config->accessPermission = kBEE_AccessProtDisabled; config->endianSwapEn = kBEE_EndianSwapEnabled; endcode

param config Configuration structure for BEE peripheral.

◆ BEE_GetStatusFlags()

uint32_t BEE_GetStatusFlags ( BEE_Type base)

Gets the BEE status flags.

This function returns status of BEE peripheral.

Parameters
baseBEE peripheral address.
Returns
The status flags. This is the logical OR of members of the enumeration bee_status_flags_t

brief Gets the BEE status flags.

This function returns status of BEE peripheral.

param base BEE peripheral address.

return The status flags. This is the logical OR of members of the enumeration bee_status_flags_t

◆ BEE_Init()

void BEE_Init ( BEE_Type base)

Resets BEE module to factory default values.

This function performs hardware reset of BEE module. Attributes and keys from software for both regions are cleared.

Parameters
baseBEE peripheral address.

brief Resets BEE module to factory default values.

This function performs hardware reset of BEE module. Attributes and keys from software for both regions are cleared.

param base BEE peripheral address.

◆ BEE_SetConfig()

void BEE_SetConfig ( BEE_Type base,
const bee_region_config_t config 
)

Sets BEE configuration.

This function sets BEE peripheral and BEE region settings accorging to given configuration structure.

Parameters
baseBEE peripheral address.
configConfiguration structure for BEE.

brief Sets BEE configuration.

This function sets BEE peripheral and BEE region settings accorging to given configuration structure.

param base BEE peripheral address. param config Configuration structure for BEE.

◆ BEE_SetRegionKey()

status_t BEE_SetRegionKey ( BEE_Type base,
bee_region_t  region,
const uint8_t *  key,
size_t  keySize 
)

Loads the AES key for selected region into BEE key registers.

This function loads given AES key to BEE register for the given region. The key must be 32-bit aligned and stored in little-endian format.

Please note, that eFuse BEE_KEYx_SEL must be set accordingly to be able to load and use key loaded in BEE registers. Otherwise, key cannot loaded and BEE will use key from OTPMK or SW_GP2.

Parameters
baseBEE peripheral address.
regionSelection of the BEE region to be configured.
keyAES key (in little-endian format).
keySizeSize of AES key.

brief Loads the AES key for selected region into BEE key registers.

This function loads given AES key to BEE register for the given region. The key must be 32-bit aligned and stored in little-endian format.

Please note, that eFuse BEE_KEYx_SEL must be set accordingly to be able to load and use key loaded in BEE registers. Otherwise, key cannot loaded and BEE will use key from OTPMK or SW_GP2.

param base BEE peripheral address. param region Selection of the BEE region to be configured. param key AES key (in little-endian format). param keySize Size of AES key.

◆ BEE_SetRegionNonce()

status_t BEE_SetRegionNonce ( BEE_Type base,
bee_region_t  region,
const uint8_t *  nonce,
size_t  nonceSize 
)

Loads the nonce for selected region into BEE nonce registers.

This function loads given nonce(only AES CTR mode) to BEE register for the given region. The nonce must be 32-bit aligned and stored in little-endian format.

Parameters
baseBEE peripheral address.
regionSelection of the BEE region to be configured.
nonceAES nonce (in little-endian format).
nonceSizeSize of AES nonce.

brief Loads the nonce for selected region into BEE nonce registers.

This function loads given nonce(only AES CTR mode) to BEE register for the given region. The nonce must be 32-bit aligned and stored in little-endian format.

param base BEE peripheral address. param region Selection of the BEE region to be configured. param nonce AES nonce (in little-endian format). param nonceSize Size of AES nonce.

Variable Documentation

◆ accessPermission

bee_ac_prot_enable _bee_region_config::accessPermission

Access permission control enable/disable

◆ endianSwapEn

bee_endian_swap_enable _bee_region_config::endianSwapEn

Endian swap enable/disable

◆ region0AddrOffset

uint32_t _bee_region_config::region0AddrOffset

Region 0 address offset

◆ region0Mode

bee_aes_mode_t _bee_region_config::region0Mode

AES mode used for encryption/decryption for region 0

◆ region0SecLevel

bee_security_level _bee_region_config::region0SecLevel

Region 0 security level

◆ region1AddrOffset

uint32_t _bee_region_config::region1AddrOffset

Region 1 address offset

◆ region1Bot

uint32_t _bee_region_config::region1Bot

Region 1 bottom address

◆ region1Mode

bee_aes_mode_t _bee_region_config::region1Mode

AES mode used for encryption/decryption for region 1

◆ region1SecLevel

bee_security_level _bee_region_config::region1SecLevel

Region 1 security level

◆ region1Top

uint32_t _bee_region_config::region1Top

Region 1 top address