⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dma.ug

📁 pc机上经由pci连接的ata和atapi设备驱动
💻 UG
📖 第 1 页 / 共 2 页
字号:
   signals.  When I modified a card I had to buy an ATA bus
   "prototype" card that had all the gold tabs on the ISA bus
   connector.  Then I ran the wires from the ATA connector on the
   simple/cheap ATA card to the correct tabs on the prototype
   card.  I have these two cards plugged into the ISA bus next to
   each other.

4) And finally, be careful when you do this -- make sure you have
   the correct tabs and pins indentified and make good solder
   connections.  And don't blame Hale Landis if you see smoke
   when you turn your system on!  And GOOD LUCK!


USING MW DMA MODE 0 WITH ATACT AND ATADEMO
------------------------------------------

To have ATACT or ATADEMO use ISA MW DM mode 0, use the DMA=ISAn
option on the ATACT or ATADEMO command line.  Your system will
require an ISA bus ATA host adapter with the ATA interface DMA
signals connected.


USING MW DMA MODES 1 OR 2
-------------------------

You need PCI bus ATA host adapter and the proper software to
program the host adapter hardware.  In ATADRVR, this support is
known as PCI Bus Mastering DMA support.  See below.


USING ULTRA DMA MODES 0, 1 OR 2
-------------------------------

You need a PCI bus ATA host adapter and the proper software to
program the host adapter hardware.  In ATADRVR, this support is
known as PCI Bus Mastering DMA support.  See below.


USING ULTRA DMA MODES 3 OR 4 OR 5
---------------------------------

You need a PCI bus ATA host adapter and the proper software to
program the host adapter hardware.  You *must* have an
80-conductor ATA cable to use these modes.  In ATADRVR, this
support is known as PCI Bus Mastering DMA support.  See below.


PCI BUS MASTERING DMA
---------------------

Most PCI bus motherboards now have two ATA host adapters built
into the "south bridge" chip of the motherboard chipset.  Most of
these motherboard chipsets will claim to be "Intel compatible".
It is difficult to determine how true any of these claims may be
since there is very little real documentation on how these host
adapters are setup and operated.

If the host adapter can be a PCI "bus master" then the host
adapter probably supports either (or both) ATA MW DMA or ATA
Ultra DMA.


SOME PROBLEMS WITH PCI BUS MASTERING DMA
----------------------------------------

You may want to read the T13 1510D document and take note of the
description of the Interrupt (bit 2) and the BusMasterActive (bit
0) bits of the BMCR Status register.  These bits define four
states for the PCI DMA transfer:

   a) DMA transfer in progress,
   b) the device asserted INTRQ and the end of the PRD
      list was reached,
   c) the device asserted INTRQ and the end of the PRD
      list was not reached,
   d) the end of the PRD list was reached and the device
      has not asserted INTRQ.

States b) and c) indicate normal completion of a command.  State
d) will result in a timeout error when the host software doesn't
see the device complete the command (because the device is
waiting to transfer data with DMARQ asserted but the DMA channel
doesn't respond with DMACK and transfer any data).

When setting up DMA commands to an ATA device, or to an ATAPI
device when with a fixed sector size will be transferred, there
is no problem for the host software to program the DMA channel
for the exact number of bytes that will be transferred.  This
will result in state b) at the end of the command.

When setting up DMA commands to an ATAPI device for a command
that transfers an unknown number of bytes the host must program
the DMA channel to transfer a number of bytes that is more than
the maximum number of bytes the device is likely to transfer.
This will result in state c) at the end of the command.  The
problem with state c) is that there is no way to determine the
number of bytes the ATAPI device has transferred.  This makes
using PCI DMA with an ATAPI device highly questionable.

Note that most ATAPI Packet commands, even commands like Request
Sense or Inquiry, may transfer an different number of bytes each
time the command is executed.  Even if the "length" fields in the
data indicate there should be n bytes of data transferred, there
is no way to confirm that n bytes of data were actually
transferred.  So if you see data corruption problems with ATAPI
devices while using PCI DMA then this could be the problem.

It should be noted here that with ISA bus DMA controllers it is
possible to compute the number of bytes transferred by the
device.


LEGACY or NATIVE MODE?
----------------------

