Intel EP80579 Security Camera User Manual


 
Security Software—Using the Intel
®
QuickAssist Technology Cryptographic API
Intel
®
EP80579 Software for Security Applications on Intel
®
QuickAssist Technology
PG August 2009
64 Order Number: 320183-004US
2. Once the session has been initialized, the status of the session initialization is
returned to the application or framework, along with the session context handle.
The callback parameter is set to NULL for synchronous mode.
3. The application or framework calls the SymOpPerform function to perform a Crypto
Operation along with the data pointer on which to perform the operation.
4. The Cryptographic API makes a call to an internal function which handles the
operation and understands the message format to send to the SSU.
5. The Cryptographic API functions internally format the data as required by the
hardware and send it to the SSU.
6. The SSU performs the required crypto operation.
Note: At this point, behavior diverges depending on whether the function was
invoked synchronously or asynchronously.
7. The client process is blocked via a semaphore, see Figure 19.
8. The SSU after the operation is complete informs the software of the results via an
interrupt.
9. The Cryptographic API calls the opPerform completion callback, along with the
output data after formatting the data. This call executes in the context of a bottom
half.
10. An internal callback function is used instead of the client’s callback. The point of
execution is placed on a work queue after the message is sent to the SSU.
11. After the SSU completes the operation the internal callback is used to de-queue the
process on the work queue.
12. The process is de-queued and returns control to the client code.
12.4 Data Format
All input data to the Cryptographic API is in one of the following formats:
Flat Buffer: a simple, unchained buffer of physically contiguous memory
Buffer List: a scatter gather buffer list structure. It is expected that this buffer
structure will be used where more than one flat buffer can be provided on an
particular API
The supported format(s) vary across the API - see the API manual for details on the
formats that are supported by each individual API function.
12.4.1 Flat Buffers
Flat buffers are represented by the type CpaFlatBuffer, defined in cpa.h. Figure 20
shows the layout of the flat buffer. The data pointer, pData, points to the start address
of the data or payload, stored in Buffer. The length of this buffer specified in bytes is
stored in LenInBytes.
The data pointer, pData, is a virtual address, however the actual data pointed to is
required to be in contiguous physical memory. This buffer handle is typically used when
simple, unchained buffers are needed.
Sample routines for handling flat buffers are provided in the OCF shim code, see
[OCF_CODE] for details.