





Enhanced Disk Drive Specification 
Version 1.0
January 25, 1994











Phoenix Technologies Ltd.

THIS SPECIFICATION IS MADE AVAILABLE WITHOUT CHARGE FOR USE IN DEVELOPING COMPUTER SYSTEMS AND DISK DRIVES.  PHOENIX MAKES NO REPRESENTATION OR WARRANTY REGARDING THIS SPECIFICATION OR ANY ITEM DEVELOPED BASED ON THIS SPECIFICATION, AND PHOENIX DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND FREEDOM FROM INFRINGEMENT.  WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, PHOENIX MAKES NO WARRANTY OF ANY KIND THAT ANY ITEM DEVELOPED BASED ON THIS SPECIFICATION WILL NOT INFRINGE ANY COPYRIGHT, PATENT, TRADE SECRET OR OTHER INTELLECTUAL PROPERTY RIGHT OF ANY PERSON OR ENTITY IN ANY COUNTRY.  USE OF THIS SPECIFICATION FOR ANY PURPOSE IS AT THE RISK OF THE PERSON OR ENTITY USING IT.

version 1.0  Copyright  1994 Phoenix Technologies Ltd.  All Rights Reserved.

Table of Contents
1.0  Overview	3
1.1  Scope	3
1.2  Introduction	3
2.0  Parameter Tables	4
2.1  Parameter Table Extensions	4
Table 1 - Fixed Disk Parameter	5
Standard Table	5
Translated Table	5
Fixed Disk Parameter Table Extension	5
2.2  Bytes 0-1 I/O Port Base	6
2.3  Bytes 2-3 Control Port Base	6
2.4  Byte 4 Head Prefix	6
2.5  Byte 5 Phoenix Proprietary Nibble	6
2.6  Byte 6 IRQ	6
2.7  Byte 7 Sector Count	6
2.8  Byte 8 DMA Channel/DMA Type	6
2.9  Byte 9 PIO Type	6
2.10  Byte 10-11 Disk Drive Options	7
2.10.1  Bit 0 Fast PIO	7
2.10.2  Bit 1 Fast DMA	7
2.10.3  Bit 2 Block PIO	7
2.10.4  Bit 3 CHS Translation	7
2.10.5  Bit 4 LBA Translation	7
2.10.6 Bit 5 Removable Media	7
2.10.7  Bit 6 CD-ROM	7
2.10.8  Bit 7 32 Bit Transfer Mode	7
2.11  Byte 14 Extension Revision	8
2.12  Byte 15 Checksum	8
3.0  BIOS Extensions	8
3.1  Check Extensions Present	8
3.2  Get Drive Parameters	9
4.0  Compatibility Issues	10
4.1 INT 41/46	10
4.2  Disk Drive Mapping	10

1.0 	Overview
The Phoenix Technologies Enhanced Disk Drive Support Specification is a comprehensive solution to BIOS issues that result from recent advances in the disk-drive industry.  The purpose of this specification is to provide a downward compatible method for expanding the current Fixed Disk Parameter Tables, as well as a new method of accessing these tables.  This new specification not only provides for the unlimited expansion of systems beyond two drives, but it also provides information regarding IDE-compatible features enabled by the BIOS for OS and application software.
1.1 	Scope
This paper assumes that the reader is familiar with the BIOS INT 13 interface, the usage of the Fixed Disk Parameter table, and the basic operation of IDE devices.  This document describes in detail extensions to the BIOS and extensions to the data maintained by the BIOS.
1.2 	Introduction
The disk-drive industry has increased the capacity and functionality of the IDE-compatible disk drive, finally surpassing the capability of the BIOS to service these new capabilities.  At present we must solve the following BIOS specific problems:

1. The BIOS must now support drives with a capacity greater than 528MB.  At the present time the INT 13 interface has a limit of 1024 cylinders.

2. The INT 13 interface allows more than two drives to be attached to a system but has no consistent method for storing the additional parameters.

3. New, CHS-independent methods for accessing the drives have now been defined.  These are drive-geometry independent and require a different method of data representation and operation.

