• Aucun résultat trouvé

Bad Sector Relocation

Dans le document Advanced Micro Devices (Page 40-46)

Formatting with Spare Sector Bad Sector Relocation

FORMAT:

(1) Each Track has a spare sector. This sector typically Is the last sector of the !rack.

So, the sector map for a track which has no bad sectors Is as follows: 00,01,02,03,04,05,06 (2) If the tracks contain a bad sector, the map Is changed appropriately: 00,01,02,03,FF,04,05,06

READIWRITENERIFY :

The Drive Pwameter Block specifies 7 nctoraltrack. The HOC will perform normal zero.interleaved disk accea •. "It encounters aector "p'. It will just skip it.

Figure 1-22 9480A 1-22

94_ 1·21

RELOCATE TRACK

This command will relocate the track/head specified by TRACK and HEAD by reformatting this tracklhead. The data mark of the ID field is changed from the default FEH to FDH' The sector number is always O. The data mark of the data field is F8H (default value). For subsequent Normal Disk 1/0 commands the HDC automatically vectors to the specified altemate tracklhead (ALTERNATE TRACK and ALTERNATE HEAD) if the Auto Vector Enable bit in the Drive Parameter Block is set. The HDC flags the encountering of a relocated track by issuing a "Relocate Track" SRB.

A relocation vector is written to all data fields of a relocated (bad) track. The relocation vector consists of the new track number (ALTERNATE TRACK) and the new head number (ALTERNATE HEAD) (i.e., the track's relocated location). Also, the address data mark of the sector ID fields is changed from FEH to FDH to mark that this track has been relocated. Thus, when the HDC encounters three consecutive sector headers with a FDH data mark, it assumes the track has been relocated. The data mark of the data field is F8H (Hard-disk Mode) or FBH (Fioppy-disk Mode). The logical sector number is set to zero for all sector ID fields. When executing this command the HDC does not reformat or write to the altemate track.

LOAD DRIVE PARAMETER BLOCK

This command loads a Drive Parameter Block (DPB) for the selected DRIVE into the intemal Drive Parameter RAM (see Drive Parameter Block description). This command must be performed once for each drive connected to the HDC. The Drive Parameter Block may be reloaded at any time within the 10PB chain to dynamically alter drive parameters. However, to ensure correct disk read or write operation, the current values defining the sector format (such as DELAY, GAP, PAD, PREAMBLE, and POSTAMBLE length) should be the same as when this track was formatted. If these values are altered, the HDC might not be able to find sector ID fields or data fields. This causes the HDC to issue SRBs such as Data Sync Fault or Index Error.

DUMP DRIVE PARAMETER BLOCK

The Drive Parameter Block for the selected DRIVE is transferred from the internal Drive Parameter RAM to system memory pointed to by DESTINATION ADDRESS. This command may be used for power-on diagnostics.

MARGINAL DATA RECOVERY COMMANDS The marginal data recovery commands allow the user to retrieve data from the disk, in case significant portions of the track (such as the sector ID field) are damaged so that normal disk 1/0 command cannot retrieve the data. The user must realize that these commands can lead to false results if not used properly.

READ PHYSICAL SECTOR

This command allows the user to recover a marginal data field which is unrecoverable by normal disk error recovery procedures. First it seeks to the desired track. If the TRACK VERIFY option is enabled, the HDC reads a number of ID fields until it can verify whether it is on the right track or not (it examines the first sector ID field without CRC error). Beginning with the next index mark, the HDC starts counting the PHYSICAL SECTOR number of IDs to locate the desired sector. If PHYSICAL SECTOR is set to "1", it searches for the first sector.

Using the ST506 or double-density Floppy Disk Format, the HDC approximates the location of the next sector ID field or data field based on the sector format parameters specified by the Drive Parameter Block,. If it does not find an address mark in the approximated window, the HDC assumes that this particular field is damaged to an extent where the data separator cannot even find an address mark. The HDC then approximates the position of the next address mark (sector ID field or data field) and tries to find this address mark.

9590 - - - . For the ESDI interface the Am9590 counts either address marks (soft-sectoring) or sector pulses (hard-sectoring). Since those occur only once per sector at the beginning of the header, the HDC will always try to read the header. However, if the header information is damaged, the device will calculate the approximate start of the data field and try to recover it.

This sophisticated algorithm allows the HDC to find a data field even if the corresponding sector ID field is damaged, or missing, or if other sector ID fields and/or data fields are damaged or missing.

However, this algorithm only operates successfully if the sector format parameters reflect the sector format exactly. When retrieving the data field, the HDC disregards the sector ID field and no retries are performed.

Regardless of any CRC/ECC errors, the HOC will dump the data field read into the system memory starting at Destination Address. In case of CRC/ECC errors, which is indicated by the appropri-ate SRB, the data field should be examined and a user-supported data recovery procedure should be initiated.

For extensive disk diagnostics, this command may be used to examine the information on the disk which follows the address mark of the sector 10 field. By altering the sector format parameters appropriately, the HOC can be tricked into reading a sector 10 field instead of a data field. Here, the HOC will most likely report a CRC/ECC error. In this case, the memory contains 128 to 512 bytes of data read sequentially from the disk starting with the address mark of the sector 10 field.

READID

READ 10 attempts to recover the header 10 Information of a marginal sector. If the ARBITRARY SECTOR option is enabled, then an arbitrary encounters) including the address data mark (FDH or FEH) is transferred to the system memory starting at DESTINATION ADDRESS (see Figure 1-23). If the ARBITRARY SECTOR option is disabled, the sector 10 field of the absolute sector specified by PHYSICAL SECTOR is transferred to DESTINATION ADDRESS. The PHYSICAL SECTOR number can be any number between 1 and N. If it is set to "1," the first sector 10 field is read. If this command is successfully executed, it updates the HDC's track position. If the HOC finds the specified sector 10, but with a CRC error, it will monitor this by issuing an "10 CRC Error" SRB. In this case the 10 field can only be (partially) recovered by using the 'rick" described in the

