?? sata.ug
字號:
Using Serial ATA (SATA)
a guide to all the requirements and problems
by Hale Landis
Version 15x and higher
--------------------------------------------------
NOTE: Find the most up-to-date SATA information at
www.ata-atapi.com/sata.htm
--------------------------------------------------
INTRODUCTION
------------
Use this guide with ATADRVR version 15 and/or ADVDRVR verion 0
and with any of Hale's programs that use ATADRVR version 15 or
ADVDRVR version 0 (ATACT, ATADEMO and ATAMDT) when using SATA
host controllers and SATA drives.
If you are testing SATA devies with ATACT or ATADEMO please
read this entire document!
FIRST, THINGS TO AVOID WHEN USING SATA
--------------------------------------
If you are setting up a system using SATA here are some things
you must be aware of:
* DO NOT operate SATA devices outside of a sealed system unit.
DO NOT operate SATA devices from a power supply that is not
the system unit's power supply.
* DO NOT tie wrap SATA cables together. DO NOT put sharp bends
in SATA cables. DO NOT route SATA cables near PATA cables.
Avoid placing SATA devices close to each other such that the
SATA cable connectors are close to each other.
* DO NOT operate a radio transmitter (such as a cell phone) near
an exposed SATA cable or device.
Why all these warning? The basic problem is the SATA cable
connector is not shielded. This has to be the number one most
stupid thing that has been done in the SATA world.
WHAT IS SATA?
-------------
Serial ATA or SATA is a serial interface version of ATA (or
Paraellel ATA or PATA).
SATA uses a 7 wire interface. Three of the wires are ground
signals. The other 4 are two pairs of differential signals - one
pair in each direction. SATA is using the transceiver technology
used by Fiber (Fibre) Channel. Today's hardware runs at 1.5GHz
and should be at 3GHz soon. ATA commands, status and data are
transmitted in packets on this interface. This is done such that
the traditional ATA command protocols are basically unchanged
(more about this below).
How fast is SATA? Well... There are claims that it can transfer
data up to 150Mbytes/second. Remember this is a burst data rate,
not an average data rate. Parallel ATA using UltraDMA mode 6
(UltraDMA 133) claims it can transfer data up to
133Mbytes/second. Again this is a burst data rate and not an
average data rate. Average data rates are probably less than 1/2
of these numbers, perhaps even as low as 1/3. Yes, SATA is in
theory "faster" - but not by much.
SATA-1+ and SATA-2 (neither are part of ATA/ATAPI-7 at this time)
include new data transfer and tagged command queuing schemes. It
is unclear if these things will ever appear in future ATA/ATAPI-x
standards. They may only appear in the SATA-2/SAS documents.
SATA supports a single device per SATA cable. A SATA cable can
be longer than a parallel ATA cable (limited to 1.5 feet),
perhaps up to 2 or 3 feet long.
PATA AND SATA CONFIGURATIONS (TODAY)
------------------------------------
There are four PATA and SATA configurations that are said to be
compatible and said to operate the same:
1) Traditional Parallel ATA
PCI bus <-> PATA controller
|
+--> Primary
| |
| +--> PATA drive
| |
| +--> PATA drive
|
+--> Secondary
|
+--> PATA drive
|
+--> PATA drive
2) PATA controller with SATA drive(s)
This example shows that two drives are SATA but all could be
SATA. The "bridge" is a PATA-to-SATA bridge device. These
are usually a "dongle" type device that plus in between the
PATA cable and the SATA drive.
PCI bus <-> PATA controller
|
+--> Primary
| |
| +--> bridge <-> SATA drive
| |
| +--> PATA drive
|
+--> Secondary
|
+--> PATA drive
|
+--> bridge <-> SATA drive
3) SATA controller with SATA drive(s)
Each SATA drive has a separate cable but the four drives are
made to look like a traditional PATA controller, as shown in
#1 above.
PCI bus <-> SATA controller
| | | |
| | | +--> SATA drive (Primary)
| | |
| | +--> SATA drive (Primary)
| |
| +--> SATA drive (Secondary)
|
+--> SATA drive (Secondary)
Note that many motherboards have both a PATA controller and a
SATA controller. If both controllers are enabled then in theory
you can have eight ATA/ATAPI devices on your system (four on PATA
and four on SATA).
LEGACY or NATIVE MODE?
----------------------
A PCI bus ATA (PATA or SATA) 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.
SATA PROGRAMMING (TODAY)
------------------------
2003...
SATA-1, the SATA version that will be included in ATA/ATAPI-7, is
designed to emulate traditiional parallel ATA. Most SATA host
controllers shipping today look like and are programmed just like
any other ATA host controller. These controllers are compatible
with the Intel ICHx design and compatible with the T13 1510D
document. This allows SATA controllers and devices to be used in
systems without BIOS or OS driver changes.
There are some SATA host controllers that are not ICHx compatible
and these require proprietary BIOS or OS drivers. We can only
hope that the Intel AHCI specification effort is successful in
bringing us a new and better SATA host controller standard.
USING SATA TODAY (2003)
-----------------------
The SATA controllers on the market today (that includes the Intel
ICH5 and the Silicon Image SATA controllers and others) are
compatible with the programming interface(s) of the Intel ICHx
traditonal PCI bus ATA controllers. The only exception is that
PIO and DMA mode have no meaning for SATA. So the PIO and DMA
timing information in the controller's PCI configuration space is
ignored.
If you are using ATADRVR (or a program like ATACT or ATADEMO that
uses ATADRVR) on one of today's (2003) SATA controllers you
should be on the lookout for problems such as:
* Random command failures - commands that normally execute with
no problem suddenly will fail with ABRT errors. Retrying the
command may be successful.
* ATA status of FFH in the middle of a command. Apparently this
is caused by a failure in the serial link between the host and
device.
* Other strange errors that you have never seen on PATA
controllers and devices.
(As of July 2003) It does not appear that any of these problems
are due to the way ATADRVR is implemented. SATA is described as
being "compatibile" with ATA and not requiring new ATA driver
software. Today's SATA controllers claim to be plug compatible
with today's PATA controllers. Clearly the problems some people
are seeing with SATA would indicate something is not correct with
these statements or that SATA is an unreliable interface.
(As of August 2003) It is now known that SATA is *NOT* plug
compatible with PATA. This is because the SATA interface has
error conditions that never happened on PATA interfaces. In
order to recover from these SATA errors, the SATA interface port
of the SATA device must be "reset". Starting with ATACT 3B and
ATADEMO 10B this new reset has been added to these programs.
SATA PROGRAMMING (TOMORROW)
---------------------------
2004 and beyond...
We don't know what SATA host controllers will look like a year
from now. We can only hope that we will finally have controllers
that will support four to eight or more SATA devices and that all
devices will be able to transfer data at the same time.
Basically this finally gives us the kind of I/O we want (and/or
need), fully independent I/O for each mass storage device, no
more waiting for one device to finish a command before we can
start a command on another device.
The problem today is that there is no public standard for how
future SATA controllers should be designed or programmed. Intel
has announced that they something called the AHCI specification.
But today (June 2003) this specification is under NDA.
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/
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -