Flow Mini Drive Development Guide
- Translation: CodeWarrior @ hs5 @ HS5
Note: This section details the STREAM.SYS drive that has been outdated. With the formal release of Microsoft Windows XP, Microsoft recommends hardware manufacturers to use the next generation of Class models - AvStream - to develop new, non-audio multimedia drivers. Relevant details can be found in the "AVSTream Overview" chapter. Microsoft now only provides basic support for stream.sys. If you want to develop an audio minidriver, please see the "Audio MiniPort Drivers".
Many devices are supported by providing streaming MINIDRIVER (operating system). In particular, video capture devices, such as digital cameras and DVD players, which are supported by providing streaming minidriver, similar to external audio devices. More describes "Video Capture Minidriver Design Guide" and "Vendor-Supplied DVD Drivers".
Streaming MINIDRIVER supports kernel stream. Here I assume that the readers of this article are familiar with the basic concepts of the internal nuclear stream. If you don't understand, please read "Kernel Streaming Overview" first.
The purpose of designing Stream Class Driver is to make the development of streaming devices easier by handling more detail of many and operating systems.
MINIDRIVER Let Stream Class Driver represent it to handle synchronization issues. For example, Stream Class Driver can serve as the I / O request for MiniDriver. MiniDriver can do multiprocessor platform security by let Class Driver handle synchronization problems, MiniDriver can do multiprocessor platform security, but code is not revenue. This is suitable for hardware of the back-end to the medium-end. (MEDIUM-End).
Class Driver will automatically synchronize file operations. For example, the operation of the mutex, a semaphores or event (Event), the operation of the open stream, and the open device can be properly serialized, and there is no need for MINIDRIVER participation.
Class Driver Abstract the specific implementation details of the internal nuclear stream from Minidriver.
Class Driver handles interactive action between all and PNP managers. E.g:
Class Driver represents Minidriver Creating a Functional Device Object.
Class Driver management resource settings (such as translation port addresses, translating and mapping memory range, connection interrupt)
Class Driver processes the PNP IRP package. For example, IRP_MN_START_DEVICE, OR IRP_MN_STOP_DEVICE.
All low-level buffer management is also done by Class Driver.
Assign the DMA adapter object if necessary.
The mapping buffer and creates a Scatter / Gather list for DMA.
Locking and flushing buffers for DMA and PIO
The correctness of all IO control codes is also done by Class Driver.
Class Driver puts a timestamp for all requests through the watchdog timer.
MiniDriver does not create an object object, which can share the device object of Class Driver when necessary. This saves the system resource occupation.
Each adapter only creates a device object. The MulitiPle Subdevice (called stream, stream) supported by the adapter is described in WDM streaming pins. I. Definition of Class Driver and Minidriver
Class Driver is an intermediate drive (or medium driver) provided by Microsoft to provide a simple interface between the MiniDriver and the operating system provided by the hardware vendor. MiniDriver is a hardware-related DLL that uses Microsoft's Class Driver to complete most of the actions in the way, which is called by the function. It is only available to control.
In the WDM model, MiniDriver registers all the hardware adapters associated with Class Driver, and Class Driver will create a file object (file object) to describe each adapter that it is registered. MiniDriver uses Class Driver's device object to perform system calls. The user-state customer code can access the Class Driver through the WDM streaming.
Interactions between Class Driver and MiniDriver include:
· MiniDriver does not create its own device object, but shares the Class Driver's device object when necessary, so that system resources can be saved.
· Each adapter can only create an object object. The MulitiPle Subdevice (called stream, stream) supported by the adapter is described in WDM streaming pins.