User guide

14 MPC184/MPC185 Security Co-Processor Software User’s Guide MOTOROLA
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
Global Definitions Global Definitions
4.5.3 MPC18x_NOTIFY_ON_ERROR_CTX Structure
Structure returned to the notify_on_error callback routine that was setup in the initial process request. This
structure contains the original request structure as well as an error and driver status.
unsigned long errorcode; // Error that the request generated
void *request; // Pointer to original request
STATUS_REQ driverstatus;// Detailed information as to the state of the
hardware and the driver at the time of an error
errorcode
—error that the request generated
*request—pointer to the original request
driverstatus—detailed information as to the state of the hardware and the driver at the time of
an error
4.6 Process Request Structures
All process request structures contain the same header information, which begins with the GENERIC_REQ
structure, though no such structure is explicitly defined.
unsigned long opId;
unsigned long channel;
PMPC18x_NOTIFY_ROUTINE notify;
PMPC18x_NOTIFY_CTX pNotifyCtx;
PMPC18x_NOTIFY_ON_ERROR_ROUTINE notify_on_error;
MPC18x_NOTIFY_ON_ERROR_CTX ctxNotifyOnErr;
int status;
void* nextReq;
opId
—operation Id which identifies what type of request this is.
channel—identifies the channel to be used for the request. A value of zero indicates that the
request is dynamic. If a request is specifically for static channels, zero is not valid.
notify—pointer to the notify routine that will be called when the request has completed
successfully.
pNotifyCtx—pointer to context area to be passed back through the notify routine.
notify_on_error—pointer to the notify on error routine that will be called when the request has
completed unsuccessfully.
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 ioclt function call.
The additional data in the process request structures is specific to the request; refer to the specific structure
for this information.