Freescale Semiconductor SEC2SWUG specifications Scatter-Gather Buffer Management, Notifyonerror

Page 12

User Interface

 

notify_on_error

pointer to the notify on error routine that will be called when the request has completed

 

unsuccessfully. May instead be a process ID if a user-state signal handler will flag

 

completion. Refer back to notifyFlags for more info.

ctxNotifyOnErr

context area that is filled in by the driver when there is an error.

status

will contain the returned status of request.

nextReq

pointer to next request which allows for multiple request to be linked together and sent

 

via a single ioctl function call.

The additional data in the process request structures is specific to each request; refer to the specific structure for this information.

3.3.7 Scatter-Gather Buffer Management

A unique feature of the SEC 2.0 processor is the hardware's ability to read and act on a scatter-gather description list for a data buffer. This allows the hardware to more efficiently deal with buffers located in memory belonging to a non-privileged process; memory which may not be contiguous, but instead may be at scattered locations determined by the memory management scheme of the host system. Any data buffer in any request may be “marked” as a scattered memory buffer by the requestor as needed.

For the requestor to do so, two actions must be taken:

A linked list of structures of type EXT_SCATTER_ELEMENT, one per memory fragment, must be constructed to describe the whole of the buffer's content.

The buffer pointer shall reference the head of this list, not the data itself. The buffers containing scatter references shall be marked in the request's scatterBufs element. Which bits get marked shall be determined by a helper function that understands the mapping used on an individual request basis.

3.3.7.1 Building the Local Scatter/Gather List with EXT_SCATTER_ELEMENT

Since individual operating systems shall have their own internal means defining memory mapping constructs, the driver cannot be designed with specific knowledge of one particular mapping method. Therefore, a generic memory fragment definition structure, EXT_SCATTER_ELEMENT is defined for this purpose.

Each EXT_SCATTER_ELEMENT describes one contiguous fragment of user memory, and is designed so that multiple fragments can be tied together into a single linked list. It contains these elements:

void *next;

pointer to next fragment in list, NULL if at end of list.

void *fragment; pointer to contiguous data fragment.

unsigned short size; size of this fragment in bytes.

With this, the caller must construct the list of all the fragments needed to describe the buffer, NULL terminate the end of the list, and pass the head as the buffer pointer argument. This list must remain intact until completion of the request.

3.3.7.2 Scatter Buffer Marking

For reasons of legacy compatibility, the structure of all driver request types maintains the same size and form as prior versions, with a minor change in that a size-compatible scatterBufs element was added as a modification to the channel element in other versions. This allows the caller a means of indicating which buffers in the request are

SEC 2.0 Reference Device Driver User’s Guide, Rev. 0

12

PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE

Freescale Semiconductor

