Copyright 1997-2015 Hale Landis. All rights reserved.
Program Change History
The program Change History has been moved from the HISTORY.TXT file
into this User Guide.
Also see:  HISTORY
ATACT is a random command test for ATA hard disk devices. ATACT is easy to setup and run. The program is able to test one or two ATA hard disks and can be setup to run for long periods of time. Error reporting is detailed and, for most errors, includes the type of information that is normally only available by using an ATA bus analyzer.
ATACT uses the ATADRVR low level ATA/ATAPI driver by Hale Landis. The source code of this driver is available at:
http://www.ata-atapi.com/atadrvr.html
ATACT is not shareware or freeware. ATACT is a commercial product and you or your company must have purchased a copy of the program in order to legally use the full function version of the program. There is a demonstration version of the program that has reduced function. The demonstration verion of ATACT has no use or distribution restrictions but shall be used only to evaluate the program.
ATACT requires the following basic system and test devices:
The system may contain a SCSI host adapter and SCSI hard disk drive to boot the system and run DOS. ATACT should not interfere with SCSI operations. The SCSI host adapter must have any "ATA task file emulation" feature disabled.
ATACT supports the following test device configurations:
Device 0 Device 1 -------- ------- ATA none ATA ATAPI CD-ROM none ATA ATAPI CD-ROM ATA ATA ATA PC Card ATA
A PC Card ATA device can be configured for any of the standard PC Card ATA device modes. Only device 0 exists in PC Card ATA modes.
The free/demo version of ATACT is full function except for the following:
Create a bootable DOS floppy with no CONFIG.SYS or AUTOEXEC.BAT files. Place the ATACT.EXE file on that floppy.
Boot your system from the floppy. This insures that you are not loading some strange device drivers that may interfere with ATACT. ATACT does not use the system BIOS -- ATACT accesses the ATA controller and device I/O ports directly.
ATACT can not be run in a DOS session under Win9x/NT/2K/XP or OS/2. These protected mode operating systems DO NOT allow a DOS program to directly access the disk controller I/O ports.
To run ATACT, set up the test system and devices:
Start ATACT by entering one of the following commands:
ATACT PCCMODE=mode ATACT PROMPT ATACT b:d:f:x ATACT P0 ATACT P1 ATACT P01 ATACT S0 ATACT S1 ATACT S01
When using PCCMODE see the file PCC.HTM for more information about using PC Card ATA mode on PCMCIA and CFA devices. DMA commands are not possible in any PC Card ATA mode.
PROMPT will cause ATACT to list the PCI bus ATA host controllers available in the system and allow the user to select one to use.
b:d:f:x will cause ATADEMO to list the PCI bus ATA host controllers available. b:d:f:x specifies the PCI bus, device and function number of the ATA controller to use. x is P0, P1, S0 or S1 for Primary or Secondary device 0 or 1.
P0, P1, P01, S0, S1 or S01 define the legacy mode ATA host adapter to use and determine the device(s) that will be tested. When these options are used DMA commands are not possible. Use these options on older systems that may not be PCI bus systems.
When ATACT starts it will check the controller and device configuration. If there are no problems, testing will begin. The program will switch to "full screen" mode during testing. This screen shows summary information for the testing. The program also writes a detailed log file.
ATACT will run until one of the following events stops the program:
Note: When using host controllers other than Intel ICHx you may need to use the NONSTD=MP command line option to avoid system hang and data corruption problems.
The ATACT command line syntax is:
ATACT io-mode-options [general-options]
The command line options are processed left to right. If an option is specified more than once, the last (rightmost) specification is used.
One of the following io-mode-options is required:
PCCMODE=CONTIG PCCMODE=CONTIG=xxx PCCMODE=MEMORY PCCMODE=PRImary PCCMODE=SECondary PROMPT b:d:f:x P0 P1 P01 S0 S1 S01
These options chose the controller(s) and device(s) to be tested.
PCCMODE=CONTIG
PCCMODE=CONTIG=xxx
PCCMODE=MEMORY
PCCMODE=PRImary
PCCMODE=SECondary
PCMCIA PC Card ATA (and CompactFlash or CF) devices can be configured to operated in several modes, see the PCC.HTM for more information. xxx is the base I/O address (in hex) to use in CONTIG I/O mode - the default is 200.
PROMPT
ATACT will list all the supported PCI bus ATA host controllers in the system and the user is asked to pick one.
b:d:f:x
Specify the ATA controller and device(s) to be tested.
The b:d:f part of this option specifies the PCI bus, device and function numbers for the ATA controller to be used. The x part is P0, P1, P01, S0, S1 or S01.
P0
P1
P01
The primary legacy mode ATA host adapter will be used with either device 0 and/or device 1 selected for testing.
DMA commands are not possible when these options are used.
Also see:  b:d:f:x
S0
S1
S01
The secondary legacy mode ATA host adapter will be used with either device 0 and/or device 1 selected for testing.
DMA commands are not possible when these options are used.
The following table shows how the PCI b:d:f information is used. See the b:d:f:x command line option.
Number of PCI ATA controllers | b:d:f is specified | Result |
n/a | no | legacy ATA mode |
0 | yes | error |
1 | no | error |
1 | yes | ok if b:d:f matches the controller |
>1 | no | error |
>1 | yes | ok if b:d:f matches one of the controllers |
Also see POLLING/INTERRUPT MODES section following the GENERAL OPTIONS section.
CACHE
Use the Set Features Subcommands to turn read and write caching on and off (if these subcommands are supported by the device). Note that on some devices a Soft Reset may change the device's internal setting for the read and write cache operation.
Also see:  NOCACHE
CFA
Use the CFA commands (CFA ERASE SECTORS, CFA WRITE MULTIPLE WITHOUT ERASE and CFA WRITE SECTORS WITHOUT ERASE) even if the device does not have the CFA signature value (848AH) in Identify data word 0.
The default depends on the contents of Identify data word 0.
Also see:  NOCFA
CHT=ALL
CHT=NONE
CHT=x
Specify the command history trace options. This option controls the types of commands that are traced in the command history trace by the low level ATA driver.
NONE disables all command history tracing.
Use these characters in 'x' to enable more selective tracing:
I - trace ATA PIO Data In commands N - trace ATA Non-Data commands O - trace ATA PIO Data Out commands P - trace all Packet commands S - trace ATA Soft Reset
Any combination of these characters is allowed. For example
CHT=SI
enables tracing of only Soft Resets and PIO Data In commands.
The default is ALL. ALL is equivalent to CHT=INOPS.
Also see:  DUMPCHT=x
COMPARE=FULL
COMPARE=NONE
COMPARE=QUICK
Specify the level of data compare that is done on sectors read. Only sectors that have been written during this execution of ATACT are subject to data compare when read.
COMPARE=FULL compares all data in sectors that are read.
COMPARE=QUICK compares only the sector tag data found at offsets 244 to 283. See Sector Data Format below.
COMPARE=NONE turns off all data compare.
READONLY forces COMPARE=NONE.
The default is COMPARE=FULL.
Also see:  READONLY
DEBUG=n
Specify the debug message level between 0 and 5. The amount of debug information written to the log file increases with with larger values of this option. Note the special use of DEBUG=1.
The default is 0.
Also see:  OKTOWRITE
DMA
ATA Read/Write DMA commands will be used.
Note that the host adapter and drive(s) to be tested must have been set up in the proper ATA Multiword or Ultra DMA mode before ATACT is started.
DMA commands require INTerrupt mode.
See the documentation file DMA.HTM.
Also see:  INTerrupt IRQ=x NODMA PIO=NONE POLL
DUMPCHT=n0
DUMPCHT=n0:n1
Dump the command history trace (CHT) at or after command numbers n0 on device 0 or n1 on device 1. The values n0 and n1 are 0 for no dump, greater than 0 to enable the dump. The command history trace is dumped once for each command number specified.
Also see:  CHT=x
FUA
Use the WRITE DMA FUA EXT or WRITE MULTIPLE FUA EXT commands if the device supports the commands.
The default is FUA if the device supports the commands.
Also see:  NOFUA
IDP=ALL
IDP=DEFAULT
IDP=NONE
IDP=NORMAL
Specify the level of INITIALIZE DEVICE PARAMETERS command testing during SEQ=N testing.
ALL uses head values of 1 to 16 and sector values of 1 to 255. DEFAULT uses only the drive's default values. IDP=NONE turns off CHS sector addressing in read/write commands. NORMAL uses head values of 1 to 16 and sector values of 1 to 63.
During SEQ=R and SEQ=W testing IDP=DEFAULT is used. The default for SEQ=N testing is IDP=NORMAL.
IGNORE=ALL
IGNORE=DC
IGNORE=RE
IGNORE=WE
Ignore Data Compare (DC) and/or Read Errors (RE) and/or Write Errors (WE). IGNORE=ALL ignores all DC, RE and WE errors.
All errors are reported and logged but if the error is ignored it will not cause the program to enter read only mode or terminate due to excessive errors.
These options do not change the error recovery algorithms.
INTerrupt
Run in interrupt mode. INTerrupt is ignored and polling mode is forced if the PCCMODE=MEMORY option is used. In all other interface modes the default is INTerrupt.
INTerrupt mode is required for DMA commands.
If ATACT is unable to determine the IRQ number the IRQ=x option must be used.
See the POLLING/INTERRUPT MODES section below.
Also see:  IRQ=x
IRQ=n
IRQ=Sn
Specify (or override the default) IRQ number (1 to 15) used by the ATA controller.
IRQ=n specifies an IRQ that is not shared. IRQ=Sn specifies an IRQ that is shared.
This option also forces the INTerrupt option.
If IRQ=x is not specified the IRQ number will be default to a not shared IRQ number:
Interrupts must be used in order to perform PCI Bus Mastering ATA DMA transfers.
See the POLLING/INTERRUPT MODES section below.
Also see:  DMA INTerrupt IRQ=x NODMA POLL
LLT
Include the full command history and low level trace information in any device I/O error messages.
The command history information and low level trace information is included in device I/O error messages if the device I/O error resulted in a timeout error from the ATA/ATAPI low level driver.
The default is NOLLT.
Also see:  NOLLT
LOG=fileName
The default log file name is ".\ATACT.LOG". Use this option to specify a different log file name. Use LOG=NUL or LOG=NULL to suppress generation of the log file.
MAXSIZE=nK
MAXSIZE=nM
Restrict testing to the first nK or nM sectors of the drive. K is 1000 and M is 1000000. This value may be adjusted to a lower value so that it does not exceed the actual size of the drive. Note that an ATA device must have at least 1000 sectors.
The MINLBA=x and MAXSIZE=x options can be used to restrict testing to a small area of a drive.
Also see:  MINLBA=x
MAXTL=n
Restrict read/write commands to transfer lengths (sector counts) of 1 to 65536. If a device has less than 2000000 sectors, MAXTL for that device may be adjusted so that it does not exceed the value (number_of_sectors / 100). For devices that do not support 48-bit LBA, MAXTL for that device will also be adjusted so that it does not exceed the 256.
MINLBA=nK
MINLBA=nM
Specify the lowest LBA that will be tested. K is 1000 and M is 1000000.
MINLBA may be adjusted down by up to 1000 if it is near the limit of CHS or LBA28 addresseing.
The MINLBA=x and MAXSIZE=x options can be used to restrict testing to a small area of a drive.
Also see:  MAXSIZE=x
NOCACHE
Do not use the Set Features subcommands to turn read and write caching on and off. When this option is used ATACT will not issue any Set Features commands and the current cache state is shown as UNKNOWN. Note that on some devices a Soft Reset may change the device's internal setting for the read and write cache operation.
Also see:  CACHE
NOCFA
Do not use the CFA commands (CFA ERASE SECTORS, CFA WRITE MULTIPLE WITHOUT ERASE and CFA WRITE SECTORS WITHOUT ERASE) even if the device does have the CFA signature value (848AH) in Identify data word 0.
The default depends on the contents of Identify data word 0.
Also see:  CFA
NODMA
ATA Read/Write DMA commands will not be used.
See the documentation file DMA.HTM.
Also see:  INTerrupt DMA POLL
NOFUA
Do not use the WRITE DMA FUA EXT or WRITE MULTIPLE FUA EXT commands.
The default is FUA if the device supports the commands.
Also see:  FUA
NOLLT
Do not include the full command history and low level trace infomation is device I/O error messags.
The default is NOLLT.
Also see:  LLT
NONSTD=x
Specify program operation that does not conform to the ATA standards. 'x' is one or more of the following characters:
Any combination of these characters is allowed, For example NONSTD=CS and NONSTD=SC are equivalent.
Note: When using host controllers other than Intel ICHx you may need to use both the M and P options (NONSTD=MP) to avoid system hang and data corruption problems.
NOPM
Do not use any of the power management commands.
The default is PM.
Also see:  PM
NOSTOP
Do not stop on the any error.
The default is NOSTOP.
Also see:  NOSTOP STOP STOPKB STOP=x
OKTOWRITE
If a drive appears to have a Master Boot Record (MBR) this option must be used to allow writing on the drive. Using this option will cause a menu of options to be displayed. That menu has options to allow writing, running in read-only mode or quiting the program.
NOTE: This option replaces the DEBUG=1 option.
Also see:  DEBUG=n
PIO=BYTE
PIO=DWORD
PIO=WORD
Specify the width of PIO data transfers. This affects only the ATA Data register reads and writes.
BYTE specifies that 8-bit instructions are used to transfer data (REP INSB and REP OUTSB, or, 8-bit memory access instructions).
Note: 8-bit PIO data transfers should be used only with PCMCIA and CF devices. ATACT will issue the SET FEATURES command to turn on 8-bit mode. 8-bit data transfer is NOT supported by PCI bus ATA controllers.
WORD specifies that 16-bit instructions are used to transfer data (REP INSW and REP OUTSW, or, 16-bit memory access instructions).
DWORD specifies that 32-bit instructions are used to transfer data in PIO mode (REP INSD and REP OUTSD). This option does not take effect until after the first 30 seconds of a W, R or N pass.
Note: Many ATA host adapters do not implement 32-bit data transfers correctly and will corrupt data passing through the host adapter if DWORD is used.
The default is WORD.
Read the documentation file PIO.HTM before using this option!
PIO=NONE
If DMA is supported and enabled, about 2/3 of read/write commands will use DMA. This option does not take effect until after the first 30 seconds of a W, R or N pass.
If DMA is not supported or if DMA is not enabled, this option is ignored.
PIO=ODR0
PIO=ODR0
PIO=ODR8
PIO=ODR400
PIO=ODRRAND
These options apply only when ATACT is running in PCMCIA PC Card ATA Memory mode. These options are ignored at all other times.
In Memory mode the ATA Data register appears at several locations in the Common memory space. These are offsets 0H, 8H and 400H. These options select the offset that will be used by ATADRVR when performing PIO data transfers.
The default is ODRRAND. ODRRAND causes ATADRVR to randonly select one of the three offsets at the start of each DRQ data block.
PM
Use the ATA power management commands.
When the ATA power management commands are used, there is a 1 to 16 second delay before the next command is issued to the same device. During this delay, commands will continue to be issued to the other device, but note these conditions:
The default is PM.
Also see:  NOPM NONSTD=x
POLL
Run in polling mode. Polling mode is forced if the PCCMODE=MEMORY option is used. In all other modes if POLL is not specified then INTerrupt is the default.
DMA commands are not possible when POLL mode is used.
See the POLLING/INTERRUPT MODES section below.
Also see:  DMA INTerrupt IRQ=x NODMA
READONLY
No data will be written on the device's media. The program will issue the Write Buffer command.
The default is WRITEREAD.
Also see:  WRITEREAD
SEQ=N
SEQ=WN
SEQ=WRN
SEQ=N specifies normal ATACT operations are performed. SEQ=WN specifies a full write pass of the drive(s) before normal ATACT operations are performed. SEQ=WRN specifies a full write pass and a full read pass of the drive(s) before normal ATACT operations are performed.
SEQ=N is the default.
The READONLY option converts SEQ=WN to SEQ=RN and SEQ=WRN to SEQ=RN.
See additional SEQ=x option information below.
SLOW=ALL
SLOW=NONE
SLOW=RAND
Specify the level of slow data transfer during PIO Data In/Out commands. ALL adds a delay in all PIO Data In/Out commands. NONE adds no delay to any PIO Data In/Out command. RAND adds a delay to 50% of all PIO Data In/Out commands.
The slow data transfer delay is a 0ms to 55ms delay immediately prior to the PIO data transfer (the REP INSW or REP OUTSW instructions) when the device has BSY=0 and DRQ=1. This delay is added to a randomly selected PIO data transfer of a PIO Data In/Out command.
The default is SLOW=NONE.
SM=ALL
SM=DEFAULT
SM=NONE
SM=NORMAL
Specify the level of Set Multiple command testing. ALL uses multiple values of 1 to the drive's maximum. DEFAULT uses only the drive's default value. NORMAL uses multiple values that are powers of 2 (2, 4, 8, ...) up to the drive's maximum.
SM=NONE turns off testing of READ/WRITE MULTIPLE [EXT] commands.
The default is SM=NORMAL. If the drive's default is 1 then SM=DEFAULT is used.
STOP
Errors are one of four types: DC (Data Compare), OE (Other Errors), TO (Time Out), and UC (UnCorrectable).
Stop after any OE, TO or UC error or stop after retrying a DC error.
This not include any errors that may occur on an ATAPI device.
The default is NOSTOP.
Also see:  NOSTOP STOP STOPKB STOP=x
Note: If the devices being tested are configured in the system's BIOS setup, the system BIOS will probably issue an ATA Soft Reset when ATACT terminates. To prevent this, make sure the device(s) being tested are not configured in the system's BIOS setup.
STOP=DC
STOP=OE
STOP=TO
STOP=UC
Stop after the specific type of error as described in the description of STOP.
Any combination of these options may be used. STOP is equivalent to using all four of these options.
This does not include any errors that may occur on an ATAPI device.
The default is NOSTOP.
Also see:  NOSTOP STOP STOPKB STOP=x
STOPKB
Stop/pause on any error and wait for keyboard input.
The default is NOSTOP.
Also see:  NOSTOP STOP STOPKB STOP=x
SYSMEM=xxxx
Specify the segment address for the PCMCIA system/attribute memory. Valid values are c800, d000 and d800. If not specified system memory between c800:0000 and d8ff:000f will be searched for an unused area. Note that the PCMCIA Card Information Structure (CIS) data and the card configuration registers exist in this memory area.
TIME=n
Specify the run time in minutes. The default is 60 minutes.
Note: There are 1440 minutes in one day, 2880 minutes in two days, etc.
WRITEREAD
Use both ATA write and read commands.
The default is WRITEREAD.
Also see:  READONLY
When operating in one of the PCMCIA modes (PCCMODE=x options) the following are possible:
When running on a non-PCI system, legacy ATA (ISA ATA) mode is assumed. No DMA is possible in this configuration. The following are possible:
When running on a PCI system with an ATA controller in legacy mode the following are possible:
When running on a PCI system with an ATA controller in native mode the following are possible:
When INTerrupt mode is used, interrupts are not enabled until after ATACT completes the controller and device setup activities.
In these examples only the required options are shown. Other options could also appear on these command lines.
On a system with a single primary and/or single secondary ATA host adapter one of the following command lines would be typical:
ATACT P01 ATACT S1
On a system with multiple PCI ATA host adapters, one of the following command lines would be typical:
ATACT 0:7:1:P0 or ATACT 1:10:0:S01
When using a PC Card ATA or CFA device, one of the following command lines would be typical:
ATACT PCCMODE=CONTIG ATACT PCCMODE=CONTIG=280 ATACT PCCMODE=MEMORY
The normal command line option defaults are:
CACHE CFA (if appropriate) CHT=ALL COMPARE=FULL DEBUG=0 DMA (if supported) IDP=NORMAL INT LOG=.\ATACT.LOG MAXSIZE=size_of_device MAXTL=max_support_by_device MINLBA=0K NOLLT NOSTOP PIO=WORD PIO=ODRRAND (if PC Card ATA Memory mode) PM SEQ=N SLOW=NONE SM=NORMAL TIME=60 WRITEREAD
Note: Be sure to use IDP=ALL and SM=ALL on the drives you are testing. There is no reason why a drive should not support these options of ATACT.
The environment variable ATAERROR is used to enable a trigger signal when an error is detected. This variable is set using the DOS SET command:
SET ATAERROR=port:v1:v2:v3
where port is an I/O port address and v1, v2 and v3 are values to be written to that port. port must be a hex value in the range 1 to FFFF. v1, v2 and v3 are hex values between 0 and FF.
When this environment variable is in effect, the values v1, v2 and v3 will be written to the I/O port whenever an error is detected (before the error message is displayed.
For example:
SET ATAERROR=300:0:ff:0
will toggle the data at I/O port 300H from 00H to FFH to 00H.
While ATACT is running, some keys on the keyboard can be used to change what ATACT is doing. These keys are:
ESC -- Stop running. s or S -- Enter screen saver mode if no errors.
All other keys are ignored.
The ATACT log file is a plain ASCII text file. This file can be viewed with most text editors and text browsing programs. When printing the file use a font that will allow 80 characters per line.
The log file contains the startup configuration messages, the detailed device error messages (if any) and termination summary messages.
Device error messages can contain various levels of information including a command history trace and a low level trace of the ATA I/O port activity.
Once device testing begins, ATACT enter "full screen" mode. In this mode only summary information and very brief error message data is displayed.
The first five lines of the screen contain basic information about the program including the run time. The remaining 20 lines are split into 10 lines for device 0 and 10 lines for device 1. For each device:
If there are no errors ATACT places the screen into screen saver mode after 20 minutes of running. If there are no errors pressing the key 's' and 'S' will switch the screen into screen saver mode immediately. Pressing any key, except ESC, 's' or 'S', will restore full screen mode for 20 minutes. Any error will restore full screen mode and disable the screen saver.
The SEQ=x command line option can be used to have ATACT perform full surface write or write-read passes before starting the normal test sequence. These read/write passes will use READ/WRITE SECTORS, and if allowed/supported, READ/WRITE MULTIPLE and READ/WRITE DMA commands. Except the required device set up commands, such as INITIALIZE DEVICE PARAMETERS, only these read/write commands will be used during these passes.
ATACT randomly picks commands to be executed from a table. There are two tables, one for ATA hard disks and one for ATAPI CD-ROM drives. The tables contains many entries for the various ATA or ATAPI packet commands. When ATACT starts only the first part of these tables are used. As the program runs, the number of table entries used is increased until the full table is in use. As the number of entries being used increases, the variety of ATA or ATAPI commands is increased.
For ATA devices, all read/write, power management and most other commands (SEEK, EXECUTE DEVICE DIAGNOSTICS, etc) are used. The majority of commands are read/write commands. Each of the other non-read/write commands make up about 2% of the total commands used. When data is read it is compared to an expected data pattern only if the sector read have been previously written in the current run of ATACT. Note that a drive should never read a sector that has the special value deaddeadH in bytes 260-263. See Sector Data Format below.
For ATAPI devices, only commands that do not require media present are used (REQUEST SENSE, MODE SELECT, etc). When an ATAPI device is being tested, less than 5% of all commands issed will be ATAPI packet commands.
The 48-bit LBA commands can transfer large amounts of data, up to 65536 sectors (33Mbytes) in a single command. ATACT supports these large transfers (even when the ATACT data buffer is not that large) as follows (see ATADRVR's DRQ Call Back function):
Note that commands with very large sector counts can require 10 or more seconds to execute.
Each sector written by ATACT has the data format shown below. Note that the time field, the LBA field and the command number fields are in x86 little endian format (least significant byte at lowest byte offset).
byte byte offset offset length data decimal hex in bytes pattern ------- ------- -------- --------------------------------- 000-001 000-003 4 a 32-bit random data pattern 004-243 004-0F3 4*60 repeat bytes 000-003 60 times 244-247 0F4-0F7 4 ones complement of 248-251 248-251 0F8-0FB 4 start time and device number 252-255 0FC-0FF 4 ones complement of 256-259 256-259 100-103 4 LBA of the sector 260-263 104-107 4 ones complement of 264-267 -or- the hex data 'deaddead'. 264-267 108-10B 4 command number of the last write command to this sector 268-271 10C-10F 4 ones complement of 268-271 272-275 110-113 4 sector count of the last write command to this sector 276-279 114-117 4 ones complement of 280-283 280-283 118-11C 4 start lba of the last write command to this sector 284-511 11C-1FF 4*57 repeat bytes 000-003 57 times
The data in bytes 000-003 are called the "basic data pattern". This pattern is a 16-bit random value followed by the one's complement of the 16-bit random value. The 16-bit value is incremented in each additional word of the "basic data pattern".
The data in bytes 224-247 are called the "time field". This field is even (bit 0 is 0) on device 0 and odd (bit 0 is 1) on device 1. This field is used to determine if the drive has returned data that was written during the current execution of ATACT.
The data in bytes 252-259 are called the LBA field. This is the LBA sector address for the sector read.
The data in bytes 260-283 are called the command fields. These fields describe the command that performed the last write to this sector. Note that unlike the time and lba fields, ATACT is not able to know what the correct contents of theee fields. The command fields are displayed in data compare error messages.
When ATACT is writing a sector and it is known that the next command is also a write that will rewrite the same sector then the data in bytes 260-263 will be deaddeadH. A sector with this special deaddeadH value should never be read from the device.
When a sector is read and data compare is done, the fields of the sector are checked in the order shown below. Only sectors with an LBA less than "NextLBA" are compared.
Following a device I/O error (other than a UltraDMA ICRC error) or data compare error on an ATA device, the following resets and commands are issued (in the order shown) before the failing command is retried:
A read/write DMA command that results in an UltraDMA ICRC error is retried without performing these resets and commands.
If the reset or any of these commands fail, ATACT terminates immediately. This reset and these commands are not included in the reset and command counts.
All errors on an ATA device are retried once. Some errors may force the program into read only mode so that bad data on the media is not over written.
Note that many ATA data compare errors do not happen on the retry of the read command. This is because the Soft Reset done as part of the error recovery may clear the drive's read cache and the correct data is then read on the retry of the read command.
There is no error recovery (at this time) for any error on an ATAPI device -- the error is reported and ignored.
A typical device I/O error message is shown below. Refer to the line numbers for a description of each line in the message.
1 !!!!!!!!!! ERROR !!!!!!!!!! -- Sat May 03 13:54:23 1997 1 Device 0:7:1:S0, command 514, SET MULTIPLE MODE, 1 started at CHS 692 1 14 (LBA 176490) for 5 sectors. 1 TotalLBA: 250000 NextLBA: 10567 CurrentCHS: 980*15*17=249900 1 CurrentMultiple: 16 WriteCache: ON ReadCache: ON 1 A non-data command failed ! 2 ----- Command and Error Information ----- 2 Command Code: C6 = SET MULTIPLE MODE 2 Driver ErrCode: 21 Non-Data command ended with bad status 2 Bytes xferred: 0 (0H) 2 Device Status: 51 = DRDY DSC ERR 2 Device Error: 04 = ABRT 2 ATA Intf Regs: FR ER SC SN CL CH DH CM ST AS DC 2 Cmd Params: 4F -- 05 0E B4 02 A1 C6 -- -- 0A 2 After Cmd: -- 04 05 0E B4 02 A1 -- 51 51 -- 3 ----- Command History Trace ----- 3 Dev n, LBAnn, Type- Cmd FR--- SC--- LBA--------- MC- ; EC TO ST- ER- 3 Dev n, CHS, Type- Cmd FR--- SC--- Cyl-- Hd Sec MC- ; EC TO ST- ER- 3 DEV 0, LBA48, DR 25H 0H 227 169796 ; 0 0 50H 00H 3 DEV 0, LBA48, PDI 24H 0H 413 170023 ; 0 0 50H 00H 3 DEV 0, LBA48, PDI 29H 0H 32364 170436 16 ; 0 0 50H 00H 3 ... 3 DEV 0, CHS, ND C6H 4FH 5 692 1 14 ; 21 0 50H 04H 4 ...
Line 1: These lines are the message heading lines which describe the when the error happen, which device caused the error and what command caused the error, and the current status of the device.
Line 2: These lines are the command and error details from the low level device driver.
Line 3: Commands prior to this error are shown in these lines. These lines are in a format similar to the ATADEMO command format. These lines can be used to create an ATADEMO script file for the commands leading up to this errors.
Line 4: Some messages may also include the low level I/O trace.
A typical data compare error message is shown below. Refer to the line numbers for a description of each line in the message.
1 !!!!!!!!!! DATA COMPARE ERROR !!!!!!!!!! -- Sun Nov 02 02:06:31 2003 1 Device 0:31:1:P0, command 24268, READ MULTIPLE EXT, 1 started at LBA 307742 4B21EH (CHS 0 0 0) for 21528 sectors, 1 10987 sectors ok, 10541 sectors bad, 0 sectors bypassed. 1 TotalLBA: 2000000 NextLBA: 307742 CurrentCHS: 0*0*0=0 1 CurrentMultiple: 16 WriteCache: ON ReadCache: ON 2 ----- Sector Error Information ----- 2 Note: Only the first 40 errors are shown. 2 -- Sector 10987 -- ExpLBA 318729 4DD09H -- ActLBA 318859 4DD8BH -- 2 Last write by command 3932: SC 134 LBA 318733. 2 -- Sector 10988 -- ExpLBA 318730 4DD0AH -- ActLBA 318860 4DD8CH -- 2 Last write by command 3932: SC 134 LBA 318733. 2 -- Sector 10989 -- ExpLBA 318731 4DD0BH -- ActLBA 318861 4DD8DH -- 2 Last write by command 3932: SC 134 LBA 318733. 2 ... 3 ----- Command History Trace ----- 3 Dev n, LBAnn, Type- Cmd FR--- SC--- LBA--------- MC- ; EC TO ST- ER- 3 Dev n, CHS, Type- Cmd FR--- SC--- Cyl-- Hd Sec MC- ; EC TO ST- ER- 3 DEV 0, LBA48, DR 25H 0H 227 169796 ; 0 0 50H 00H 3 DEV 0, LBA48, PDI 24H 0H 413 170023 ; 0 0 50H 00H 3 DEV 0, LBA48, PDI 29H 0H 32364 170436 16 ; 0 0 50H 00H 3 ... 3 DEV 0, LBA48, PDI 29H 0H 21528 307742 16 ; 0 0 50H 00H
Line 1: These lines are the message heading lines which describe the when the error happen, which device caused the error and what command caused the error, and the current status of the device.
Line 2: These lines are displayed for each sector read with a miscompare. Sectors with no error are not shown. For read commands that transfer more sectors than the size of the I/O buffer only the first 40 sectors with errors are shown. For some types of errors the sector data is shown in 16 byte chunks. The 'dif' line will contain ^ characters below any bytes that are incorrect.
Line 3: Commands prior to this error are shown in these lines. These lines are in a format similar to the ATADEMO command format. These lines can be used to create an ATADEMO script file for the commands leading up to this errors. The last command shown is the failing command.
Line 4: Some messages may also include the low level I/O trace.
The following table shows the commands issued by ATACT to an ATA hard disk device and what ATACT expects a device to support. ATACT also issues ATA SOFT RESET and expects ATA/ATAPI-4, ATA/ATAPI-5 and/or ATA/ATAPI-6 results.
The READ DMA EXT and WRITE DMA EXT commands are limited to sectors counts less than or equal to the size of the I/O buffer. PIO read/write commands can transfer up to 65536 sectors.
ATA Command Name Notes ---------------------------- ------------------------------ CFA ERASE SECTORS CFA WRITE MULITPLE W/O ERASE CFA WRITE SECTORS W/O ERASE EXECUTE DEVICE DIAGNOSTIC FLUSH CACHE FLUSH CACHE EXT IDENTIFY DEVICE INITIALIZE DRIVE PARAMETERS See the IDP option. READ DMA READ DMA EXT READ MULTIPLE READ MULTIPLE EXT READ SECTORS READ SECTORS EXT READ VERIFY SECTORS READ VERIFY SECTORS EXT RECALIBRATE SEEK SET MULTIPLE MODE See the SM option. SET FEATURES Only FR=02H, 55H, 82H and AAH are tested. SMART RETURN STATUS If supported, issued every 10 minutes. READ BUFFER If these commands are supported WRITE BUFFER by the device then both commands are used (even in READONLY mode). CHECK POWER MODE If the device supports the IDLE CHECK POWER MODE command then IDLE IMMEDIATE all of these power management SLEEP commands are used. See the STANDBY NOPM and PM options. STANDBY IMMEDIATE WRITE DMA WRITE DMA EXT WRITE MULTIPLE WRITE MULTIPLE EXT WRITE SECTORS WRITE SECTORS EXT
The following table shows the packet commands issued by ATACT to an ATAPI device. ATACT also issues the following ATA commands to an ATAPI device: IDENTIFY DEVICE PACKET, EXECUTE DEVICE DIAGNOSTICS and ATA SOFT RESET. Normal ATA/ATAPI-4 results are expected for these ATA commands.
Packet Command Name Expected Support ---------------------------- ------------------------------ Inquiry Normal ATA/ATAPI-4 results Request Sense are expected but no data Mode Sense read is checked.
An ATA hard disk device must support 28-bit LBA sector addressing. CHS or 48-bit LBA are tested if supported by the device. If two ATA hard disks are tested at the same time, the devices may have different CHS/LBA support.
ATACT determines the sector addressing used as follows:
LBA1 LBA2 LBA3 ATACT action ---- ---- ---- ---------------------------------------- x 0 x Invalid, not supported by ATACT. 0 >0 0 28-bit LBA is used from LBA 0 to LBA2-1. 0 >0 >0 28-bit LBA is used from LBA 0 to LBA2-1, 48-bit LBA is used from LBA 0 to LBA3-1. >0 >0 0 CHS is used from LBA 0 to LBA1-1, 28-bit LBA is used from LBA 0 to LBA2-1. >0 >0 >0 CHS is used from LBA 0 to LBA1-1, 28-bit LBA is used from LBA 0 to LBA2-1, 48-bit LBA is used from LBA 0 to LBA3-1.
Versions not shown were test or skipped versions.
Version 5A0b
Version 5A0 and 5A0a
Technical support can be found at:
http://www.ata-atapi.com/techsupp.html
-end-