Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
5.2 KiB

  1. <HTML>
  2. <HEAD>
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-
  4. 1252">
  5. <META NAME="Generator" CONTENT="Microsoft Word 97">
  6. <TITLE>PCIIDE
  7. </TITLE>
  8. </HEAD>
  9. <BODY LINK="#0000ff">
  10. <FONT FACE="Verdana" SIZE=5><H2>PCIIDE
  11. </H2>
  12. </FONT><FONT FACE="Verdana" SIZE=2>
  13. <P><span style="color:#FF0000;font-size:10pt;font-family:Arial">[This is preliminary
  14. documentation and subject to change.]</span></P>
  15. <H3>SUMMARY</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
  16. 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.
  17. See the Release Notes section for more information. <p>
  18. This sample works on both x86 and Alpha platforms, and is 64-bit compliant. It builds with Microsoft&#174; Visual C&#174; 6.0. It does not implement Plug and Play or Power Management.
  19. <p>
  20. <H3>BUILDING THE SAMPLE</H3></FONT><FONT FACE="Verdana"
  21. SIZE=2><P>
  22. While in the \\Src\Storage\Miniide\Pciide directory, type <B>build</B>. A successful build will produce Pciide.sys.<p>
  23. <B>Note</B>: 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
  24. busmaster (DMA transfer) or PIO (Programmed I/O).<p>
  25. <H3>RELEASE NOTES</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
  26. Note that the driver model for IDE devices has changed in Microsoft&#174; Windows&#174; 2000.
  27. In Microsoft&#174; Windows NT&#174; 4.0, Atapi.sys, a SCSI miniport driver, links to Scsiport.sys.
  28. In Windows NT 4.0, then, it is Scsiport and Atapi together that make up the SCSI port driver.
  29. <P>
  30. In Windows 2000, there is still a driver called Atapi.sys, but it is a complete SCSI port driver.
  31. It does not link to any other driver.
  32. <P>
  33. The new driver model isolates the
  34. non-standard PCI IDE controller hardware interface into this PCI IDE minidriver.
  35. <H3>RESOURCES</H3></FONT><FONT FACE="Verdana" SIZE=2><P>
  36. See the Kernel Mode Drivers information in the Windows 2000 DDK documentation, specifically the sections
  37. on storage drivers in the Design Guide and in Reference. You will also find descriptions of the PciIdeX API's
  38. in this documentation. Note that the minidriver cannot access the registry, nor
  39. can it call other kernel mode APIs.
  40. <p>
  41. The PCI IDE mini driver returns its properties by using the following structure:<p>
  42. IDE_CONTROLLER_PROPERTIES {<br>
  43. <br>
  44. ULONG Size; <br>
  45. ULONG ExtensionSize; <br>
  46. ULONG SupportedTransferMode[MAX_IDE_CHANNEL][MAX_IDE_DEVICE]; <br>
  47. PCIIDE_CHANNEL_ENABLED PciIdeChannelEnabled; <br>
  48. PCIIDE_SYNC_ACCESS_REQUIRED PciIdeSyncAccessRequired; <br>
  49. PCIIDE_TRANSFER_MODE_SELECT_FUNC PciIdeTransferModeSelect; <br>
  50. BOOLEAN IgnoreActiveBitForAtaDevice;<br>
  51. BOOLEAN AlwaysClearBusMasterInterrupt;<br>
  52. PCIIDE_USEDMA_FUNC PciIdeUseDma;<br>
  53. ULONG AlignmentRequirement;<br>
  54. <p>
  55. } <p>
  56. <b>Members</b><p>
  57. <b>Size</b>
  58. <blockquote>sizeof (IDE_CONTROLLER_PROPERTIES).</blockquote>
  59. <b>ExtensionSize</b>
  60. <blockquote>Indicates the amount of memory PCI IDE mini driver
  61. needs for its private data.</blockquote>
  62. <b>SupportedTransferMode</b>
  63. <blockquote> Indicates all the data transfer modes the PCI IDE
  64. controller supports.</blockquote>
  65. <b>PciIdeChannelEnabled</b>
  66. <blockquote>Callback to query whether an IDE channel is enabled. Note that these callbacks are
  67. prototyped in Ide.h.</blockquote>
  68. <b>PciIdeSyncAccessRequired</b>
  69. <blockquote>Callback to query whether both IDE channels require
  70. synchronized (one channel at a time) access.</blockquote>
  71. <b>PciIdeTransferModeSelect</b>
  72. <blockquote>Callback to select proper transfer modes for the
  73. given devices.</blockquote>
  74. <b>IgnoreActiveBitForAtaDevice</b>
  75. <blockquote>Toggle to ignore busmaster
  76. status active bit at the end of an ATA data transfer. Normally, it should be FALSE.</blockquote>
  77. <b>AlwaysClearBusMasterInterrupt</b>
  78. <blockquote>Toggle to always clear the busmaster interrupt on every interrupt generated by the device. Normally, it should be FALSE.</blockquote>
  79. <b>PciIdeUseDma</b>
  80. <blockquote>Callback to determine whether DMA should be used or not
  81. called for every I/O.</blockquote>
  82. <b>AlignmentRequirement</b>
  83. <blockquote>Indicates if the miniport requires a different alignment.</blockquote>
  84. <p>
  85. <H3>CODE TOUR</H3>
  86. <H4>File Manifest</H4>
  87. </FONT><U><PRE>File&#9;&#9;Description
  88. </U>
  89. Init.c&#9; Main code base
  90. Pciide.h&#9;Private header file
  91. Msg.mc&#9; MC file
  92. Pciide.rc Resource file
  93. Makefile&#9;Makefile
  94. Sources&#9; Sources
  95. <p>
  96. </FONT><P ALIGN="CENTER"><A HREF="#top"><FONT FACE="Verdana" SIZE=2>Top of page</FONT></A><FONT FACE="Verdana" SIZE=2> </P></FONT>
  97. <TABLE CELLSPACING=0 BORDER=0 WIDTH=624>
  98. <TR><TD VALIGN="MIDDLE" BGCOLOR="#00ffff" HEIGHT=2>
  99. <P></TD>
  100. </TR>
  101. </TABLE>
  102. <FONT FACE="MS Sans Serif" SIZE=1><P>&copy; 1999 Microsoft Corporation</FONT><FONT FACE="Verdana" SIZE=2> </P></FONT></BODY>
  103. </HTML>