User guide
MOTOROLA MPC184/MPC185 Security Co-Processor Software User’s Guide 13
PRELIMINARY—SUBJECT TO CHANGE WITHOUT NOTICE
Global Definitions
desencReq.keyData = mem.ptr;
mem.from = desKey;
mem.to = mem.ptr;
status = Ioctl(device, IOCTL_COPYFROM, &mem);
/* copy data to kernel memory */
mem.sz = len;
status = Ioctl(device, IOCTL_MALLOC, &mem);
desencReq.inData = mem.ptr;
mem.from = desData;
mem.to = mem.ptr;
mem.sz = len;
status = Ioctl(device, IOCTL_COPYFROM, &mem);
/* malloc kernel output memory */
mem.sz = len;
status = Ioctl(device, IOCTL_MALLOC, &mem);
desDecResult = mem.ptr;
status = Ioctl(device, IOCTL_MALLOC, &mem);
desEncResult = mem.ptr;
mem.sz = 8;
status = Ioctl(device, IOCTL_MALLOC, &mem);
desCtxOut = mem.ptr;
.
.
if (status = Ioctl(device, IOCTL_PROC_REQ, &desencReq))
.
.
4.5.2 STATUS_REQ Structure
Structure used to indicate the state of the MPC18x as well as the driver. Returned as a pointer by
GetStatus() and imbedded in all requests. Each element is a copy of the contents of the same register in
the MCP18x driver. This structure is also known as
MPC18x_STATUS through a typedef.
unsigned long ChaAssignmentStatusRegister[2];
unsigned long InterruptControlRegister[2];
unsigned long InterruptStatusRegister[2];
unsigned long IdRegister;
unsigned long ChannelStatusRegister[NUM_CHANNELS][2];
unsigned long ChannelConfigurationRegister[NUM_CHANNELS][2];
unsigned long CHAInterruptStatusRegister[NUM_CHAS][2];
unsigned long QueueEntryDepth;
unsigned long FreeChannels;
unsigned long FreeAfhas;
unsigned long FreeDesas;
unsigned long FreeMdhas;
unsigned long FreePkhas;
unsigned long FreeAesas;
unsigned long FreeKeas;
unsigned long BlockSize;










