Intel EP80579 Security Camera User Manual


 
Intel
®
EP80579 Software for Security Applications on Intel
®
QuickAssist Technology
August 2009 PG
Order Number: 320183-004US 43
Programming Model—Security Software
10.0 Programming Model
10.1 What’s New in this Chapter
No updates in this release.
10.2 Overview
There are two different “categories” of API supplied with EP80579 integrated processor
software, as follows:
APIs which are part of the Intel
®
QuickAssist Technology program. The only API in
this software release which falls into this category is the [CRYPTO_API]. The set of
conventions governing these APIs are documented in Section 10.3, “Intel
®
QuickAssist Technology API Conventions” on page 43.
•“Other APIs, which are not part of the Intel
®
QuickAssist Technology program.
The only API in this software release which falls into this category is the
[DEBUG_API]. The set of conventions governing these APIs are documented in
Section 10.4, “Other API Conventions” on page 45.
10.3 Intel
®
QuickAssist Technology API Conventions
Note: This section discusses conventions for APIs which are part of the Intel
®
QuickAssist
Technology program, such as [CRYPTO_API].
10.3.1 Memory Allocation and Ownership
The convention is that all memory needed by an API implementation is allocated
outside of that implementation. In other words, the APIs are defined such that the
memory needed to execute operations are supplied by a client entity or platform
control entity rather than having memory allocated internally.
Memory used for parameters are owned by the side (caller or callee) that allocated
them. An owner is responsible for de-allocating the memory when it is no longer
needed. If an API has an allocation function, it shall also have a symmetric de-
allocation function. The caller of the allocation function acts as the owner and is
responsible for invoking the appropriate de-allocation routine when the memory is no
longer needed.
Generally, memory ownership does not change. For example, if a program allocates
memory and then passes a pointer to the memory as a parameter to a function call, the
caller retains ownership and is still responsible for de-allocation of the memory. This is
the default behavior and any function which deviates from this behavior must clearly
state so in the function definition.