PCIIDE

[This is preliminary documentation and subject to change.]

SUMMARY

This sample provides a generic example of a PCI IDE minidriver. The sample isolates vendor-specific code from the higher-level PCI IDE bus driver, much as SCSI minidrivers isolate code from the SCSI port driver. See the Release Notes section for more information.

This sample works on both x86 and Alpha platforms, and is 64-bit compliant. It builds with Microsoft® Visual C® 6.0. It does not implement Plug and Play or Power Management.

BUILDING THE SAMPLE

While in the \\Src\Storage\Miniide\Pciide directory, type build. A successful build will produce Pciide.sys.

Note: The sample needs a callback routine that will allow the driver to select a transfer mode for data transfer. Once implemented, the callee will be able to choose to have I/O requests passed as busmaster (DMA transfer) or PIO (Programmed I/O).

RELEASE NOTES

Note that the driver model for IDE devices has changed in Microsoft® Windows® 2000. In Microsoft® Windows NT® 4.0, Atapi.sys, a SCSI miniport driver, links to Scsiport.sys. In Windows NT 4.0, then, it is Scsiport and Atapi together that make up the SCSI port driver.

In Windows 2000, there is still a driver called Atapi.sys, but it is a complete SCSI port driver. It does not link to any other driver.

The new driver model isolates the non-standard PCI IDE controller hardware interface into this PCI IDE minidriver.

RESOURCES

See the Kernel Mode Drivers information in the Windows 2000 DDK documentation, specifically the sections on storage drivers in the Design Guide and in Reference. You will also find descriptions of the PciIdeX API's in this documentation. Note that the minidriver cannot access the registry, nor can it call other kernel mode APIs.

The PCI IDE mini driver returns its properties by using the following structure:

IDE_CONTROLLER_PROPERTIES {

ULONG Size;
ULONG ExtensionSize;
ULONG SupportedTransferMode[MAX_IDE_CHANNEL][MAX_IDE_DEVICE];
PCIIDE_CHANNEL_ENABLED PciIdeChannelEnabled;
PCIIDE_SYNC_ACCESS_REQUIRED PciIdeSyncAccessRequired;
PCIIDE_TRANSFER_MODE_SELECT_FUNC PciIdeTransferModeSelect;
BOOLEAN IgnoreActiveBitForAtaDevice;
BOOLEAN AlwaysClearBusMasterInterrupt;
PCIIDE_USEDMA_FUNC PciIdeUseDma;
ULONG AlignmentRequirement;

}

Members

Size

sizeof (IDE_CONTROLLER_PROPERTIES).
ExtensionSize
Indicates the amount of memory PCI IDE mini driver needs for its private data.
SupportedTransferMode
Indicates all the data transfer modes the PCI IDE controller supports.
PciIdeChannelEnabled
Callback to query whether an IDE channel is enabled. Note that these callbacks are prototyped in Ide.h.
PciIdeSyncAccessRequired
Callback to query whether both IDE channels require synchronized (one channel at a time) access.
PciIdeTransferModeSelect
Callback to select proper transfer modes for the given devices.
IgnoreActiveBitForAtaDevice
Toggle to ignore busmaster status active bit at the end of an ATA data transfer. Normally, it should be FALSE.
AlwaysClearBusMasterInterrupt
Toggle to always clear the busmaster interrupt on every interrupt generated by the device. Normally, it should be FALSE.
PciIdeUseDma
Callback to determine whether DMA should be used or not called for every I/O.
AlignmentRequirement
Indicates if the miniport requires a different alignment.

CODE TOUR

File Manifest

File		Description

Init.c		Main code base
Pciide.h	Private header file
Msg.mc		MC file
Pciide.rc	Resource file
Makefile	Makefile
Sources		Sources

Top of page

© 1999 Microsoft Corporation