RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Modules | Data Structures | Macros | Enumerator | Functions | Variables
Dcp_driver

Modules

 Dcp_driver_aes
 
 Dcp_driver_hash
 
 Dcp_nonblocking_driver_aes
 

Data Structures

struct  _dcp_work_packet
 DCP's work packet. More...
 
struct  _dcp_handle
 Specify DCP's key resource and DCP channel. More...
 
struct  _dcp_context
 DCP's context buffer, used by DCP for context switching between channels. More...
 
struct  _dcp_config
 DCP's configuration structure. More...
 

Macros

#define DCP_USE_DCACHE   1
 

Functions

void DCP_Init (DCP_Type *base, const dcp_config_t *config)
 Enables clock to and enables DCP.
 
void DCP_Deinit (DCP_Type *base)
 Disable DCP clock.
 
void DCP_GetDefaultConfig (dcp_config_t *config)
 Gets the default configuration structure.
 
status_t DCP_WaitForChannelComplete (DCP_Type *base, dcp_handle_t *handle)
 Poll and wait on DCP channel.
 

Variables

uint32_t _dcp_work_packet::nextCmdAddress
 
uint32_t _dcp_work_packet::control0
 
uint32_t _dcp_work_packet::control1
 
uint32_t _dcp_work_packet::sourceBufferAddress
 
uint32_t _dcp_work_packet::destinationBufferAddress
 
uint32_t _dcp_work_packet::bufferSize
 
uint32_t _dcp_work_packet::payloadPointer
 
uint32_t _dcp_work_packet::status
 
dcp_channel_t _dcp_handle::channel
 
dcp_key_slot_t _dcp_handle::keySlot
 
uint32_t _dcp_handle::swapConfig
 
uint32_t _dcp_handle::keyWord [4]
 
uint32_t _dcp_handle::iv [4]
 
uint32_t _dcp_context::x [208/sizeof(uint32_t)]
 
bool _dcp_config::gatherResidualWrites
 
bool _dcp_config::enableContextCaching
 
bool _dcp_config::enableContextSwitching
 
uint8_t _dcp_config::enableChannel
 
uint8_t _dcp_config::enableChannelInterrupt
 
uint32_t _dcp_hash_ctx_t::x [DCP_HASH_CTX_SIZE]
 

Driver version

enum  _dcp_status { kStatus_DCP_Again = MAKE_STATUS(kStatusGroup_DCP, 0) }
 DCP status return codes. More...
 
enum  _dcp_ch_enable {
  kDCP_chDisable = 0U , kDCP_ch0Enable = 1U , kDCP_ch1Enable = 2U , kDCP_ch2Enable = 4U ,
  kDCP_ch3Enable = 8U , kDCP_chEnableAll = 15U
}
 DCP channel enable. More...
 
enum  _dcp_ch_int_enable {
  kDCP_chIntDisable = 0U , kDCP_ch0IntEnable = 1U , kDCP_ch1IntEnable = 2U , kDCP_ch2IntEnable = 4U ,
  kDCP_ch3IntEnable = 8U
}
 DCP interrupt enable. More...
 
enum  _dcp_channel { kDCP_Channel0 = (1u << 16) , kDCP_Channel1 = (1u << 17) , kDCP_Channel2 = (1u << 18) , kDCP_Channel3 = (1u << 19) }
 DCP channel selection. More...
 
enum  _dcp_key_slot {
  kDCP_KeySlot0 = 0U , kDCP_KeySlot1 = 1U , kDCP_KeySlot2 = 2U , kDCP_KeySlot3 = 3U ,
  kDCP_OtpKey = 4U , kDCP_OtpUniqueKey = 5U , kDCP_PayloadKey = 6U
}
 DCP key slot selection. More...
 
enum  _dcp_swap {
  kDCP_NoSwap = 0x0U , kDCP_KeyByteSwap = 0x40000U , kDCP_KeyWordSwap = 0x80000U , kDCP_InputByteSwap = 0x100000U ,
  kDCP_InputWordSwap = 0x200000U , kDCP_OutputByteSwap = 0x400000U , kDCP_OutputWordSwap = 0x800000U
}
 DCP key, input & output swap options. More...
 
typedef enum _dcp_ch_enable _dcp_ch_enable_t
 DCP channel enable.
 
typedef enum _dcp_ch_int_enable _dcp_ch_int_enable_t
 DCP interrupt enable.
 
typedef enum _dcp_channel dcp_channel_t
 DCP channel selection.
 
typedef enum _dcp_key_slot dcp_key_slot_t
 DCP key slot selection.
 
typedef enum _dcp_swap dcp_swap_t
 DCP key, input & output swap options.
 
typedef struct _dcp_work_packet dcp_work_packet_t
 DCP's work packet.
 
typedef struct _dcp_handle dcp_handle_t
 Specify DCP's key resource and DCP channel.
 
typedef struct _dcp_context dcp_context_t
 DCP's context buffer, used by DCP for context switching between channels.
 
typedef struct _dcp_config dcp_config_t
 DCP's configuration structure.
 
#define FSL_DCP_DRIVER_VERSION   (MAKE_VERSION(2, 1, 6))
 DCP driver version. Version 2.1.6.
 

Detailed Description

Macro Definition Documentation

◆ FSL_DCP_DRIVER_VERSION

#define FSL_DCP_DRIVER_VERSION   (MAKE_VERSION(2, 1, 6))

DCP driver version. Version 2.1.6.

Current version: 2.1.6

Change log:

  • Version 2.1.6
    • Bug Fix
      • MISRA C-2012 issue fix.
  • Version 2.1.5
    • Improvements
      • Add support for DCACHE.
  • Version 2.1.4
    • Bug Fix
      • Fix CRC-32 computation issue on the code's block boundary size.
  • Version 2.1.3
    • Bug Fix
      • MISRA C-2012 issue fixed: rule 10.1, 10.3, 10.4, 11.9, 14.4, 16.4 and 17.7.
  • Version 2.1.2
    • Fix sign-compare warning in dcp_reverse_and_copy.
  • Version 2.1.1
    • Add DCP status clearing when channel operation is complete
  • 2.1.0
    • Add byte/word swap feature for key, input and output data
  • Version 2.0.0
    • Initial version

Typedef Documentation

◆ _dcp_ch_enable_t

DCP channel enable.

◆ _dcp_ch_int_enable_t

DCP interrupt enable.

◆ dcp_channel_t

DCP channel selection.

◆ dcp_key_slot_t

DCP key slot selection.

◆ dcp_swap_t

typedef enum _dcp_swap dcp_swap_t

DCP key, input & output swap options.

Enumeration Type Documentation

◆ _dcp_ch_enable

DCP channel enable.

Enumerator
kDCP_chDisable 

DCP channel disable

kDCP_ch0Enable 

DCP channel 0 enable

kDCP_ch1Enable 

DCP channel 1 enable

kDCP_ch2Enable 

DCP channel 2 enable

kDCP_ch3Enable 

DCP channel 3 enable

kDCP_chEnableAll 

DCP channel enable all

◆ _dcp_ch_int_enable

DCP interrupt enable.

Enumerator
kDCP_chIntDisable 

DCP interrupts disable

kDCP_ch0IntEnable 

DCP channel 0 interrupt enable

kDCP_ch1IntEnable 

DCP channel 1 interrupt enable

kDCP_ch2IntEnable 

DCP channel 2 interrupt enable

kDCP_ch3IntEnable 

DCP channel 3 interrupt enable

◆ _dcp_channel

DCP channel selection.

Enumerator
kDCP_Channel0 

DCP channel 0.

kDCP_Channel1 

DCP channel 1.

kDCP_Channel2 

DCP channel 2.

kDCP_Channel3 

DCP channel 3.

◆ _dcp_key_slot

DCP key slot selection.

Enumerator
kDCP_KeySlot0 

DCP key slot 0.

kDCP_KeySlot1 

DCP key slot 1.

kDCP_KeySlot2 

DCP key slot 2.

kDCP_KeySlot3 

DCP key slot 3.

kDCP_OtpKey 

DCP OTP key.

kDCP_OtpUniqueKey 

DCP unique OTP key.

kDCP_PayloadKey 

DCP payload key.

◆ _dcp_status

DCP status return codes.

Enumerator
kStatus_DCP_Again 

Non-blocking function shall be called again.

◆ _dcp_swap

enum _dcp_swap

DCP key, input & output swap options.

Function Documentation

◆ DCP_Deinit()

void DCP_Deinit ( DCP_Type base)

Disable DCP clock.

Reset DCP and Disable DCP clock.

Parameters
baseDCP base address

brief Disable DCP clock

Reset DCP and Disable DCP clock.

param base DCP base address

◆ DCP_GetDefaultConfig()

void DCP_GetDefaultConfig ( dcp_config_t config)

Gets the default configuration structure.

This function initializes the DCP configuration structure to a default value. The default values are as follows. dcpConfig->gatherResidualWrites = true; dcpConfig->enableContextCaching = true; dcpConfig->enableContextSwitching = true; dcpConfig->enableChannnel = kDCP_chEnableAll; dcpConfig->enableChannelInterrupt = kDCP_chIntDisable;

Parameters
[out]configPointer to configuration structure.

brief Gets the default configuration structure.

This function initializes the DCP configuration structure to a default value. The default values are as follows. dcpConfig->gatherResidualWrites = true; dcpConfig->enableContextCaching = true; dcpConfig->enableContextSwitching = true; dcpConfig->enableChannnel = kDCP_chEnableAll; dcpConfig->enableChannelInterrupt = kDCP_chIntDisable;

param[out] config Pointer to configuration structure.

◆ DCP_Init()

void DCP_Init ( DCP_Type base,
const dcp_config_t config 
)

Enables clock to and enables DCP.

Enable DCP clock and configure DCP.

Parameters
baseDCP base address
configPointer to configuration structure.

brief Enables clock to and enables DCP

Enable DCP clock and configure DCP.

param base DCP base address param config Pointer to configuration structure.

◆ DCP_WaitForChannelComplete()

status_t DCP_WaitForChannelComplete ( DCP_Type base,
dcp_handle_t handle 
)

Poll and wait on DCP channel.

Polls the specified DCP channel until current it completes activity.

Parameters
baseDCP peripheral base address.
handleSpecifies DCP channel.
Returns
kStatus_Success When data processing completes without error.
kStatus_Fail When error occurs.

brief Poll and wait on DCP channel.

Polls the specified DCP channel until current it completes activity.

param base DCP peripheral base address. param handle Specifies DCP channel. return kStatus_Success When data processing completes without error. return kStatus_Fail When error occurs.

Variable Documentation

◆ channel

dcp_channel_t _dcp_handle::channel

Specify DCP channel.

◆ enableChannel

uint8_t _dcp_config::enableChannel

DCP channel enable.

◆ enableChannelInterrupt

uint8_t _dcp_config::enableChannelInterrupt

Per-channel interrupt enable.

◆ enableContextCaching

bool _dcp_config::enableContextCaching

Enable the caching of contexts between the operations.

◆ enableContextSwitching

bool _dcp_config::enableContextSwitching

Enable automatic context switching for the channels.

◆ gatherResidualWrites

bool _dcp_config::gatherResidualWrites

Enable the ragged writes to the unaligned buffers.

◆ keySlot

dcp_key_slot_t _dcp_handle::keySlot

For operations with key (such as AES encryption/decryption), specify DCP key slot.

◆ swapConfig

uint32_t _dcp_handle::swapConfig

For configuration of key, input, output byte/word swap options