4. New methods of data transfer are now supported.  Drives now support additional DMA modes as well as multi-sector data transfers and Fast PIO.  None of this information is currently available to OS or application software.

5. Systems require more than two disk drives, and with this requirement comes the requirement to assign the order in which the drives are to be accessed.

This document is divided into three sections: Parameter Tables, BIOS Extensions, and Compatibility Issues.  Parameter Tables describes the information in the Extended Parameter Table area.  BIOS Extensions describes the new functions required for accessing the parameter tables and the extensions.  Compatibility Issues discusses some of the topics related to implementing the structures in this document.

2.0 	Parameter Tables
This section provides a comprehensive description of the data which the BIOS makes available to OS and application software.  The current industry-standard INT 13 interface is limited to 1024 cylinders, resulting in the limitation of OS and application software as well.  The INT 13 interface operates directly from the Fixed Disk Parameter Table and therefore limits the size of the cylinder field in this table.  There is a compatible version of this table which has been embraced by some OS developers, that allows the BIOS to change the way the geometry is represented and then to translate the changed ("logical") geometry back to actual ("physical") geometry when a disk access is performed.  This table format is identified by a signature byte (A0) which flags the system that some form of translation is taking place.  Phoenix has chosen to use this table format for representing drives with more than 1024 cylinders.
2.1 	Parameter Table Extensions
It has become necessary for the BIOS to store information representing the type of translation currently in operation, as well as any information relating to the current operation of the drive.  One purpose of this specification is to define a standard format for this extension area and to document its fields and functions so that other OS/Application software can easily use this information.  This new information, called the "Fixed Disk Parameter Table Extension" is 16 bytes long and is accessed via the extended INT 13 functions described in this document.  Please see table 1 for a layout of the Fixed Disk Parameter Table with its Extension.  The remainder of this section describes the fields in this extension.

Table 1 - Fixed Disk Parameter 


Standard Table
Byte	Type	Description

0-1	Word	Physical Number of Cylinders

2	Byte	Physical Number of Heads

3	Byte	Reserved

4	Byte	Reserved

5-6	Word	Pre Compensation

7	Byte	Reserved

8	Byte	Drive Control Byte

9-10	Word	Reserved

11	Byte	Reserved

12-13	Word	Landing Zone

14	Byte	Physical Sectors per Track

15	Byte	Reserved

Translated Table
Byte	Type	Description

0-1	Word	Logical Number of Cylinders (Limit 1024)

2	Byte	Logical Number of Heads

3	Byte	A0 signature indicating translated table

4	Byte	Physical Sectors per Track

5-6	Word	Pre compensation

7	Byte	Reserved

8	Byte	Drive Control Byte

9-10	Word	Physical Number of Cylinders

11	Byte	Physical Number of Heads

12-13	Word	Landing Zone

14	Byte	Logical Sectors per Track

15	Byte	Checksum



Fixed Disk Parameter Table Extension
Byte	Type	Description

0-1	Word	I/O port base Address

2-3	Word	Control port Address

4	Bit 0-3	Reserved, must be 0
	Bit 4	Master/Slave Bit (0=Master)
	Bit 5	Reserved, must be 1
	Bit 6	LBA Enable (1 = Enabled)
	Bit 7	Reserved, must be 1

5	Bits 0-3	Phoenix Proprietary
	Bits 4-7	Reserved, must be 0

6	Bits 0-3	IRQ for this drive
	Bits 4-7	Reserved, must be 0

7	Byte	Sector count for multi-sector transfers

8	Bits 0-3	DMA Channel
	Bits 4-7	DMA Type

9	Bits 0-3	PIO Type
	Bits 4-7	Reserved, must be 0

10-11	Bit 0	Fast PIO accessing enabled
	Bit 1	DMA accessing enabled
	Bit 2	Block PIO accessing enabled
	Bit 3	CHS translation enabled
	Bit 4	LBA translation enabled
	Bit 5	Removable Media
	Bit 6	CD ROM
	Bit 7	32 bit transfer mode
	Bits 8-15	Reserved, must be 0

