The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

This document contains information product under development Motorola.


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



AN2469/D Rev. 1.1, 2/2003 MPC190 Device Driver Design Specification
This document contains information product under development Motorola. reflects current design MPC190 device drivers VxWorks, WindowsNT, RTLinux. design three drivers will consistent future. This document contains following topics: Topic Section Part "Architecture Overview" Section Part "Device Driver Structure" Section Part III, "Process Flow Chart" Section Part "Device Driver Interface" Section Part "Design Considerations" Section Part "References" Section Part VII, "Acronyms Abbreviations" Page
Part Architecture Overview
MPC190 latest Motorola's security processors which optimized process algorithms associated with IPSec, IKE, WTLS/WAP SSL/TLS, including RSA, signature, Diffe-Hellman, elliptic curve, DES, 3DES, SHA-1, MD-4, MD-5 ARC-4. MPC190 designed operate system. external processors access MPC190 through device drivers using system memory data storage. MPC190 resides address processor, therefore when application requires cryptographic functions, creates descriptors MPC190, defining cryptographic function performed, location data. MPC190 will decode descriptor allocate internal execution unit cryptographic computing. result predefine data buffer notified firing channel done interrupt. Figure shows physical overview MPC190 security processor.
More Information This Product, www.freescale.com
ther Peripherals
Memory
Physical Address
Bridge
Crypto Channel Crypto Channel Crypto Channel Crypto Channel Interface Crypto Channel Crypto Channel Crypto Channel Crypto Channel Crypto Channel Control
Auth
Arc-4
MPC190 Processor aranti Board
Figure 1-1. Physical Overview
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
MOTOROLA
Driver Initialize Routine
Application User Mode Kernel Mode Executive Service System Service
Manager
Kernel MPC190 Device Driver
MPC190 Board
Figure 1-2. Logical Overview WinNT
Part Device Driver Structure
General device driver should have these common routines components:
Driver Initialize Routine
device driver will have OS-specific loading initialization functions. general, these functions will ensure that MPC190 installed working, that device driver properly loaded, that requesting task issue processing requests. Windows device driver (Kernel Mode) service. loaded during system boot after system loaded. During driver loading phase, driver initialization routine should find MPC190, create IoDevice, MPC190 physical memory kernel memory space, allocate global storage initialize MPC190 crypto channels CHAs. last step register InterruptServiceRoutine listen interrupt events.
Request Dispatch Routine
device driver will have dispatch function. When task issues request processing, operating system will fire device driver dispatch routine pass request context buffer dispatch routine Irp. request dispatch routine will handle various requests based Stack's Major Function control code. request basic process like IO_Close, IO_Open,
MOTOROLA MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
Process Request Routine
IO_Create, will directly call these pre-registered functions normally these functions will complete request. request process request, will call Process Request Routine.
Process Request Routine
device driver will have process request function. When Request Dispatch routine sends Process Request, driver will determine MPC190 enough free resources process current request. does, driver will translate process request into sequence more Data Packet Descriptors start operation. MPC190 busy, process request will added queue.
Interrupt Service Routine
device driver will have interrupt service routine (ISR), which will triggered INTA interrupt line. Since interrupts shared, will first determine MPC190 generated interrupt. did, will clear interrupt schedule separate device driver function handle process request completion details. will short fast possible.
Processing Complete Routine
device driver will have processing complete function, which scheduled when processing request completed, runs lower priority than ISR. This function will determine which processing requests complete notify corresponding calling tasks. will then check processing request queue based available MPC190 resources, initiate more processing requests. WinNT provide mechanism that runs level priority handle these tasks.
Process Request Queue Routine
device driver will maintain processing request queue (protected Spin Lock Mutex, that process request function processing complete function modify queue same time). Process Request Queue Routine normally fired Processing Complete Routine using ScheduleNext( call. will queue_entry find available channel resource. successed, will move request from queue_entry ChannelAssignments. Then removes this queue_entry from request queue.
Other Functions
device driver will have other functions checking status driver, controlling driver MPC190, setting block size.
Part Process Flow Chart
MPC190 device driver four basic phases, initialization phrase, request process phase, interrupt service phase driver unload phase.
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
MOTOROLA
Other Functions
Driver Loading
Reset CHA/EU
Start loop find MPC190 card DevId/VendorId
Success?
Return Error auto unload
Find MPC190? Info Return Error auto unload
Reset Config Channel
IoCreateDevice (NT)
Success?
Return Error auto unload
Success? MPC190 physical memory
Success? Return Error auto unload
Return Error auto unload
Connect Enable Interrupt
Success? Return Error auto unload
Rngtest, FIPS test, Known-answer test
Allocate global variables
Success?
Return Error auto unload
Success? Init Spinlock, SemId Return Error auto unload
Return Success
Success? Return Error auto unload
Figure 3-3. Device Driver Initialization.
MOTOROLA
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
Other Functions
Driver Unloading
Cleanup resources
Close MPC190
Return Success
Figure 3-4. Device Driver Unload
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
MOTOROLA
Other Functions
Device request
Entering MPC190 Dispatch, switch type Irp_Open/Create
MPC190 Open
Return Success
Irp_Close
MPC190 Close
Return Success
Irp_DeviceControl
Switch ioctlCode
Default: type match
Proc_Req
ProcessRequest
Get_Status Return Error
Retrieve MPC190 Status
Control Reserve_Channel_Static
SetControl ReserverChannelStatic
Reserve_Channel_Manual
ReserveChannelManual
Assign_CHA
AssignCha
Release_CHA
ReleaseCha
Release_Channel
ReleaseChannel
Set_Block_Size
SetBlockSize
Default: ioctl code match
Return Error
Return Success
Figure 3-5. Request Process
MOTOROLA
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
Other Functions
Interrupt Service
Read MPC190 Interrupt Status Register
error Reset
Channel error Reset Channel
Processing Complete
Clean MPC190 Interrupt Status Register
Return TRUE
Figure 3-6. Interrupt Service
Part Device Driver Interface
IOCTL device driver function calls have limited capabilities passing data from device driver VxWorks RTLinux, single parameter). cryptographic processing requests, will single parameter pass pointer data structure that contains details request. There will different process request structure each type cryptographic processing supported MPC190. first member every request structure operation that used device driver determine format rest request structure. process request structures have channel member. process requests that work either dynamic mode static mode, channel zero indicate dynamic mode, valid channel number through indicate static mode. process requests that only work static mode, channel should valid channel number through
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
MOTOROLA
Global Variables Definition
process request structures have status member. This value filled device driver when interrupt operation occurs, reflects type interrupt done (normal status) error (error status). process request structures have notify member. This value used device driver notify application when request been completed. process request structures have next request member. This allows application chain multiple process requests together. hardware limit 2048 bytes data packet descriptor exported device driver. application issue process request with length device driver will handle details breaking request into proper size chunks.
4.1.1
Global Variables Definition
ChannelAssignments
following sections describe channel specific information channel assignments.
ChannelAssignments retains channel specified information, driver should lock while modifying. only process modify anytime. typedef struct
unsigned char assignment; unsigned char isChunked; ownerTaskId; void *firstRequest; void *currentRequest; unsigned long currentOffset; void *notify; **dpds; dpdCount; #ifdef WINNT PIRP Irp; **reqMdl; reqMdlCount; **dataMdl; dataMdlCount; #endif CHANNEL_ASSIGNMENT; CHANNEL_ASSIGNMENT
4.1.2
ChaAssignments
ChaAssignments retains assignment information. unsigned char ChaAssignments[NUM_CHAS];
MOTOROLA
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
Global Variables Definition
4.1.3
ProcessQueueTop ProcessQueueBottom
These QUEUE_ENTRY pointer retain pointer bottom pointer processing queue. QUEUE_ENTRY *ProcessQueueTop; QUEUE_ENTRY *ProcessQueueBottom;
4.1.4
ChannelAssignLock BlockSizeLock
ChannelAssignLock locks ChannelAssignments modification process while BlockSizeLock locks BlockSize modification process.
4.1.5
Other variables
FreeChannels; FreeRngas; FreeAfhas; FreeDesas; FreeMdhas; FreePkhas; unsigned long BlockSize; current block size unsigned long PCIBaseAddress; mapping base address unsigned long IntStatus[2]; Controller interrupt status register, 0x1010 unsigned long ChaAssignmentStatus[2]; Controller assignment status register, 0x1028 unsigned long Channel Pointer Status Register, 0x2010, 0x3010,.*/ unsigned long ChaError[NUM_CHAS][2]; EU/Cha Interrupt Status Register, 10030, 11030,. FIPS_AccessRole; FIPS_Connections;
4.1.6
Error return codes
return codes #define MPC190_SUCCESS #define MPC190_MEMORY_ALLOCATION (-1) #define MPC190_INVALID_CHANNEL (-2) #define MPC190_INVALID_CHA_TYPE (-3) #define MPC190_INVALID_OPERATION_ID (-4) #define MPC190_CHANNEL_NOT_AVAILABLE (-5) #define MPC190_CHA_NOT_AVAILABLE (-6) #define MPC190_INVALID_LENGTH (-7) #define MPC190_OUTPUT_BUFFER_ALIGNMENT (-8) #define MPC190_RNG_ERROR (-9) #ifdef WINNT #define #define #else #define MPC190_PCI_CARD_NOT_FOUND-1000) #define
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
MOTOROLA
Device Driver Interface #endif #define MPC190_PCI_IO_ERROR-1002) #define (-1003) #define (-1004)
Device Driver Interface
Open/Create-This function allows task device descriptor future calls device driver. Close-This function tells device driver that user task finished with device descriptor. IOCTL-This functions main interface device driver. Subfunctions identified their IOCTL control code. Subfunctions include: Status-Returns status MPC190 card, including crypto channel status, status, queue length. Third argument ioctl() call pointer MPC190_STATUS structure. Control-Allows caller modify certain MPC190 features, including Enable/Disable ReserveChannelManual, Enable/Disable ReserveChannelStatic, Enable/Disable Notify, Change Role Mode (FIPS Crypto Officer, FIPS User, Control). ProcessRequest-Allows caller make request more crypto processing functions. Third argument ioctl() call pointer specific request structure. ReserveChannelStatic-Statically allocates channel single task. Third argument ioctl() call unsigned long specifying channel number. ReserveChannelManual-Allows caller reserve crypto channel manual/debug/target mode. Third argument ioctl() call unsigned long specifying channel number. AssignCHA-Allows caller reserve specific either static channel manual channel. Third argument ioctl() call unsigned long bottom eight bits CHA, next eight bits channel number. More than assigned same channel calling this function multiple times. caller should check assignment status specified calling Status IOCTL function) before trying assign ReleaseCHA-Returns reserved normal (dynamic mode) device driver. Third argument ioctl() call unsigned long specifying release. ReleaseChannel-Frees reserved (static manual) channel. Third argument ioctl() call unsigned long specifying channel release. SetBlockSize-Controls block size that request data broken this size (DPD). Third argument ioctl() call unsigned long giving block size bytes. maximum block size (the hardware upper limit) 2048 bytes. Default value driver startup 2048 bytes.
This section lists different functions interface device driver.
Device Driver Internal Functions
This section describe different functions with their associated prototype, platform dependency, input, output return status.
MOTOROLA
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
Device Driver Internal Functions Table 4-1. Device Driver Internal Functions
Function Name Platform Dependent Prototype Purpose AssignCha VxWorks Linux channelCha bottom eight btis chaType next eight bits channel number (1-9) currentTaskId None MPC190_ SUCCESS success otherwise error code Input Output Return
reserve specific AssignCha (unsigned long either static channel channelCha, currentTaskId) manual channel.
task ChaNumToType translate number ChaNumToType (int cha) chaType Number None ChaType found MPC190_I NVALID_C HA_TYPE found. MPC190_ SUCCESS this type available otherwise MPC190_ CHA_NOT _AVAILAB MPC190_ SUCCESS success otherwise error code
CheckChas
Check avaiable least this type available)
chaType Type
None
CheckChas (int chaType)
MPC190 Driver Initialization
Device driver initialization routine
DriverObject PDRIVER_OBJE only) RegistryPath PUNICODE_STRI only)
None
MPC190DriverInit NTSTATUS (void) DriverEntry PDRIVER_OB JECT DriverObject, PUNICODE_S TRING RegistryPath)
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
MOTOROLA
Device Driver Internal Functions Table 4-1. Device Driver Internal Functions (continued)
Function Name Platform Dependent Prototype Purpose InterruptService Routine handle interrupts generated Channel (Done Error) indicated Interrupt Status Register Error, clean InterruptStatusR egister writing InterruptClearR egister. Finally call ProcessingCom plete routine. OpIdToChaType translate crypto operation OpIdToChaType (unsigned long OpId, *chaType) chaType later routine check this type available not. handle request routine ProcessRequ (void *req, callingTaskId, PIRP Irp) OpId crypto operation chaType type MPC190_ Success match, otherwise MPC190_I NVALID_ OPERATI ON_ID MPC190_ Success success, otherwise MPC190 error code. VxWorks Linux Interrupt PKINTERRUPT only) Context PVOID request Context only) None TRUE finished steps otherwise FALSE only) Input Output Return
void BOOLEAN MPC190Interr InterruptServiceRoutin uptServiceRo (void) utine PKINTERRUP Interrupt, PVOID Context)
ProcessRequest
pointer request buffer callingTaskId task
pointer request buffer
ProcessRequest (void *req, callingTaskId)
PIRP only)
MOTOROLA
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
Device Driver Internal Functions Table 4-1. Device Driver Internal Functions (continued)
Function Name Platform Dependent Prototype Purpose ReleaseCha VxWorks Linux channelCha Bottom eight btis chaType.the next eight bits channel number (1-9) currentTaskId None MPC190_ SUCCESS success otherwise error code. Input Output Return
release specific either ReleaseCha (unsigned long static channel channelCha, callingTaskId, locked) manual channel.
task
ReleaseChannel free reserved channel (either static channel manual channel.) Channel Channel number (1-9) currentTaskId task locked CHANNELS_UNL OCKED CHANNELS_LOC ReserveChanne lManual reserve crypto channel manual/debug mode Reserve ->chann MPC190_RESER channel VE_MANUAL number structure that currentTaskId allocated reserve MPC190_ SUCCESS success otherwise error code. None ReleaseChannel (unsigned long channel, callingTaskId, locked) MPC190_ SUCCESS success otherwise error code.
ReserveChannelManual (MPC190_RESERVE_MANUAL *reserve, callingTaskId)
task
ReserveChannl Static allocate channel single task. ReserveChannelStatic PULONG channel, callingTaskId) channel channel MPC190_ SUCCESS success otherwise error code.
channel channel number (1-9)
currentTaskId
number that allocated
task
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
MOTOROLA
Device Driver Internal Functions Table 4-1. Device Driver Internal Functions (continued)
Function Name Platform Dependent Prototype Purpose SetBlockSize control large blocks data broken VxWorks Linux newBlockSize None MPC190_ SUCCESS success otherwise error code. Input Output Return
SetBlockSize (unsigned long newBlockSize)
256-2048
MPC190Open
establish connection between driver service application.
NTSTATUS MPC190Open PDEVICE_OB JECT DeviceObject,I PIRP Irp)
MPC190O (DEV_HD *pDevHdr, mode, flag) Prototype (VxWorks) MPC190Cl (int devDesc)
DeviceObject
None MPC190_ SUCCESS success otherwise error code.
PDEVICE_OBJE MPC190O (NT) (struct inode *inode, struct file PIRP (NT) *filp)
MPC190Close
close connection between driver service application.
NTSTATUS MPC190Close PDEVICE_OB JECT DeviceObject, PIRP Irp)
MPC190Cl (int devDesc)
DeviceObject
None
PDEVICE_OBJ (NT)
MPC190_ SUCCESS success otherwise error code.
PIRP (NT) DevDesc device descriptor number
MPC190Cleanup only)
clean internal staff before connection closing.
NTSTATUS MPC190Clean up(IN PDEVICE_OB JECT DeviceObject,I PIRP Irp)
DeviceObject PDEVICE_OBJE (NT)
None
MPC190_ SUCCESS success otherwise error code.
PIRP (NT)
MOTOROLA
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
Device Driver Internal Functions Table 4-1. Device Driver Internal Functions (continued)
Function Name Platform Dependent Prototype Purpose MPC190Unload only) unload itself when driver unload. NTSTATUS MPC190Unload PDEVICE_OB JECT DeviceObject, PIRP Irp) NTSTATUS MPC190Dispa PDEVICE_OB JECT devDesc, PIRP Irp) Ioctl (int devDesc, ioctlCode, void *param) VxWorks Linux DeviceObject PDEVICE_OBJE (NT) None MPC190_ SUCCESS success otherwise error code. Input Output Return
PIRP (NT)
Control Dispatch
handle request dispatch different process function based ioctl code.
devDesc
None
Ioctl PDEVICE_OBJE (NT) (struct inode *nodePtr, struct file PIRP (NT) *devDesc, unsigned ioctlCode,
MPC190_ SUCCESS success otherwise error code.
unsigned long param)
PCIRead read numbers unsigned long from dest numUlongs number unsigned long read address start pointer data start pointer dest. None None
void PCIRead (unsigned long *data, numUlongs, volatile unsigned long *address)
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
MOTOROLA
Device Driver Internal Functions Table 4-1. Device Driver Internal Functions (continued)
Function Name Platform Dependent Prototype Purpose PCIWrite write numbers unsigned long from dest VxWorks Linux numUlongs number unsigned long read address start pointer dest None None Input Output Return
void PCIWrite (unsigned long *data, numUlongs, volatile unsigned long *address)
data start pointer ProcessingComplete handle time-critical process request done, then complete I/O. VOID ProcessingCo mplete PKDPC Dpc, PDEVICE_OB JECT deviceObject, PVOID SystemArg1, PVOID SystemArg2) None None
PKDPC void ProcessingComplete DeviceObject (void)
PDEVICE_OBJE (NT) SystemArg1 PVOID (NT) SystemArg2 PVIOD (NT)
RemoveQueueEntry
remove queue from queue entry chain
Entry pointer QUEUE_ENTRY Request request pointer Channel channel number
None
QUEUE_ENTRY* RemoveQueueEntry (QUEUE_ENTRY *entry)
queue_ent pointer
RequestToDpd
translate request structure RequestToDpd (void *request, channel) chain
None
MPC190 _SUCCE success otherwise error code.
None
ScheduleNext
process next request entry chain.
None
None
void ScheduleNext (void)
MOTOROLA
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
Multi Platform Support Considerations
Part Design Considerations
following sections describe considerations that needed designing multiple platform with MPC190 device.
Multi Platform Support Considerations
MPC190 device driver source should support multiple platforms, including WinNT, VxWorks, Linux. each platform, MPC190 device driver contains parts, platform dependent part common part. common part compiled under these three platforms. This part only provides common data processing computing functionality. platform dependent part will related tasks, like driver initialization, interrupt service routine
interface 32/64 words data transfers Issue.
MPC190 designed plug directly into v2.2 compliant bus. converted bus. Conversion introduce some problems, e.g. data alignment.
Endian Little Endian Issue.
WinNT little endian system while VxWorks endian system. endian introduces word order swap code. pre-compile flag recommended swap decision code.
Memory Considerations
[The following discussion applies WindowsNT RTLinux, VxWorks, which unified address space.] Tasks will call device driver with pointer process request structure allocated from task's memory space. device driver runs kernel space cannot access task space directly. Furthermore, when device driver does gain access process request data, must ensure that data page-locked, since page fault kernel mode result fatal error. driver should handle three types memory space:
5.4.1
DPDs:
device driver allocates fixed amount kernel memory startup, uses this area buffer ChannelAssignments[ chains inside ChannelAssignment[ This static kernel memory space allocated driver startup, deallocated when driver unloaded.
5.4.2
task's input memory space
device driver access task input memory space, access user memory space. device driver should user's input space system. Kernel functions will used page-lock task memory with User Mode along with IoReadAccess type. pointer physical memory equivalent will necessary.
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
MOTOROLA
Synchronization Considerations
5.4.3
task's output memory space
device driver access task output memory space, access user memory space. device driver should user's output space system. Kernel functions will used page-lock task memory with User Mode along with IoWriteAccess type. pointer physical memory equivalent will necessary.
Synchronization Considerations
MPC190 supports multi channel processing, When cryptographic execution done error happens, interrupt will generated. device driver's interrupt service routine must figure which channel done handle rest works, e.g. interrupt clean result data process IoComplete. From application point view, application user space. application prepares request structure, fill header field rest length pointer pairs. Then pass pointer request structure driver through DeviceIoControl function. device driver will accept request finish application's DeviceIoControl call. application should expect result ready immediately since MPC190 device driver handles output data asynchronously from DeviceIoControl return. There ways know whether cryptographic computing done not. first approach loop check request->status field since device driver will status field when computing done error code error happened. Another approach notify (callback) mechanism. application provides callback entry request structure. Then callback pointer passed device driver along with request pointer. After device driver finishes IoComplete, will call callback entry NULL. first approach (check status) safe efficient. second approach (notify) highly efficient. application's callback function should very atomic robust. time fault deadly loop callback function will damage device driver cause whole system halt.
Multi Card Support Considerations
There ways achieve this goal. single device driver control MPC190 devices. driver responsible search MPC190 devices then each MPC190 physical register unique memory space each MPC190 resource table. device driver also needed implement request pool dynamic channel request. advantage this approach simplicity application this driver dynamic channel request. application doesn't need know which MPC190 card slot number should used. only assumes that there will more logical channels CHAs available multi MPC190 devices used. disadvantage outweighs advantage using only single driver control multiple MPC190's. implementation single driver very complicate. Much more control code will needed handle multi cards. This will slow down driver performance. other drawback that single driver only handle multi cards request sequentially. also slow down overall performance. Further more, single MPC190 strange behavior, e.g. unexpected interrupt error, block driver affect rest other MPC190 processes. second approach (multi drivers multi cards) recommended. this approach, each MPC190 unique copy instance device driver. Each driver handles only MPC190. Different card's requests processed parallel without interfering with each other. application responsible determining which card use, other words, dynamic channel management should implemented application. device driver multiple copies. Each copy contains unique card number sorted incremental order. instance, MPC190SbDrvNT2.sys will start loop find MPC190 from only bind second card found.
MOTOROLA
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
Other Design Considerations/Issues
5.7.1
Other Design Considerations/Issues
Thread
following sections describe other design considerations
MPC190 device driver fully interrupt driven. request handled dispatch routine. processes request immediately without delay returns requests without waiting chip finish cryptographic operation. After chip finishes cryptographic operation, will generate interrupt. device driver interrupt service routine some priority routine handle result return process. application notified notify entry been passed device driver. from device driver's point view, single threading enough most performance requirements. device driver itself thread safe. From application's point view, multi threading could increase speed requests passing into driver also increase speed data processing after result ready. design multi thread application call device driver outside scope this document.
5.7.2
Processor
multi-processor systems need some amount locking between processors make sure access some data structures hardware done atomically. low-level locking code responsible serializing such access using spin-locks processor will busy-wait while trying acquire such lock that already been locked other processor). This operation resources some architectures. device driver should implement following exclusive locks: ChannelAssignLock lock protect ChannelAssignments data. BlockSizeLock lock protect BlockSize variable.
5.7.3
Interrupt
Most devices generate interrupt notify host computer that they have finished their tasks. device driver interrupt service routine (ISR), which will triggered INTA interrupt line. Since interrupts shared, will first determine MPC190 generated interrupt. did, will clear interrupt schedule separate device driver function handle process request completion details. will short fast possible.
5.7.3.1
Interrupt Processing WinNT
hardware triggers interrupt. does most time-critical processing clears interrupt. scheduled. routine continues processing completes requests sets hardware starts processing next portion multistage operation).
5.7.3.2
Synchronization
WinNT intrinsically multiprocessor system. services device, consequently processors could accessing same device registers common data area concurrently. This where Spin Lock comes
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com MOTOROLA
Other Design Considerations/Issues
5.7.4
Queue entry limitation
Queue entry chain dynamic pool unprocessed request. depth chain indicates processing capacity driver under channel overloading. queue entry chain consume very large amount system memory since some request contain large amount data. search manipulate large chain queue entry consume time. maximize depth queue entry very sensitive device driver performance.
5.7.5
Load balance
MPC190 device driver designed withstanding heavy request process load. dynamic request, device driver dynamically allocate free channel start process request without waiting other channel finish previous operation. device driver implements interrupt service routine time-critical processing deferred processing routine rest process. When request completed, device driver fires callback function notify application that request done.
5.7.6
Error Handling
Incorrect request. request empty required field empty. actual length buffer equal given length. OpId list real request structure type mismatched. Invalid notify entry passed MPC190 channel error MPC190 error actual length data buffer over boundary. Spin Lock deadly locked. Memory should cleaned Spin Lock unlocked error happened. Running resources
MPC190 device driver should capable tolerating most error conditions. These error conditions include:
5.7.7
MPC190Dump
MPC190 device driver should implement kernel trace mechanism dump useful message monitoring host. MPC190Dump supports multiple trace level filters. precompiled constant MPC190DebugLevel controls which messages level should dumped. These levels include:
#define MPCCONFIG #define MPCUNLOAD #define MPCINITDEV #define MPCIRPPATH #define MPCSTARTER #define MPCPUSHER #define MPCERRORS #define MPCTHREAD
((ULONG)0x00000001) ((ULONG)0x00000002) ((ULONG)0x00000004) ((ULONG)0x00000008) ((ULONG)0x00000010) ((ULONG)0x00000020 ((ULONG)0x00000040) ((ULONG)0x00000080)
MOTOROLA
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
Other Design Considerations/Issues
5.7.8
FIPS140-2 Level
Motorola's MPC190 Cryptographic Coprocessor System (MCCS) made distinct components: MPC190VF cryptographic coprocessor driver software used access chip's functionality. MCCS designed meet FIPS 140-2 level standard. following issues should considered: According definitions within FIPS 140-2, MCCS categorized Multi-chip Stand-alone cryptographic module, where Cryptographic Boundary defined entire enclosure host system. MCCS supports distinct operator roles: Crypto-Officer role User role. does enforce identity role based authentication. device driver implements this requirement introducing flag called Access Role. application role calling function change access role type. other words, application choose play either Crypto-Officer role User role itself. device driver only exposes control services functionality when application plays Crypto-Officer. only exposes cryptographic services application acts User. Only application user) time access MCCS even through host multi-tasking multi-user system. device driver enforce this introducing user current connection number. running under FIPS 140-2 mode, only user allowed connect driver. running under FIPS 140-2 mode, device driver will only expose FIPS approved algorithms provided MCCS: single CBC, triple (two keys three keys), SHA-1 hash Random Number Generator. device driver exposes algorithms provided MCCS under FIPS 140-2 mode. application access MCCS only through device driver interface. user level application directly access kernel without driver interface. user/application's responsibility handle storage distribution issues compliance with FIPS 140-2. also responsibility application zero keys when encounters cryptographic algorithm error when prior terminating. power self test required FIPS 140-2. test comprised following: Critical function test: Initialize, read write internal registers MPC190VF chip. continuous test: generated random number should match previous. bytest). cryptographic function test: cryptographic functions MCCS should tested.
self-test fails, fatal error code returned loader program device driver unloaded. allocated memory should zeroed free when loader program exits.
Part References
MPC190 Security Co-Processor User's Manual. Security Policy Motorola MPC190 Cryptographic Coprocessor System. Developing Windows Device Drivers, Programmer's Handbook Edward N.Dekker Joseph M.Newcomer ISBN 0-201-69590-1
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
MOTOROLA
Other Design Considerations/Issues
Part Acronyms Abbreviations
This section provides alphabetical glossary acronyms abbreviations used this document. AFHA-ARC-4 Hardware Accelerator. ARC-4-Encryption algorithm compatible with RC-4 algorithm developed RSA, Inc. Auth-Authentication. Execution Unit that performs authentication function MDEU, "Message Digest Execution Unit". CHA-Crypto Hardware Accelerator. This term synonymous with "Execution Unit" MPC190 User's Manual other documentation. DESA-DES Accelerator. DPD-Data Packet Descriptor MDHA-Message Digest Hardware Accelerator. PKHA-Public Hardware Accelerator. This term synonymous with PKEU MPC190 User's Manual other documentation. RNGA-Random Number Generator Accelerator.
Part VIII Revision History
Table summarizes revision history this document.
Table 8-1. Revision History
Revision Initial release. Added revision history updated with template. Substantive Change(s)
MOTOROLA
MPC190 Device Driver Design Specification More Information This Product, www.freescale.com
REACH USA/EUROPE/LOCATIONS LISTED: Motorola Literature Distribution P.O. 5405, Denver, Colorado 80217 1-303-675-2140 (800) 441-2447 JAPAN: Motorola Japan Ltd. SPS, Technical Information Center 3-20-1, Minami-Azabu Minato-ku Tokyo 106-8573 Japan 81-3-3440-3569
Information this document provided solely enable system software implementers Motorola products. There express implied copyright licenses granted hereunder design fabricate integrated circuits integrated circuits based information this document. Motorola reserves right make changes without further notice products herein. Motorola makes warranty, representation guarantee regarding suitability products particular purpose, does Motorola assume liability arising application product circuit, specifically disclaims liability, including without
ASIA/PACIFIC: Motorola Semiconductors H.K. Ltd. Silicon Harbour Centre, King Street Industrial Estate, N.T., Hong Kong 852-26668334 TECHNICAL INFORMATION CENTER: (800) 521-6274 HOME PAGE: www.motorola.com/semiconductors
limitation consequential incidental damages. "Typical" parameters which provided Motorola data sheets and/or specifications vary different applications actual performance vary over time. operating parameters, including "Typicals" must validated each customer application customer's technical experts. Motorola does convey license under patent rights rights others. Motorola products designed, intended, authorized components systems intended surgical implant into body, other applications intended support sustain life, other application which failure Motorola product could create situation where personal injury death occur. Should Buyer purchase Motorola products such unintended unauthorized application, Buyer shall indemnify hold Motorola officers, employees, subsidiaries, affiliates, distributors harmless against claims, costs, damages, expenses, reasonable attorney fees arising directly indirectly, claim personal injury death associated with such unintended unauthorized use, even such claim alleges that Motorola negligent regarding design manufacture part.
Motorola Stylized Logo registered U.S. Patent Trademark Office. digital trademark Motorola, Inc. other product service names property their respective owners. Motorola, Inc. Equal Opportunity/Affirmative Action Employer. Motorola, Inc. 2003
AN2469/D
More Information This Product, www.freescale.com

Other recent searches


TBR2500 - TBR2500   TBR2500 Datasheet
TBR2516 - TBR2516   TBR2516 Datasheet
SEA05L - SEA05L   SEA05L Datasheet
IXGK60N60B2D1 - IXGK60N60B2D1   IXGK60N60B2D1 Datasheet
IXGX60N60B2D1 - IXGX60N60B2D1   IXGX60N60B2D1 Datasheet
ESDALC6V1P6 - ESDALC6V1P6   ESDALC6V1P6 Datasheet
EL-302EL-303 - EL-302EL-303   EL-302EL-303 Datasheet
BY500-50 - BY500-50   BY500-50 Datasheet
BY500-1000 - BY500-1000   BY500-1000 Datasheet
AT6000 - AT6000   AT6000 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive