User Context Operations
[Object-Manipulation Operations]

Functions

void fsl_shw_uco_init (fsl_shw_uco_t *user_ctx, uint16_t pool_size)
void fsl_shw_uco_set_reference (fsl_shw_uco_t *user_ctx, uint32_t reference)
void fsl_shw_uco_set_callback (fsl_shw_uco_t *user_ctx, void(*callback_fn)(fsl_shw_uco_t *uco))
void fsl_shw_uco_set_flags (fsl_shw_uco_t *user_ctx, uint32_t flags)
void fsl_shw_uco_clear_flags (fsl_shw_uco_t *user_ctx, uint32_t flags)
void fsl_shw_uco_set_wrap_key (fsl_shw_uco_t *user_ctx, fsl_shw_pf_key_t pf_key)

Detailed Description

These operations should be the only access to the fsl_shw_uco_t type/struct, as the internal members of the object are subject to change. The fsl_shw_uco_init() function must be called before any other use of the object.


Function Documentation

void fsl_shw_uco_clear_flags ( fsl_shw_uco_t user_ctx,
uint32_t  flags 
)

Clear flags in the User Context.

Turns off the flags specified in flags. Other flags are untouched.

Parameters:
user_ctx The User Context object to operate on.
flags ORed values from fsl_shw_user_ctx_flags_t.
void fsl_shw_uco_init ( fsl_shw_uco_t user_ctx,
uint16_t  pool_size 
)

Initialize a User Context Object.

This function must be called before performing any other operation with the Object. It sets the User Context Object to initial values, and set the size of the results pool. The mode will be set to a default of FSL_UCO_BLOCKING_MODE.

When using non-blocking operations, this sets the maximum number of operations which can be outstanding. This number includes the counts of operations waiting to start, operation(s) being performed, and results which have not been retrieved.

Changes to this value are ignored once user registration has completed. It should be set to 1 if only blocking operations will ever be performed.

Parameters:
user_ctx The User Context object to operate on.
pool_size The maximum number of operations which can be outstanding.
void fsl_shw_uco_set_callback ( fsl_shw_uco_t user_ctx,
void(*)(fsl_shw_uco_t *uco)  callback_fn 
)

Set the callback routine for the User Context.

Note that the callback routine may be called when no results are available, and possibly even when no requests are outstanding.

Parameters:
user_ctx The User Context object to operate on.
callback_fn The function the API will invoke when an operation completes.
void fsl_shw_uco_set_flags ( fsl_shw_uco_t user_ctx,
uint32_t  flags 
)

Set flags in the User Context.

Turns on the flags specified in flags. Other flags are untouched.

Parameters:
user_ctx The User Context object to operate on.
flags ORed values from fsl_shw_user_ctx_flags_t.
void fsl_shw_uco_set_reference ( fsl_shw_uco_t user_ctx,
uint32_t  reference 
)

Set the User Reference for the User Context.

Parameters:
user_ctx The User Context object to operate on.
reference A value which will be passed back with a result.
void fsl_shw_uco_set_wrap_key ( fsl_shw_uco_t user_ctx,
fsl_shw_pf_key_t  pf_key 
)

Select a key for the key-wrap key for key wrapping/unwrapping

Without a call to this function, default is FSL_SHW_PF_KEY_IIM. The wrap key is used to encrypt and decrypt the per-key random secret which is used to calculate the key which will encrypt/decrypt the user's key.

Parameters:
user_ctx The User Context object to operate on.
pf_key Which key to use. Valid choices are FSL_SHW_PF_KEY_IIM, FSL_SHW_PF_KEY_RND, and FSL_SHW_PF_KEY_IIM_RND.
footer
©  Freescale Semiconductor, Inc., 2007.  All rights reserved.
Freescale Confidential Proprietary
NDA Required
doxygen