12-13	Byte	Reserved, must be 0

14	Byte	10h, Current revision level of this extension

15	Byte	Checksum, 2's complement of the sum of bytes 0-14
2.2 	Bytes 0-1	I/O Port Base
This word is the physical base address used for accessing the drive.  It is assumed that any application which provides a proprietary interface to the disk drive will use this base address for addressing the drive.
2.3 	Bytes 2-3	Control Port Base
This word is the physical address of the disk-drive control port.  It is assumed that applications which provide a proprietary interface to the disk will use this address.
2.4 	Byte 4	Head Prefix
This is the upper nibble of the byte used for selecting the head.  This byte is logically ORed with the head each time the disk is addressed.  The Master/Slave bit and the LBA addressing bit are preset, which makes the use of these functions transparent to any software using this extension.
2.5 	Byte 5	Phoenix Proprietary Nibble
This nibble is used by the BIOS and should be ignored.
2.6 	Byte 6	IRQ
Each IDE channel requires an interrupt.  This enables applications to access the interrupts for additional IDE channels.
2.7 	Byte 7	Sector Count

If the BIOS has configured the drive for multi-sector transfers, this field contains the block size of the transfer, in sectors, used by the BIOS.
2.8 	Byte 8	DMA Channel/DMA Type

If the BIOS has configured the system to perform multi-word DMA data transfers in place of the normal PIO transfers, this field specifies the DMA mode in the lower nibble (currently 0 or 1), as per the SFF definition, and the DMA Channel in the upper nibble.  Note that the DMA Type field does not follow the format of the data returned by the drive.
2.9 	Byte 9	PIO Type
If the BIOS has configured the system to perform Fast PIO data transfers in place of normal PIO data transfers, this field specifies the PIO mode as per the SFF definition (currently 1, 2 or 3).


2.10 	Byte 10-11	Disk Drive Options
This byte has a bit for each of the currently defined drive enhancements.  If this byte is 0, the drive is a "standard" drive with less than 1024 cylinders using normal PIO-type data transfers.
2.10.1 	Bit 0	Fast PIO
If the system is configured for Fast PIO, this bit is set to 1 and byte 9 (PIO Type) should be used to configure the system before each transfer request.  If this bit is 0, the PIO-Type field should be ignored, regardless of any data it may contain.
2.10.2 	Bit 1	Fast DMA
If the system is configured for Fast DMA, this bit is set to 1 and byte 8 (DMA Channel/DMA Type) should be used to configure the system before each transfer request.  If this bit is 0, the DMA Channel/DMA Type field should be ignored, regardless of any data it may contain.
2.10.3 	Bit 2	Block PIO
If the system is configured for multi-sector transfers, this bit is set to 1 and byte 7 (Sector Count) will specify the number of sectors used for each data transfer.  If Block PIO is disabled, the Sector Count should be ignored, regardless of the data it may contain.
2.10.4 	Bit 3	CHS Translation
If the disk-drive has more than 1024 cylinders, this bit is set to 1.  CHS translation translates from "Logical" to "Physical" drive geometry.
2.10.5 	Bit 4	LBA Translation
If the system is configured for LBA type addressing, this bit is set to 1.  When LBA translation is on, the INT 13 interface will convert all CHS-type accessing to LBA-type accessing.  LBA-type addressing is available on drives with less than 1024 cylinders, and therefore it should not be assumed that bit 3 (CHS translation) will always be enabled whenever this bit is enabled.
2.10.6	Bit 5	Removable Media
If the disk drive supports removable media, this bit is set to 1.
2.10.7 	Bit 6	CD-ROM
If this IDE device is a CD-ROM, this bit is set to 1.
2.10.8 	Bit 7	32 Bit Transfer Mode
If the BIOS has configured the system to perform 32 bit wide data transfers, this bit is set to 1.



2.11 	Byte 14	Extension Revision
This is set to 10 and represents the revision level of this extension as a BCD number where the first digit is the major revision number and the second digit is the minor revision number.  In the event that more information needs to be added to the Extension, this revision number should be changed.
2.12 	Byte 15	Checksum
This is the two's complement of the sum of bytes 0 through 14.  Adding bytes 0 through 15 should in all cases produce an 8 bit result of 0.
3.0 	BIOS Extensions
If compatibility with current and future software is to be maintained, the BIOS must provide several extended INT 13 functions to deal with the changes in system architecture that allow for more than two drives to be supported as well as making the Fixed Disk Parameter Table Extension available to application and OS software.  The major purpose of these INT 13 extensions is to remove the current requirement of using INT pointers to point at the Parameter Table information and to give the BIOS better control over how this data is manipulated.  Phoenix has chosen to integrate this information with the INT 13 Extensions adopted by both IBM and Microsoft.  The revision of these extensions at the time of this writing is 1.1, only the changes to these functions are documented in this section.
3.1 	Check Extensions Present
INT 13h, Function 41h
	
Registers at call:

AH = 41h
BX = 55AAh
DL = Drive (80h - FFh)

Registers on return:

	CF - Set if function not available
	AH - Major version of extensions (20h)
	AL - Internal Use Only
	BX - AA55h
	CX - API subset support bitmap
	DH - Extension Version

The Major Version is upgraded to 2.0 which allows applications to know that the Extended Drive Parameter Tables are available.  Bit 2 of CX indicates that the Extended Drive Parameter Table for the specified drive is valid.  Bits 3-15 are reserved and should be zero.

3.2 	Get Drive Parameters
INT 13h, Function 48h

Registers at call:

AH = 48h
DL = Drive
DS:SI = Result Buffer Address

Registers on return:

	CF - Set if function not available or error
		AH = Error Code
	CF - Clear if success
		AH = 0
		DS:SI = Following Structure
info_size	dw 30	; Size of this buffer
flags	dw ?	; Information Flags
cylinders	dd ?	; Number of cylinders
heads	dd ?	; Number of heads
sec_per_track	dd ?	; Number of sectors per track
sectors	dq ?	; Number of sectors on the disk
sector_size	dw ?	; Bytes per sector
extended_table	dd ?	; Pointer to configuration parameters

The extended_table is a DWORD pointer of the form SEG:OFFSET which points to the Fixed Disk Parameter Table Extension as described in section 2 (diagrammed in table 1) of this document.  If this field is FFFF:FFFF then the address is considered to be invalid.  All other fields operate as described in revision 1.1 of the extensions.

4.0 	Compatibility Issues
Adding new features to the BIOS, or changing the functionality of an existing BIOS, will always impact software performance.  The purpose of this section is to discuss how some of the anticipated issues are to be handled.
4.1	INT 41/46
INT 41 and INT 46 are platform specific issues.  When a platform supports INT 41/46, the BIOS will use INT 41 to point to drive 80, and INT 46 to point to drive 81.  The BIOS maintains pointers to drives greater than 81 internally.  If the platform does not support INT 41/46, the BIOS maintains all pointers internally.  In either case, INT 13 Function 48 always returns the specified drive information.
4.2 	Disk Drive Mapping
When a system has more than 1 drive, the person configuring the system needs a way to set the relationship between the BIOS references (80, 81, 82, ...) and the physical drive.  The Fixed Disk Parameter Table Extension easily allows this capability because it stores the physical port addresses and control bits used for setting Master/Slave as well as LBA accessing.  One side effect of this implementation is that any drive can be the boot drive, and slave drives may be at any location.  The following are legal configurations:

Standard Configuration:

	80 - Primary Master		[INT 41]
	81 - Primary Slave		[INT 46]

Alternate Configurations:

	80 - Primary Master		[INT 41]
	81 - Secondary Master		[INT 46]
	82 - Secondary Slave

	80 - Secondary Master		[INT 41]
	81 - Primary Master		[INT 46]
	82 - CD (Secondary Slave)

	80 - Secondary Slave		[INT 41]
	81 - Secondary Master		[INT 46]
	82 - Primary Master
	83 - Primary Slave

Enhanced Disk Drive Specification  Version 1.0	

10




