Chapter 9. Hardware InitializationCHAPTER OBJECTIVES
At the end of the last chapter, the sample parallel loopback driver was unrealistic in one critical area: the configuration of the parallel hardware was presumed. Hard-coded driver logic assumed that port hardware could be found at a fixed I/O address with a fixed IRQ level. Clearly, real driver code cannot be presumptuous. This chapter covers the subject of driver and device initialization. First, in sections 9.1 and 9.2 the challenges of initialization are discussed from a historical perspective. The role of the Windows 2000 Registry in tracking installed devices is covered. Next, the current Plug and Play architecture of Windows 2000 is discussed, including the use of layered drivers used in this implementation. The specifics of new IRP Dispatch functions are shown. Finally, the driver presented in the last chapter is "corrected" to use the Plug and Play architecture. The parallel port hardware is automatically detected and its real configuration is used.
|