Image 12
Contents Overview Freescale SemiconductorAcronyms and Abbreviations OverviewTerm Meaning SEC 2.0 Reference Device Driver User’s Guide, RevDevice Driver Components Device Driver StructureDevice Driver Components End-User ApplicationInterrupt Service Routine Driver Initialization RoutineRequest Dispatch Routine Process Request RoutineDeferred Service Routine User InterfaceApplication Interface User InterfaceError Handling = DpdaesacbcencryptcryptGlobal Definitions 1 I/O Control CodesChannel Definitions Second and Third Arguments in the ioctl FunctionCallback Error Status Return Code Operation ID opId MasksReturn Codes Channel DefinesSEC2ADDRESSPROBLEM SEC2CHAERRORSEC2PARITYSYSTEMERROR SEC2TEAERRORSEC2CANCELLEDREQUEST Miscellaneous Request StructuresSEC2INVALIDADDRESS Define DescriptionProcess Request Structures StatusreqNotifyonerror Scatter-Gather Buffer ManagementDirect Scatter-Gather Usage Example Individual Request Type Descriptions Random Number RequestsDES Requests RngreqARC4 Requests Descryptreq1 ARC4LOADCTXCRYPTREQ Descbccryptreq Valid Descriptors opId2 ARC4LOADKEYCRYPTUNLOADCTXREQ ARC4LOADCTXCRYPTREQ Valid Descriptor opIdARC4LOADKEYCRYPTUNLOADCTXREQ Valid Descriptor opId Hash Requests HashreqHashreq Valid Descriptors 0x4400 opId Hmac Requests HmacpadreqHashreq Valid Descriptors 0x4500 opId AES Requests AesacryptreqHmacpadreq Valid Descriptors opId Integer Public Key Requests ModexpreqAesacryptreq Valid Descriptors opId Modexpreq Valid Descriptor opIdModssexpreq MODR2MODNREQModssexpreq Valid Descriptor opId DpdmmssrsaexpModrrmodpreq 5 MOD2OPREQModrrmodpreq Valid Descriptor opId 0x5300MOD2OPREQ Valid Descriptors opId Value Function Description ECC Public Key Requests EccpointreqMOD2OPREQ Valid Descriptors opId 2 ECC2OPREQ Eccpointreq Valid Descriptors opIdEccspkbuildreq ECC2OPREQ Valid Descriptors opIdEccspkbuildreq Valid Descriptor opId DpdecspkbuildulctxIPSec Requests EccptadddblreqIpseccbcreq Eccptadddblreq Valid Descriptor opIdIpseccbcreq Valid Descriptors opId Descriptors Ipsececbreq Ipsececbreq Valid Descriptors opIdIpsecaescbcreq Ipsecaescbcreq Valid Descriptors opIdIpsecaesecbreq Ipsecespreq Ipsecaesecbreq Valid Descriptors opIdIpsecespreq Valid Descriptors opId Dpdipsecespinsdescbcdcrptshapad DPDIPSECESPOUTTDESCBCCRPTMD5PADDpdipsecespouttdescbccrptshapad DPDIPSECESPINTDESCBCDCRPTMD5PAD10 802.11 Protocol Requests Srtp Protocol RequestsCcmpreq SrtpreqSample Code DES SampleSrtpreq Valid Descriptors opId Ipsec Sample PRELIMINARY-SUBJECT to Change Without Notice Installation Linux EnvironmentOperation Driver Operation in User Mode VxWorks EnvironmentDriver Module License Macro VxWorks EnvironmentPorting Building the Interface ModulesBSP Integration VxWorks Interface Module VariablesInterrupt Service Routine Header FilesSource Files Conditional Compilation Debug MessagingDistribution Archive How to Reach Us

SEC2SWUG specifications

Freescale Semiconductor, a prominent player in the semiconductor industry, has made significant strides in developing robust solutions tailored for the automotive and industrial sectors. One such innovation is the SEC2SWUG (Security Configuration to Software User Guide), a comprehensive framework designed to enhance security protocols across various applications.

The SEC2SWUG is particularly vital in an era where cybersecurity threats are increasingly sophisticated. This tool is built to help developers implement security measures seamlessly during the software design phase, ensuring products are resilient against potential vulnerabilities. One of the main features of the SEC2SWUG is its versatility; it can be applied across a wide range of microcontrollers and processors offered by Freescale. This is particularly advantageous for engineers who require a consistent security approach across different platforms.

In terms of technology, the SEC2SWUG incorporates advanced cryptographic algorithms, allowing for data encryption, decryption, and authentication processes. This ensures that sensitive information remains secure, particularly in automotive applications where vehicle-to-everything (V2X) communication is becoming paramount. Moreover, the guide details the implementation of secure boot processes, which verify the integrity of firmware before it executes, bolstering overall system security.

Another key characteristic of SEC2SWUG is its user-friendliness. Freescale has focused on creating a resource that not only provides theoretical knowledge but also practical guidelines, making it easier for developers to integrate security protocols into their projects. The guide features clear annotations, example code snippets, and troubleshooting tips, which enhance the developer experience and facilitate a smoother transition from concept to execution.

Additionally, SEC2SWUG is designed to be scalable. As industries evolve, the demand for security measures will only grow, and this framework ensures that developers can adapt their solutions accordingly. Whether working on embedded systems, IoT applications, or complex automotive networks, the SEC2SWUG offers a robust security foundation.

In conclusion, Freescale Semiconductor's SEC2SWUG is a vital tool for engineers and developers looking to embed security into their applications. With its focus on advanced technologies and user-centric design, the SEC2SWUG stands at the forefront of secure software development, addressing the critical need for safety in interconnected systems.