source: trunk/src/os2ahci/README@ 90

Last change on this file since 90 was 90, checked in by chris, 15 years ago
  • Added README
File size: 9.2 KB
Line 
1====================================================================
2 eComStation AHCI Driver
3====================================================================
4
5
6Introduction
7============
8
9OS2AHCI is an AHCI driver for eComStation and OS/2 3.x or later. It
10supports both ATA and ATAPI devices in a single driver, thus there's
11no need for an ATAPI/CDROM filter driver.
12
13
14Copyrights
15==========
16
17Copyright (c) 2011 thi.guten Software Development
18Copyright (c) 2011 Mensys B.V.
19
20Authors: Christian Mueller, Markus Thielen
21
22Parts copied from/inspired by the Linux AHCI driver;
23those parts are (c) Linux AHCI/ATA maintainers
24
25 This program is free software; you can redistribute it and/or modify
26 it under the terms of the GNU General Public License as published by
27 the Free Software Foundation; either version 2 of the License, or
28 (at your option) any later version.
29
30 This program is distributed in the hope that it will be useful,
31 but WITHOUT ANY WARRANTY; without even the implied warranty of
32 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 GNU General Public License for more details.
34
35 You should have received a copy of the GNU General Public License
36 along with this program; if not, write to the Free Software
37 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
38
39
40Installation
41============
42
43- Copy the driver file, OS2AHCI.ADD, to C:\OS2\BOOT
44
45- Add the following line to CONFIG.SYS:
46 BASEDEV=OS2AHCI.ADD
47
48
49Driver Command Line Options
50===========================
51
52Global Options
53
54Option Description
55------------------------------------------------------------------------------
56/c:<addr> Set debug COM port base address in hex (default = 3f8);
57 if used, this option should come before any /d options.
58/d Debug output on COM port; multiple "/d" options will
59 increase verbosity:
60 1 = requests
61 2 = detailed
62 3 = verbose, including MMIO operations
63/g:<vendor>:<device> Add generic PCI ID to list of supported AHCI adapters
64 (e.g. /g:8086:2829)
65/t Perform thorough PCI ID scan; default = on, can be
66 turned off with /!t to perform only a PCI class scan
67/r Reset ports during initialization (default = off
68 unless the [Intel] AHCI was found to be initialized
69 by the BIOS to SATA mode)
70/a Set adapter for adapter-specific options
71 (default = -1, all adapters)
72/p Set port for port-specific options
73 (default = -1, all ports)
74
75Adapter-specific Options
76
77Option Description
78------------------------------------------------------------------------------
79/i Ignore current adapter
80
81Port-specific Options
82
83Option Description
84------------------------------------------------------------------------------
85/s Enable SCSI emulation for ATAPI units (default = off)
86 SCSI emulation is required for tools like cdrecord.
87/n Enable NCQ (Native Command Queuing) for hard disks
88 (default = off)
89/ls Set link speed (default = 0):
90 0 = maximum,
91 1 = limit to generation 1
92 2 = limit to generation 2
93 3 = limit to generation 3
94/lp Set link power management (default = 0):
95 0 = full power management,
96 1 = transitions to "partial slumber state" disabled,
97 2 = transitions to "slumber state" disabled,
98 3 = transitions to both partial and slumber states
99 disabled
100/4 Force track size to be 56 sectors regardless of the
101 reported disk geometry to optimize partition boundaries
102 for hard disks with 4096 byte sectors.
103
104Port-specific options depend on the currently active adapter
105and port selector (/a and /p). Those selectors are -1 per default
106which means "all" adapters/ports. The scope can be reduced by limiting
107it to an adapter (/a) or an adapter and a port (/a and /p). The scope
108can be reset by setting the corresponding option back to -1.
109
110For example:
111
112 BASEDEV=OS2AHCI.ADD /n /a:0 /p:5 /!n /a:1 /p:-1 /!n
113
114This has the following effect:
115
116 - Enable NCQ for all hard disks
117 - Disable NCQ for hard disk on adapter #0, port #5
118 - Disable NCQ for all hard disks on adapter #1
119
120
121Interoperability With IDE Drivers
122=================================
123
124There are three kinds of IDE/ATA/SATA controllers:
125
126 1. Legacy controller (IDE or SATA) without AHCI support
127 This kind of controller will only be recognized by IDE drivers
128 (IBM1S506.ADD or DANIS506.ADD).
129
130 2. AHCI-capable controller which supports IDE/SATA legacy interfaces
131 This kind of controller will work with IDE or AHCI drivers and it's
132 up to the user to decide which driver to use.
133
134 3. AHCI-only controller
135 This kind of controller will only be recognized by OS2AHCI.
136
137If there's a mix of controllers of types 1 and 3, both an IDE and an AHCI
138driver will be required.
139
140If type 2 controllers are involved, it's up to the user to decide which
141driver to use. Both DANIS506.ADD and OS2AHCI.ADD will verify whether another
142driver has already allocated the corresponding adapter, thus the only
143decision to take for mixed configurations is whether type-2 controllers
144should be handled by DANIS506.ADD or OS2AHCI.ADD and this can be done by
145having the desired driver's BASEDEV statement coming first in CONFIG.SYS.
146
147NOTE: Older versions of DANIS506.ADD did not verify whether the resources
148 of a particular adapter were already allocated by another driver.
149 DANIS506.ADD 1.8.8 or later is required for this to work.
150
151 When using earlier versions of DANI1S506.ADD, the options "/A:x /I"
152 will be required to tell DANI1S506.ADD to ignore adapters to be
153 driven by OS2AHCI.ADD. The same applies to IBM1S506.ADD
154
155Mixed Controller Example
156------------------------
157
158Assume a DELL D630 or a Thinkpad T60. The hard disk is attached to the
159SATA/AHCI controller of the ICH-7 hub while the CDROM is attached to the
160legacy PATA IDE controller. This allows two different configurations:
161
162 1. Drive HDD and CDROM via DANIS506.ADD
163 2. Drive HDD via OS2AHCI.ADD and CDROM via DANI1S506.ADD
164
165OS2AHCI.ADD can't drive the CDROM because it's attached to a legacy PATA
166IDE controller which doesn't support AHCI.
167
168 - If OS2AHCI.ADD comes first in CONFIG.SYS, it will take over the SATA/AHCI
169 controller and drive the HDD. DANIS506.ADD will take care of the PATA/IDE
170 controller for the CDROM.
171 - If DANIS506.ADD comes first in CONFIG.SYS, it will take over both the
172 SATA/AHCI controller and OS2AHCI.ADD will silently exit.
173
174Advantages of AHCI
175------------------
176
177The interfaces provided by the various [Intel] controllers could be
178summarized like this (the term ATA as driver interface being a bit of our
179own invention):
180
181 - Intel PIIX: IDE (I/O registers) and ATA (taskfile)
182 - Intel ICH6: IDE (I/O registers), ATA (taskfile) and SATA
183 (FIS, vendor-specific)
184 - Intel ICH7: IDE (I/O registers), ATA (taskfile), SATA
185 (FIS, vendor-specific) and AHCI (FIS)
186 - Intel PCH: AHCI (FIS)
187
188Taskfiles are regions in memory with ATA commands which the IDE/ATA
189controller can read and process autonomously. FIS (Frame Information
190Structures) are pretty much the same but they are specific to the SATA
191communication protocol on the serial link. The most important FIS type
192for AHCI drivers is the H2D (host to device) FIS which basically contains
193the ATA command to be executed.
194
195The big advantage of AHCI controllers, apart from being vendor-neutral,
196is that they take care of a lot of things which previous-generation
197drivers like DANI1S506 would have to do step by step. For example, in
198order to send an ATAPI command, DANIS506 would have to do the following:
199
200 * Send ATA "PACKET" command to device (via IDE registers, ATA taskfiles
201 or SATA FIS)
202 * Wait until device signals via interrupt it's ready for the ATAPI command
203 * Send ATAPI command to device via PIO
204 * Wait until device signals via interrupt it's ready to transfer data
205 * Send/Receive any data that might come along with the ATAPI command via
206 PIO, or wait for DMA transfer to complete
207 * Wait until device signals via interrupt that command and data transfer
208 have completed
209
210For OS2AHCI, the same operation looks like this:
211
212 * Fill in AHCI command header, FIS with ATA "PACKET" command and the ATAPI
213 command
214 * Tell port engine to process the command
215 * Wait until controller signals via interrupt that command and data
216 transfer have completed
217
218The AHCI controller automatically takes care of all underlying bits and
219pieces. OS2AHCI doesn't even have to know whether a particular message is
220sent via PIO or DMA because this is handled by the AHCI controller, too.
221And the whole concept of PIO and DMA is only relevant between AHCI controller
222and the device -- all transfers between OS2AHCI and the AHCI controller are
223always done via DMA.
224
Note: See TracBrowser for help on using the repository browser.