SEC 2.0 Reference Device Driver User's Guide
Table Of Contents
- SEC 2.0 Reference Device Driver User’s Guide
- 1 Overview
- 2 Device Driver Components
- 3 User Interface
- 4 Individual Request Type Descriptions
- 4.1 Random Number Requests
- 4.2 DES Requests
- 4.3 ARC4 Requests
- 4.4 Hash Requests
- 4.5 HMAC Requests
- 4.6 AES Requests
- 4.7 Integer Public Key Requests
- 4.8 ECC Public Key Requests
- 4.9 IPSec Requests
- 4.10 802.11 Protocol Requests
- 4.11 SRTP Protocol Requests
- 5 Sample Code
- 6 Linux Environment
- 7 VxWorks Environment
- 8 Porting

SEC 2.0 Reference Device Driver User’s Guide, Rev. 0
8 PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE Freescale Semiconductor
User Interface
The NUM_CHAS definition contains the total number of crypto hardware accelerators (CHAs) in SEC2 and is simply
defined as the sum of the individual channels.
The device name is defined as
/dev/sec2.
3.3.3 Operation ID (opId) Masks
Operation Ids can be broken down into two parts, the group or type of request and the request index or descriptor
within a group or type. This is provided to help understand the structuring of the opIds. It is not specifically needed
within a user application.
3.3.4 Return Codes
A complete list of the error status results that may be returned to the callback routines follows:
Table 3. Channel Defines
Define Description
NUM_AFHAS Number of ARC4 CHAs
NUM_DESAS Number of DES CHAs
NUM_MDHAS Number of MD CHAs
NUM_RNGAS Number of RNG CHAs
NUM_PKHAS Number of PK CHAs
NUM_AESAS Number of AESA CHAs
Table 4. Request Operation ID Mask
Define Description Value
DESC_TYPE_MASK The mask for the group or type of an opId 0xFF00
DESC_NUM_MASK The mask for the request index or descriptor within that group or type 0x00FF
Table 5. Callback Error Status Return Code
Define Description Value
SEC2_SUCCESS Successful completion of request 0
SEC2_MEMORY_ALLOCATION Driver can’t obtain memory from the host operating
system
0xE004FFFF
SEC2_INVALID_CHANNEL Channel specification was out of range. This exists for
legacy compatibility, and has no relevance for SEC2
0xE004FFFE
SEC2_INVALID_CHA_TYPE Requested CHA doesn’t exist 0xE004FFFD
SEC2_INVALID_OPERATION_ID Requested opID is out of range for this request type 0xE004FFFC
SEC2_CHANNEL_NOT_AVAILABLE Requested channel was not available. This error
exists for legacy compatibility reasons, and has no
relevance for SEC2
0xE004FFFB