"Read Physical Sector" command description.

LOAD BUFFER

The data pointed to by the SOURCE ADDRESS is transferred to the internal sector buffer. The

Parameter Block description). This command may be used for device diagnostics and/or marginal data recovery.

DUMP BUFFER

The data in the internal sector buffer is transferred to system memory starting at DESTINATION ADDRESS. The number of bytes transferred is specified by the sector size for the selected DRIVE (see Drive Parameter Block description). This command may be used for device diagnostics and/or marginal data recovery.

LOAD ECC SYNDROMES

This command transfers the Reed-Solomon syndrome bytes from system memory starting at diagnostics and/or marginal data recovery.

DUMP ECC SYNDROMES

This command transfers the Reed-Solomon syndrome bytes from the internal syndrome RAM device diagnostics and/or marginal data recovery.

CORRECT BUFFER

This command uses the contents of the Reed-Solomon Syndrome RAM and attempts to correct the sector data in the internal sector buffer. The Error Detection and Correction Policy Field specifies whether to use Single- or Double-Burst Reed-Solomon code. If CRC or External ECC is selected, this command generates an error ("ECC Not Selected" SRB). If the LOCATOR DUMP option is enabled, then, in addition to correcting the data, the locations and values of the errors will be written sequentially to system memory, starting at DESTINATION ADDRESS. The Locators are stored sequentially starting with the Locator Group for interleave 0, then the Locator Group for interleave 1, etc.

Each Locator Group contains one (Single-Burst Reed-Solomon) (Figure 1-24) or two (Double-Burst Reed-Solomon) Locators (Figure 1-25). A Locator is defined as follows:

Buffer Address (2 bytes) Error Pattern (2 bytes)

Only the lower byte of the Error Pattern is relevant.

The upper byte is set to zero. The result of the correction can be interpreted in several different ways:

If the Buffer Address is larger than the sector size and the error pattern is non-zero, the error found for this locator is not correctable.

If the Buffer Address and the Error Pattern are both zero, no error is detected for this locator.

If the Buffer Address is larger than the sector size and the Error Pattern is zero, the error occurred in the check bytes themselves.

HEAD MOVEMENT COMMANDS SEEK

The HEAD of the selected DRIVE is moved to the desired TRACK. If TRACK VERIFY is selected, the HDC reads the first encountered header to verify that it is on the right track. If the track numbers do not match, the HDC reports an error ("Seek Error" SC is expected to be always active.

9590---~

In ESDI mode the Am9590 will issue a SEEK command to the appropriate track using the serial command/status interface to the disk drive. Before sending the command, the COMMAND COMPLETE line must be active. It is expected to go inactive after sending the first command bit. In Overlapped Seek mode, the HDC will not wait for this line to go active again if it can start a seek on another drive (independent of the drive type).

Word

Figure 1-24 Locator Dump for Correct Buffer Command (Single-Burst Reed-Solomon)

Figure 1-25 Locator Dump for Correct Buffer Command (Double-Burst Reed-Solomon)

9480A 1-24

9480A 1-25

RESTORE

The RESTORE command moves the heads of the selected DRIVE back to track O. This command synchronizes the HDC and the drives after power-up, or recovers the system from seek errors. The HDC supports two restore options for the ST506 and Floppy interface. It can restore drives by issuing step-out pulses until the drive acknowledges reaching track 0 by asserting TRKO.

The maximum number of step pulses issued is executed considerably slower than a seek to track

o

operation. In Floppy-disk Mode, SC has to be HIGH.

As an option, drives with build-in restore logic may be restored by a pulse on the RTZ (Return To Zero) line see also Pin Description). The RTZ pulse has the same timing as the STEP pulse. "

TRACK VERIFY is selected, the HDC will also verify a successful restore by reading one sector ID field.

An option bit in the RESTORE IOPB allows the slight modifying of the restore sequence. "this bit is set, the HDC steps in five tracks before starting to restore the heads to track O. This allows to operate disk drives with a "head parking zone" on a track number smaller then O.

9590---~

" the ESDI interface is selected, the Am9590 will issue a RESTORE command to the disk drive.

Before sending the command, the COMMAND COMPLETE line must be active. It is expected to go inactive after sending the first command bit and become active again after reaching track O.

ESDI CHANNEL

This command send ESDI command words (Bytes 10 & 11) to the ESDI drive and receives status information from the drive. Status information will be dumped into the· destination memory location.

The command generates and checks the parity bit automatically. Dump Buffer. It is enabled by setting the Data Map Enable bit (DME-bit) in the IOPB.

The last two words of the IOPB (Source/

Destination Address) link to the first Data Map Entry (Figure 1-26). "this pointer is zero, then the Data Map does not exist and the HDC does not transfer data. Data Map Entries are linked together via the Data Map Pointer. The Data Map linked-list is terminated if the Data Map Pointer is set to zero.

Each Data Map Entry defines a data buffer in system memory, starting at the address defined by the Data Source/Destination Address. The size of this buffer is defined by Byte Count. For Read operations, the HDC will skip a data block of the specified size, if LE

=

0, (Figures 1-27 ... 1-29). For Write operations, the HDC will write a data block of random data to the disk. When the Load Enable (LE) bit is reset to zero, the HDC masks off a data block with the size specified by Byte Count.

STATUS BLOCK REGISTER (SRB)

The host CPU reserves a Status Result Area de-fined by the 32-bit Status Result Pointer register and the 16-bit Status Result Length register.

Whenever the HDC terminates a command and an error occurs, it adds one or more Status Result Blocks (Figures 1-31,32) to the Status Result Area. Each Status Result Block carries the ID num-ber of the IOPB where the error occurred, to pro-vide a unique cross-reference between IOPBs and SRBs. The SRBs generated are divided into two groups: fatal and non-fatal errors. Non-fatal errors let the HOC continue with the current command.

Fatal errors cause an immediate termination of the current command. Furthermore, the IOPB options specify whether the HDC is allowed to proceed

Figure 1·26 Data Entry Map

• •

• •

9480A 1-26 _IOPB

Data

Data

Memory

Figure 1-27 Disk Write with Data Mapping

Memory Flgure1-28 Disk Read with Data Mapping

Dans le document Advanced Micro Devices (Page 40-46)