Partager via


PCI Bus Driver Registry Settings (Windows Embedded CE 6.0)

1/6/2010

The following registry key example shows the PCI bus driver registry keys, which are in %_WINCEROOT%\Public\Common\OAK\Drivers\PCIBus\PCIBus.reg.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI]
    "Dll"="PCIbus.dll"
    "Order"=dword:20
    "Flags"=dword:8
    "BusIoctl"=dword:2a0048
    "IClass"=multi_sz:"{CD149194-286F-4095-9694-D70E6AB867C3}=%b","{6F40791D-300E-44E4-BC38-E0E63CA8375C}=%b"

; Registry enumerator used for loading each PCI device driver instance   
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Instance]
    "InterfaceType"=dword:5
    "BusName"="PCI"

The following registry key example shows the template and resulting instance keys for the ES1371 driver located in %_WINCEROOT%\Public\Common\OAK\Drivers\WaveDev\PDD\ES1371. It is the template provided in your Platform.reg file.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\WaveDev]
    "Prefix"="WAV"
    "Dll"="es1371.dll"
    "Index"=dword:1
    "Order"=dword:0
    "Dma"=dword:5
    "Class"=dword:04
    "SubClass"=dword:01
    "ProgIF"=dword:00
    "VendorID"=multi_sz:"1274","1274"
    "DeviceID"=multi_sz:"1371","5880"
    "IsrDll"="giisr.dll"
    "IsrHandler"="ISRHandler"

The following registry key example shows the Instance registry key for instance 1 of the ES1371 driver.

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Instance\WaveDev1]
    DWORD: SysIntr = 0x20
    DWORD: Irq = 0x9
    DWORD: IoLen = 0x40
    DWORD: IoBase = 0xe000
    DWORD: BusNumber = 0x0
    DWORD: InterfaceType = 0x5
    DWORD: SubSystemID = 0x1371
    DWORD: SubVendorID = 0x1274
    DWORD: RevisionID = 0x8
    DWORD: DeviceID = 0x1371
    DWORD: VendorID = 0x1274
    DWORD: ProgIF = 0x0
    DWORD: SubClass = 0x1
    DWORD: Class = 0x4
    SZ: IsrHandler = ISRHandler
    SZ: IsrDll = giisr.dll
    DWORD: Dma = 0x5
    DWORD: Order = 0x0
    DWORD: Index = 0x1
    SZ: Dll = es1371.dll
    SZ: Prefix = WAV
    DWORD: InstanceIndex = 0x1

Everything the driver needs is provided by IoBase, IoLen, Irq and SysIntr. Device identification information is also provided, which includes Class, SubClass, ProgIF, VendorID, DeviceID, RevisionID, SubVendorID and SubSystemID. 0x5 is specified for the PCI InterfaceType, and 0 (zero) is specified for the PCI bus BusNumber. These specifications are useful when calling HalTranslateBusAddress or TransBusAddrToVirtual.

A driver reads the IoBase, IoLen, Irq, SysIntr, InterfaceType and BusNumber values out of the registry, and then calls TransBusAddrToVirtual to create a virtual base address to the device. The bus does not matter to the driver because all of the relevant information is provided for it. Thus, you can also use this driver for an ISA device, if the expected registry values are pre-set in the registry.

See Also

Concepts

Installable ISRs and Device Drivers

Other Resources

PCI Bus Driver