|
DBA-ESDI Drive Layout
DASD Storage Interface Specification Micro Channel https://ardent-tool.com/docs/pdf/j_mcspec.pdf Starts on page 69 File Format The files format is subdivided into the following areas: 1. Data Area [Cylinder 0 to CE Cylinder] 2. Spare Cylinder [last cylinder minus 4] 3. CE Cylinder [last cylinder minus 3] 4. Secondary Defect Map [last cylinder minus 2] 5. Primary Defect Map [last cylinder minus 1] 6. Factory-format Defect List [last cylinder] Data Area The data area is the first and largest area on the drive. It begins on cylinder 0, head 0, sector 0, and continues up to the CE cylinder (although not all of this area may be used see below). The system has direct read and write access to the data area. The controller formats the data area when asked to do so by the system. The data area consists of data blocks, defective blocks, and spare blocks. Data blocks are 512 bytes in length. Each block is addressed by its Relative Block Address (RBA). RBA's are numbered starting with zero. With no defects, a cylinder contains a large number of consecutive data blocks and a small number of spare blocks at the end of the cylinder. (The number of spare blocks per cylinder is specified in the manufacturing header of the Primary Defect Map). Defective data blocks are replaced using the spare blocks. The defective block is marked by setting a bit in the ID. Once marked, defective data blocks are ignored. (If the defect in a defective data block lies within the ID field, it may cause an ID ECC check; this also, in effect, causes the block to be ignored by the controller when it is searching for an ID). Data blocks after the defective block are shifted towards the end of the cylinder, with the overflow absorbed by the spare block area. Thus, data blocks are always arranged in ascending numerical order as one advances from sector to sector and head to head on the cylinder. If there are more defects on a track than there are spare blocks on the track, then data blocks are "pushed" onto the next track. (Effectively, spare blocks are borrowed from subsequent track). Up to 15 data blocks may be pushed across track boundaries. (This defect management scheme assumes that defects are distributed across the surfaces of the drive, with no large clusters of defects on any one cylinder or adjacent cylinders. Specifically, for any N adjacent cylinders on the drive, there can be no more than 15 + (P x N) defective blocks, where P is the number of spare sectors per cylinder). The data area is always large enough to contain Due to the granularity in file capacities as reported by the controller, it is likely that a small portion of the data area remains unused. However, all sectors up to the CE cylinder are always formatted, both at the factory and by the controller (when asked to format). The controller does not allow access to these extra sectors. Note: RBA 0 is filled with 00h pattern at Mfg. shipment. NOTE: The Spare Cylinder is used to make up for defects in the Data Area. It is writable, and MUST be below the CE Cylinder. Spare Cylinder The Spare cylinder is the last physical cylinder on the drive minus 4 cylinders. It is used by the controller for spare cylinder allocation. CE Cylinder The CE cylinder is the last physical cylinder on the drive minus 3 cylinders. It is used by the controller for diagnostic purposes, such as for read, write, and format tests. The CE cylinder cannot be directly accessed by the system. The CE cylinder is similar to the data area in that it has three types of blocks: CE blocks, defective blocks, and spare blocks. Each CE block is addressed by its RBA, the first one having a value of zero. A few bits in the ID identify the CE blocks as CE blocks, so that there is no confusing them with data blocks that have like RBA values. The CE cylinder utilizes spare sectors to accommodate defects; however, no push across to adjacent cylinders is done. If the CE cylinder contains more defective blocks that spare blocks, the capacity of the CE cylinder is reduced. Primary Defect Map The Primary Defect Map is located on the last physical cylinder on the drive minus 1 cylinder. It is used by the controller to format the drive. The system cannot read or write the Primary Map directly. The controller reads the map, but does not write to it or reformat it. However, the system can retrieve the Primary MAP information via the "GET MFG Header" command. The map itself contains a header which includes configuration data describing certain characteristics of the drive. Some of these have been referenced already. The controller makes use of this data when performing some operations which requires this data. The map is a list of defective sectors or blocks, as identified by the drive manufacturer. All defects, regardless of their location on the drive, are listed in this table (including defects on the last cylinder). Defects are listed by the absolute block address of the sector that is defective. Defects are listed in ascending numerical order. Absolute block addresses may be computed from the cylinder, head, and sector address as follows (where cylinder, head, and sector values are all numbered starting with zero). Absolute Block Address = ((cylinder) x (# of heads) x (# of sectors per track)) + ((head) x (# of sectors per track)) + sector Primary Defect Map Initial Record Format
Primary Defect Map Extension Record Format
Header The header fields (ASCII "DEFECT" and "MORE" in CAPS) are used to locate and identify the defect map elements. A header of "DEFECT" indicates that the map element is the initial record while a header of "MORE" indicates an extension record. Count of Defects This field contains a 16-bit binary number (LSB, MSB) which indicates how may defects are in the defect map. This count includes defects in the initial record and all subsequent extension records. If any defect entry location field is unused, it shall be set to "all ones". Number of Extension Records This field contains an 8-bit binary number which indicates how many extension records follow the initial record. Up to 14 extension records are allowed providing a defect recording capability of 1876 defects. Bar Code Number The bar code field provides the drive bar code label contents. The bar code typically indicates the drive's serial number, EC level and supplier information. The bar code number is to be ASCII coded and right justified in this field. Date of Manufacture The 8-byte date field indicates the date on which the drive was factory formatted. The format for this field is as follows: MMDDYYYY (in ASCII) RBA's Required for Capacity This field contains a 32-bit binary number (LSB . . MSB) which indicates how many RBA's are required to be non-defective in order for the drive to meet its IBM intended capacity. Soft Errors Allowed on Diagnostic Read Verify This field contains an 8-bit binary number which gives the number of soft error on a diagnostic read verify of the entire drive that defines a failing drive. If the number is 10, then 10 soft errors indicates a nondefective drive, 11 soft errors indicates a defective one. Errors in 64 Reads to Classify Defects This field contains an 8-bit binary number which gives the number of soft errors in 64 reads that defines a defective sector. Sectors Skewed for Format This field contains a 8-bit binary number which indicates how many sectors of skew are introduced into the surface format to correct for long head switch times or other hardware considerations. Refer 9.2.7, “Sector Skew” on page 77 for details. Spare Sectors per Track/Cylinder This field contains an 8-bit binary number which indicates how many spare sectors are to be allocated per track or cylinder. Track or cylinder sparing are mutually exclusive in that only one can be selected. Defect Type This field contains an 8-bit binary number which indicates in what form the defects are listed. This field is a 1, which indicates that the defects are listed by absolute block address with 4 bytes per defect. Reserved All reserved bytes are filled with "FF" (all ones). Defect Absolute Block Address This field contains a 32-bit binary number (LSB..MSB) which indicates the absolute block address of a defect. Checksum The 8-bit binary checksum provides an additional redundancy to protect the file from erroneous data. The controller verifies the integrity of the map by testing the checksum prior to map use. The checksum is the two's complement of the sum of the proceeding 511 bytes of the record. The controller sums all 512 bytes of the sector into an 8-bit sum, discarding overflow. If there is no error, this resulting sum is zero. As noted above, the primary map is always at least 1 block in length, and may be up to 15 blocks in length. Fifteen blocks are allocated for the primary map regardless of the actual length; unused blocks are set to all ones. The entire 15 blocks (including unused blocks) are written to each track on this cylinder. If a defective sector is located in the defect map, that sector is skipped and the defect map continues at the next non-defective sector. The spare and defective sectors of the defect map are filled with "FF"h to insure no interference with the actual defect map. Formatting without the Primary Map When the controller is requested to format without using the primary map, the drive ignores the defect(s) listed in the Primary Defect Map, but it uses the parameters defined in the Primary Map. Sector Skew Explained The subsystem cannot complete a head switch within the intersector gap when reading or writing adjacent sectors. The controller, as a consequence, always needs at least one sector's time to accomplish a head switch. In addition, files may take one or more sector's worth of time to complete a head switch. To allow for this head switch time, tracks within a cylinder are skewed in relationship to each other. This skewing provides a gap of one or more sectors between consecutive logical blocks when track boundaries are crossed. Here are three examples of skewing. RBA Numbering, Skew = 0
RBA Numbering, Skew = 1
RBA Numbering, Skew = 2
The skew amount is defined in the manufacturing header of the Primary Defect Map. The controller uses a value defined at paragraph 9.2.4.1, “Formatting without the Primary Map” on page 75, when asked to format without the primary map. Sector skewing is done without regard to defective sectors, (except, of course, that rejected sectors are not used). When formatting and applying skew, the controller computes the starting sector number for each track by multiplying the skew amount times the head address for the track. (The computations assure head and sector addresses start with zero). If that sector is not defective, the controller places the next sequential RBA in that sector. If it is defective, it marks the sector as defective, then goes on to the next sector on the track. Skew = 0, Defective Sectors Present
Skew = 1, Defective Sector Present
NOTE: Skewing is applied to the data area, and CE cylinder Secondary Defect Map The Secondary Defect Map is located on the last physical cylinder on the drive minus 2 cylinders. It is for internal use by the controller. The Secondary Map area cannot be accessed by the system. RBA numbering, spare sector allocation, and defective sector flagging are the same as for the Primary Map area. A unique value in the ID identifies the area as the secondary map. A portion of the Secondary Map area is used to record defective blocks that are not identified by the drive manufacturer. These may be identified by the system and passed as parameters to the format command, or they may be identified by the controller during a surface scan operation (digital surface analysis test). The controller reformats the secondary map area only when it is asked to format the drive and ignore the secondary map. The exact layout of the Secondary Map as created by the controller is described below. The total number of blocks for the Secondary Map is 16. The entire 16 blocks are written to each track on this cylinder. This map is updated by the adapter during Format time. Secondary Map (First Block) The first block of the map contains the Spare Block Count (from the primary map), the Zero Defect flag, and the Block Push Table. The Spare Block Count is used by the controller to help locate blocks by their RBA. The Zero Defect flag (hex FF if there are no host-accessible blocks with defects, FE if there are host-accessible blocks with defects due to formatting problems) is returned to the host in response to a Get Device Configuration command. This push table is loaded into controller RAM at power-up time and is used to convert an RBA to the proper cylinder, head address. The table holds 167 entries.
Secondary Map (Extension Block) Blocks 2 through 16 (called extension blocks) have room for 126 defective block addresses. These are obtained either from errors found during the format operation (if surface scan is used) or from a list provided by the system. The secondary map can hold a total of 1890 defects.
Factory-format Defect List A factory format defect list may reside on the last physical cylinder. The last physical cylinder is reserved; the attachment does not read, write or format on this cylinder. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||