A PCI bus ATA controller can operate in "legacy" or "native"
mode.  This is Intel terminology to describe how a controller is
configured on the PCI bus.  Legacy mode describes a controller
useing the traditional ATA controller I/O port address and IRQ
numbers.  Native mode describes a controller not operating the
Legacy mode.  The basic differences are:

   * Legacy uses these I/O port address and IRQ numbers

      - primary I/O ports 1F0-1F7 and 3F6 with IRQ 14,

      - secondary I/O ports 170-177 and 376 with IRQ 15.

   * Native can use any range of I/O port adress as long as there is
      no conflict with another device.  But native uses only one IRQ
      for both the primary and secondary sides.

Note that ATADRVR version 15 supports both moes but supports
interrupts only in native mode.


USING ANY MW DMA MODES WITH ATACT OR ATADEMO
USING ANY ULTRA DMA MODES WITH ATACT OR ATADEMO
-----------------------------------------------------

To use any of these ATA DMA modes, your system must have an Intel
"south bridge" compatible PCI bus ATA host adapter.  Plus that
ATA host adapter must be Intel "southbridge" ICHx compatible.

To have ATACT or ATADEMO use PCI Bus Mastering DMA specify the
DMA=PCI option on the ATACT or ATADEMO command line.  This will
cause ATACT or ATADEMO to attempt PCI DMA configuration.  This
configuration requires the following:

1) One or more PCI bus mastering ATA host adapters must be
   found.  If the PCIDEV option is not specified and only one
   host adapter is found, PCIDEV will be defaulted to that one.
   If more than one host adapter is found the PCIDEV option must
   be specified to select the one that will be used.

2) The following data must exist in the PCI configuration data:

   a) offsets 10-17 or 18-1c may specify the I/O address of the
   primary or secondary ATA Command and Control block addresses.
   If these offsets are zero then it is assumed the host adapter
   is operating in legacy mode using the standard ATA host
   adapter addresses, either 1Fx:3F6 with IRQ 14 or 17x:376 with
   IRQ 15. If these offsets are not zero then the controller
   is operating in native mode.

   b) offsets 20-23 must specify an I/O address in the range
   0300H to FFF0H and the least significant 4 bits must be zero.
   This is the I/O address of the Bus Master Control Registers
   (BMCR).

3) The following data should exist in the BMCR:

   a) For testing of device 0 offset 2 bit 6 should be 1.

   b) For testing of device 1 offset 2 bit 5 should be 1.

4) The Identify Device data for the devices to be tested will be
   checked.  Identify Device words 63 and 88 must contain valid
   data indicating that the device is operating in a Multiword
   DMA or Ultra DMA mode.

Assuming your system passes all these requirements, then ATACT or
ATADEMO will be able to use PCI Bus Mastering DMA.


ADDITIONAL INFORMATION ABOUT PCI DMA
------------------------------------

Please note this additional information concerning PCI DMA:

1) At no time is the PCI configuration data for the ATA host
   adapter altered by ATADRVR, ATACT or ATADEMO.  The
   configuration data is where various PCI bus and ATA interface
   modes are configured and it is where the location of the BMCR
   registers is defined.  I hope you have documentation of this
   data for your host adapter and, if required, I hope you have a
   way to alter this data.  Maybe the system BIOS can affect
   changes to this data or maybe the vendor of your PCI chipset
   has supplied you with a utility program that can alter this
   data.

2) ATADRVR (also ATACT and ATADEMO) do not change the setting of
   bits 6 and 5 in offset 2 of the BMCR registers.  These bits
   should be set to indicate if DMA is supported on devices 0 and
   1. I hope your system BIOS is setting these bits correctly or,
   if required, you have a way to alter these bits.

3) You may not be able to determine which DMA mode is being used
   by the PCI ATA host adapter without using a logic analyzer to
   look at the ATA interface signals.  It appears that the PCI
   configuration data is unreliable on some host adapters (even
   when this data has Ultra DMA disabled, the host adapter uses
   Ultra DMA!).


QUESTIONS OR PROBLEMS?
----------------------

Send your question(s) or problem description(s) to Hale Landis
via email at this address:

   hlandis@ata-atapi.com

Visit Hale's web site:

   www.ata-atapi.com


/end/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -