home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 24 / CD_ASCQ_24_0995.iso / vrac / eidefaq.zip / BIOSFAQ.HTM < prev    next >
Text File  |  1995-08-02  |  35KB  |  744 lines

  1. BIOS Types, CHS Translation, LBA and Other Good Stuff
  2.  
  3. Version 3+
  4. 11 February 95
  5.  
  6. by Hale Landis (landis@sugs.tware.com)
  7.  
  8. This is very technical. Please read carefully. There is lots of information
  9. here that can sound confusing the first time you read it.
  10.  
  11. !Introduction (READ THIS!)
  12.  
  13. ! -------------------------
  14.  
  15. ! Why is an understanding of how a BIOS works so important? The basic
  16. reason is that the information returned by INT 13H AH=08H is used by FDISK,
  17. it is used in the partition table entries within a partition record (like
  18. the Master Boot Record) that are created by FDISK, and it is used by the
  19. small boot program that FDISK places into the Master Boot Record. The
  20. information returned by INT 13H AH=08H is in cylinder/head/sector (CHS)
  21. format -- it is not in LBA format. The boot processing done by your
  22. computer's BIOS (INT 19H and INT 13H) is all CHS based.
  23.  
  24. ! Read this so that you are not confused by all the false information going
  25. around that says "LBA solves the >528MB problem". !
  26.  
  27. Read this so that you understand the possible data integrity problem that a
  28. WD EIDE type BIOS creates. Any BIOS that has a "LBA mode" in the BIOS setup
  29. could be a WD EIDE BIOS. Be very careful and NEVER chage the "LBA mode"
  30. setting after you have partitioned and installed your software.
  31.  
  32. History
  33.  
  34. Changes between this version and the preceeding version are marked by "!"
  35. at left margin of the first line of a changed or new paragraph.
  36.  
  37. Version 3 -- New BIOS types found and added to this list. More detailed
  38. information is listed for each BIOS type. A section describing CHS
  39. translation was added.
  40.  
  41. Version 2 -- A rewrite of version 1 adding BIOS types not included in
  42. version 1.
  43.  
  44. Version 1 -- First attempt to classify the BIOS types and describe what
  45. each does or does not do.
  46.  
  47. Definitions
  48.  
  49. * 528MB - The maximun drive capacity that is supported by 1024 cylinders,
  50. 16 heads and 63 sectors (1024x16x63x512). This is the limit for CHS
  51. addressing in the original IBM PC/XT and IBM PC/AT INT 13H BIOS.
  52.  
  53. * 8GB - The maximum drive capacity that can be supported by 1024 cylinders,
  54. 256 heads and 63 sectors (1024x256x63x512). This is the limit for the BIOS
  55. INT 13H AH=0xH calls.
  56.  
  57. ! * ATA - AT Attachment -- The real name of what is widely known as IDE.
  58.  
  59. ! * CE Cylinder - Customer Engineering cylinder. This is the last cylinder
  60. in P-CHS mode. IBM has always reserved this cylinder for use of disk
  61. diagnostic programs. Many BIOS do not account for it correctly. It is of
  62. questionable value these days and probably should be considered obsolete.
  63. However, since there is no industry wide agreement, beware. There is no CE
  64. Cylinder reserved in the L-CHS address. Also beware of diagnostic programs
  65. that don't realize they are operating in L-CHS mode and think that the last
  66. L-CHS cylinder is the CE Cylinder.
  67.  
  68. ! * CHS - Cylinder/Head/Sector. This is the traditional way to address
  69. sectors on a disk. There are at least two types of CHS addressing: the CHS
  70. that is used at the INT 13H interface and the CHS that is used at the ATA
  71. device interface. In the MFM/RLL/ESDI and early ATA days the CHS used at
  72. the INT 13H interface was the same as the CHS used at the device interface.
  73.  
  74. ! Today we have CHS translating BIOS types that can use one CHS at the INT
  75. 13H interface and a different CHS at the device interface. These two types
  76. of CHS will be called the logical CHS or L-CHS and the physical CHS or
  77. P-CHS in this document. L-CHS is the CHS used at the INT 13H interface and
  78. P-CHS is the CHS used at the device interface.
  79.  
  80. ! The L-CHS used at the INT 13 interface allows up to 256 heads, up to 1024
  81. cylinders and up to 63 sectors. This allows support of up to 8GB drives.
  82. This scheme started with either ESDI or SCSI adapters many years ago.
  83.  
  84. ! The P-CHS used at the device interface allows up to 16 heads up to 65535
  85. cylinders, and up to 63 sectors. This allows access to 2^28 sectors (136GB)
  86. on an ATA device. When a P-CHS is used at the INT 13H interface it is
  87. limited to 1024 cylinders, 16 heads and 63 sectors. This is where the old
  88. 528MB limit originated.
  89.  
  90. ! ATA devices may also support LBA at the device interface. LBA allows
  91. access to approximately 2^28 sectors (137GB) on an ATA device.
  92.  
  93. ! A SCSI host adapter can convert a L-CHS directly to an LBA used in the
  94. SCSI read/write commands. On a PC today, SCSI is also limited to 8GB when
  95. CHS addressing is used at the INT 13H interface.
  96.  
  97. * EDPT - Enhanced fixed Disk Parameter Table -- This table returns
  98. additional information for BIOS drive numbers 80H and 81H. The EDPT for
  99. BIOS drive 80H is pointed to by INT 41H. The EDPT for BIOS drive 81H is
  100. pointed to by INT 46H. The EDPT is a fixed disk parameter table with an AxH
  101. signature byte. This table format returns two sets of CHS information. One
  102. set is the L-CHS and is probably the same as returned by INT 13H AH=08H.
  103. The other set is the P-CHS used at the drive interface. This type of table
  104. allows drives with >1024 cylinders or drives >528MB to be supported. The
  105. translated CHS will have <=1024 cylinders and (probably) >16 heads. The CHS
  106. used at the drive interface will have more than 1024 cylinders and 16 or
  107. fewer heads. It is unclear how the IBM defined CE cylinder is accounted for
  108. in such a table. Compaq probably gets the credit for the original
  109. definition of this type of table.
  110.  
  111. ! * FDPT - Fixed Disk Parameter Table - This table returns additional
  112. information for BIOS drive numbers 80H and 81H. The FDPT for BIOS drive 80H
  113. is pointed to by INT 41H. The FDPT for BIOS drive 81H is pointed to by INT
  114. 46H. A FDPT does not have a AxH signature byte. This table format returns a
  115. single set of CHS information. The L-CHS information returned by this table
  116. is probably the same as the P-CHS and is also probably the same as the
  117. L-CHS returned by INT 13H AH=08H. However, not all BIOS properly account
  118. for the IBM defined CE cylinder and this can cause a one or two cylinder
  119. difference between the number of cylinders returned in the AH=08H data and
  120. the FDPT data. IBM gets the credit for the original definition of this type
  121. of table.
  122.  
  123. ! * LBA - Logical Block Address. Another way of addressing sectors that
  124. uses a simple numbering scheme starting with zero as the address of the
  125. first sector on a device. The ATA standard requires that cylinder 0, head
  126. 0, sector 1 address the same sector as addressed by LBA 0. LBA addressing
  127. can be used at the ATA interface if the ATA device supports it. LBA
  128. addressing is also used at the INT 13H interface by the AH=4xH read/write
  129. calls.
  130.  
  131. ! * L-CHS -- Logical CHS. The CHS used at the INT 13H interface by the
  132. AH=0xH calls. See CHS above.
  133.  
  134. ! * MBR - Master Boot Record (also known as a partition table) - The sector
  135. located at cylinder 0 head 0 sector 1 (or LBA 0). This sector is created by
  136. an "FDISK" utility program. The MBR may be the only partition table sector
  137. or the MBR can be the first of multiple partition table sectors that form a
  138. linked list. A partition table entry can describe the starting and ending
  139. sector addresses of a partition (also known as a logical volume or a
  140. logical drive) in both L-CHS and LBA form. Partition table entries use the
  141. L-CHS returned by INT 13H AH=08H. Older FDISK programs may not compute
  142. valid LBA values.
  143.  
  144. * OS - Operating System.
  145.  
  146. ! * P-CHS -- Physical CHS. The CHS used at the ATA device interface. This
  147. CHS is also used at the INT 13H interface by older BIOS's that do not
  148. support >1024 cylinders or >528MB. See CHS above.
  149.  
  150. Background and Assumptions
  151.  
  152. First, please note that this is written with the OS implementor in mind and
  153. that I am talking about the possible BIOS types as seen by an OS during its
  154. hardware configuration search.
  155.  
  156. ! It is very important that you not be confused by all the misinformation
  157. going around these days. All OS's that want to be co-resident with another
  158. OS (and that is all of the PC based OS's that I know of) MUST use INT 13H
  159. to determine the capacity of a hard disk. And that capacity information
  160. MUST be determined in L-CHS mode. Why is this? Because: 1) FDISK and the
  161. partition tables are really L-CHS based, and 2) MS/PC DOS uses INT 13H
  162. AH=02H and AH=03H to read and write the disk and these BIOS calls are L-CHS
  163. based. The boot processing done by the BIOS is all L-CHS based. During the
  164. boot processing, all of the disk read accesses are done in L-CHS mode via
  165. INT 13H and this includes loading the first of the OS's kernel code or boot
  166. manager's code.
  167.  
  168. Second, because there can be multiple BIOS types in any one system, each
  169. drive may be under the control of a different type of BIOS. For example,
  170. drive 80H (the first hard drive) could be controlled by the original system
  171. BIOS, drive 81H (the second drive) could be controlled by a option ROM BIOS
  172. and drive 82H (the third drive) could be controlled by a software driver.
  173. Also, be aware that each drive could be a different type, for example,
  174. drive 80H could be an MFM drive, drive 81H could be an ATA drive, drive 82H
  175. could be a SCSI drive.
  176.  
  177. Third, not all OS's understand or use BIOS drive numbers greater than 81H.
  178. Even if there is INT 13H support for drives 82H or greater, the OS may not
  179. use that support.
  180.  
  181. Fourth, the BIOS INT 13H configuration calls are:
  182.  
  183. ! * AH=08H, Get Drive Parameters -- This call is restricted to drives up to
  184. 528MB without CHS translation and to drives up to 8GB with CHS translation.
  185. For older BIOS with no support for >1024 cylinders or >528MB, this call
  186. returns the same CHS as is used at the ATA interface (the P-CHS). For newer
  187. BIOS's that do support >1024 cylinders or >528MB, this call returns a
  188. translated CHS (the L-CHS). The CHS returned by this call is used by FDISK
  189. to build partition records.
  190.  
  191. * AH=41H, Get BIOS Extensions Support -- This call is used to determine if
  192. the IBM/Microsoft Extensions or if the Phoenix Enhanced INT 13H calls are
  193. supported for the BIOS drive number.
  194.  
  195. * AH=48H, Extended Get Drive Parameters -- This call is used to determine
  196. the CHS geometries, LBA information and other data about the BIOS drive
  197. number.
  198.  
  199. * the FDPT or EDPT -- While not actually a call, but instead a data area,
  200. the FDPT or EDPT can return additional information about a drive.
  201.  
  202. * other tables -- The IBM/Microsoft extensions provide a pointer to a drive
  203. parameter table via INT 13H AH=48H. The Phoenix enhancement provides a
  204. pointer to a drive parameter table extension via INT 13H AH=48H. These
  205. tables are NOT the same as the FDPT or EDPT.
  206.  
  207. Note: The INT 13H AH=4xH calls duplicate the older AH=0xH calls but use a
  208. different parameter passing structure. This new structure allows support of
  209. drives with up to 2^64 sectors (really BIG drives). While at the INT 13H
  210. interface the AH=4xH calls are LBA based, these calls do NOT require that
  211. the drive support LBA addressing.
  212.  
  213. ! CHS Translation Algorithms
  214.  
  215. ! NOTE: Before you send me email about this, read this entire section.
  216. Thanks!
  217.  
  218. ! As you read this, don't forget that all of the boot processing done by
  219. the system BIOS via INT 19H and INT 13H use only the INT 13H AH=0xH calls
  220. and that all of this processing is done in CHS mode.
  221.  
  222. ! First, lets review all the different ways a BIOS can be called to perform
  223. read/write operations and the conversions that a BIOS must support.
  224.  
  225. ! * An old BIOS (like BIOS type 1 below) does no CHS translation and does
  226. not use LBA. It only supports the AH=0xH calls:
  227.  
  228.  INT 13H                                   ATA
  229.       AH=0xH  --------------------------------> device
  230.       (P-CHS)                                   (P-CHS)
  231.  
  232. ! * A newer BIOS may support CHS translation and it may support LBA at the
  233. ATA interface:
  234.  
  235.  INT 13H        L-CHS                      ATA
  236.       AH=0xH  --+--> to    --+----------------> device
  237.       (L-CHS)   |    P-CHS   |                  (P-CHS)
  238.                 |            |
  239.                 |            |    P-CHS
  240.                 |            +--> to    --+
  241.                 |                 LBA     |
  242.                 |                         |
  243.                 |    L-CHS                |     ATA
  244.                 +--> to  -----------------+---> device
  245.                      LBA                        (LBA)
  246.  
  247. ! * A really new BIOS may also support the AH=4xH in addtion to the older
  248. AH\0xH calls. This BIOS must support all possible combinations of CHS and
  249. LBA at both the INT 13H and ATA interfaces:
  250.  
  251.  INT 13H                                   ATA
  252.       AH=4xH  --+-----------------------------> device
  253.       (LBA)     |                               (LBA)
  254.                 |
  255.                 |    LBA
  256.                 +--> to    ---------------+
  257.                      P-CHS                |
  258.                                           |
  259.       INT 13H        L-CHS                |     ATA
  260.       AH=0xH  --+--> to    --+------------+---> device
  261.       (L-CHS)   |    P-CHS   |                  (P-CHS)
  262.                 |            |
  263.                 |            |    P-CHS
  264.                 |            +--> to    --+
  265.                 |                 LBA     |
  266.                 |                         |
  267.                 |    L-CHS                |     ATA
  268.                 +--> to  -----------------+---> device
  269.                      LBA                        (LBA)
  270.  
  271. ! You would think there is only one L-CHS to P-CHS translation algorithm,
  272. only one L-CHS to LBA translation algorithm and only one P-CHS to LBA
  273. translation algorithm. But this is not so. Why? Because there is no
  274. document that standardizes such an algorithm. You can not rely on all
  275. BIOS's and OS's to do these translations the same way.
  276.  
  277. ! The following explains what is widely accepted as the "correct"
  278. algorithms.
  279.  
  280. ! An ATA disk must implement both CHS and LBA addressing and must at any
  281. given time support only one P-CHS at the device interface. And, the drive
  282. must maintain a strick relationship between the sector addressing in CHS
  283. mode and LBA mode. Quoting the ATA-2 document:
  284.  
  285. LBA = ( (cylinder * heads_per_cylinder + heads ) * sectors_per_track ) +
  286. sector - 1
  287.  
  288. where heads_per_cylinder and sectors_per_track are the current translation
  289. mode values.
  290.  
  291. ! This algorithm can also be used by a BIOS or an OS to convert a L-CHS to
  292. an LBA as we'll see below.
  293.  
  294. ! This algorithm can be reversed such that an LBA can be converted to a
  295. CHS:
  296.  
  297.  cylinder = LBA / (heads_per_cylinder * sectors_per_track)
  298.         temp = LBA % (heads_per_cylinder * sectors_per_track)
  299.         head = temp / sectors_per_track
  300.       sector = temp % sectors_per_track + 1
  301.  
  302. ! While most OS's compute disk addresses in an LBA scheme, an OS like DOS
  303. must convert that LBA to a CHS in order to call INT 13H.
  304.  
  305. ! Technically an INT 13H should follow this process when converting an
  306. L-CHS to a P-CHS:
  307.  
  308. 1) convert the L-CHS to an LBA,
  309. 2) convert the LBA to a P-CHS,
  310.  
  311. ! If an LBA is required at the ATA interface, then this third step is
  312. needed:
  313.  
  314. 3) convert the P-CHS to an LBA.
  315.  
  316. ! All of these conversions are done by normal arithmetic.
  317.  
  318. ! However, while this is the technically correct way to do things, certain
  319. short cuts can be taken. It is possible to convert an L-CHS directly to a
  320. P-CHS using bit a bit shifting algorithm. This combines steps 1 and 2. And,
  321. if the ATA device being used supports LBA, steps 2 and 3 are not needed.
  322. The LBA value produced in step 1 is the same as the LBA value produced in
  323. step 3.
  324.  
  325. ! AN EXAMPLE
  326.  
  327. ! Lets look at an example. Lets say that the L-CHS is 1000 cylinders 10
  328. heads and 50 sectors, the P-CHS is 2000 cylinders, 5 heads and 50 sectors.
  329. Lets say we want to access the sector at L-CHS 2,4,3.
  330.  
  331. ! * step 1 converts the L-CHS to an LBA,
  332.  
  333. lba = 1202 = ( ( 2 * 10 + 4 ) * 50 ) + 3 - 1
  334.  
  335. ! * step 2 converts the LBA to the P-CHS,
  336.  
  337. cylinder = 4 = ( 1202 / ( 5 * 50 )
  338. temp = 202 = ( 1202 % ( 5 * 50 ) )
  339. head = 4 = ( 202 / 50 )
  340. sector = 3 = ( 202 % 50 ) + 1
  341.  
  342. ! * step 3 converts the P-CHS to an LBA,
  343.  
  344. lba = 1202 = ( ( 4 * 5 + 4 ) * 50 ) + 3 - 1
  345.  
  346. ! Most BIOS (or OS) software is not going to do all of this to convert an
  347. address. Most will use some other algorithm. There are many such
  348. algorithms.
  349.  
  350. ! BIT SHIFTING INSTEAD
  351.  
  352. ! If the L-CHS is produced from the P-CHS by 1) dividing the P-CHS
  353. cylinders by N, and 2) multiplying the P-CHS heads by N, where N is 2, 4,
  354. 8, ..., then this bit shifting algorithm can be used and N becomes a bit
  355. shift value. This is the most common way to make the P-CHS geometry of a
  356. >528MB drive fit the INT 13H L-CHS rules. Plus this algorithm maintains the
  357. same sector ordering as the more complex algorithm above. Note the
  358. following:
  359.  
  360. Lcylinder = L-CHS cylinder being accessed
  361. Lhead = L-CHS head being accessed
  362. Lsector = L-CHS sector being accessed
  363.  
  364. Pcylinder = the P-CHS cylinder being accessed
  365. Phead = the P-CHS head being accessed
  366. Psector = P-CHS sector being accessed
  367.  
  368. NPH = is the number of heads in the P-CHS
  369. N = 2, 4, 8, ..., the bit shift value
  370.  
  371. ! The algorithm, which can be implemented using bit shifting instead of
  372. multiply and divide operations is:
  373.  
  374. Pcylinder = ( Lcylinder * N ) + ( Lhead / NPH );
  375. Phead = ( Lhead % NPH );
  376. Psector = Lsector;
  377.  
  378. ! A BIT SHIFTING EXAMPLE
  379.  
  380. ! Lets apply this to our example above (L-CHS = 1000,10,50 and P-CHS =
  381. 2000, 5, 50) and access the same sector at at L-CHS 2,4,3.
  382.  
  383. Pcylinder = 4 = ( 2 * 2 ) + ( 4 / 5 )
  384. Phead = 4 = ( 4 % 5 )
  385. Psector = 3 = 3
  386.  
  387. ! As you can see, this produces the same P-CHS as the more complex method
  388. above.
  389.  
  390. ! SO WHAT IS THE PROBLEM?
  391.  
  392. ! The basic problem is that there is no requirement that a CHS translating
  393. BIOS followed these rules. There are many other algorithms that can be
  394. implemented to perform a similar function. Today, there are at least two
  395. popular implementions: the Phoenix implementation (described above) and the
  396. non-Phoenix implementations.
  397.  
  398. ! SO WHY IS THIS A PROBLEM IF IT IS HIDDEN INSIDE THE BIOS?
  399.  
  400. ! Because a protected mode OS that does not want to use INT 13H must
  401. implement the same CHS translation algorithm. If it doesn't, your data gets
  402. scrambled.
  403.  
  404. ! WHY USE CHS AT ALL?
  405.  
  406. ! In the perfect world of tomorrow, maybe only LBA will be used. But today
  407. we are faced with the following problems:
  408.  
  409. ! * Some drives >528MB don't implement LBA.
  410.  
  411. ! * Some drives are optimized for CHS and may have lower performance when
  412. given commands in LBA mode. Don't forget that LBA is something new for the
  413. ATA disk designers who have worked very hard for many years to optimize CHS
  414. address handling. And not all drive designs require the use of LBA
  415. internally.
  416.  
  417. ! * The L-CHS to LBA conversion is more complex and slower than the bit
  418. shifting L-CHS to P-CHS conversion.
  419.  
  420. ! * DOS, FDISK and the MBR are still CHS based -- they use the CHS returned
  421. by INT 13H AH=08H. Any OS that can be installed on the same disk with DOS
  422. must understand CHS addressing.
  423.  
  424. ! * The BIOS boot processing and loading of the first OS kernel code is
  425. done in CHS mode -- the CHS returned by INT 13H AH=08H is used.
  426.  
  427. ! * Microsoft has said that their OS's will not use any disk capacity that
  428. can not also be accessed by INT 13H AH=0xH.
  429.  
  430. ! These are difficult problems to overcome in today's industry environment.
  431. The result: chaos.
  432.  
  433. ! DANGER TO YOUR DATA!
  434.  
  435. ! See the description of BIOS Type 7 below to understand why a WD EIDE BIOS
  436. is so dangerous to your data.
  437.  
  438. The BIOS Types
  439.  
  440. I assume the following:
  441.  
  442. a) All BIOS INT 13H support has been installed by the time the OS starts
  443. its boot processing. I'm don't plan to cover what could happen to INT 13H
  444. once the OS starts loading its own device drivers.
  445.  
  446. b) Drives supported by INT 13H are numbered sequentially starting with
  447. drive number 80H (80H-FFH are hard drives, 00-7FH are floppy drives).
  448.  
  449. ! And remember, any time a P-CHS exists it may or may not account for the
  450. CE Cylinder properly.
  451.  
  452. I have identified the following types of BIOS INT 13H support as seen by an
  453. OS during its boot time hardware configuration determination:
  454.  
  455. BIOS Type 1
  456.  
  457. Origin: Original IBM PC/XT.
  458.  
  459. ! BIOS call support: INT 13H AH=0xH and FDPT for BIOS drives 80H and 81H.
  460. There is no CHS translation. INT 13H AH=08H returns the P-CHS. The FDPT
  461. should contain the same P-CHS.
  462.  
  463. ! Description: Supports up to 528MB from a table of drive descriptions in
  464. BIOS ROM. No support for >1024 cylinders or drives >528MB or LBA.
  465.  
  466. Support issues: For >1024 cylinders or >528MB support, either an option ROM
  467. with an INT 13H replacement (see BIOS types 4-7) -or- a software driver
  468. (see BIOS type 8) must be added to the system.
  469.  
  470. BIOS Type 2
  471.  
  472. Origin: Unknown, but first appeared on systems having BIOS drive type table
  473. entries defining >1024 cylinders. Rumored to have originated at the request
  474. of Novell or SCO.
  475.  
  476. ! BIOS call support: INT 13H AH=0xH and FDPT for BIOS drives 80H and 81H.
  477. INT 13H AH=08H should return a L-CHS with the cylinder value limited to
  478. 1024. Beware, many BIOS perform a logical AND on the cylinder value. A
  479. correct BIOS will limit the cylinder value as follows:
  480.  
  481. cylinder = cylinder > 1024 ? 1024 : cylinder;
  482.  
  483. ! An incorrect BIOS will limit the cylinder value as follows (this
  484. implementation turns a 540MB drive into a 12MB drive!):
  485.  
  486. cylinder = cylinder & 0x03ff;
  487.  
  488. ! The FDPT will return a P-CHS that has the full cylinder value.
  489.  
  490. ! Description: For BIOS drive numbers 80H and 81H, this BIOS type supports
  491. >1024 cylinders or >528MB without using a translated CHS in the FDPT. INT
  492. 13H AH=08H truncates cylinders to 1024 (beware of buggy implementations).
  493. The FDPT can show >1024 cylinders thereby allowing an OS to support drives
  494. >528MB. May convert the L-CHS or P-CHS directly to an LBA if the ATA device
  495. supports LBA.
  496.  
  497. Support issues: Actual support of >1024 cylinders is OS specific -- some
  498. OS's may be able to place OS specific partitions spanning or beyond
  499. cylinder 1024. Usually all OS boot code must be within first 1024
  500. cylinders. The FDISK program of an OS that supports such partitions uses an
  501. OS specific partition table entry format to identify these paritions. There
  502. does not appear to be a standard (de facto or otherwise) for this unusual
  503. partition table entry. Apparently one method is to place -1 into the CHS
  504. fields and use the LBA fields to describe the location of the partition.
  505. This DOES NOT require the drive to support LBA addressing. Using an LBA in
  506. the partition table entry is just a trick to get around the CHS limits in
  507. the partition table entry. It is unclear if such a partition table entry
  508. will be ignored by an OS that does not understand what it is. For an OS
  509. that does not support such partitions, either an option ROM with an INT 13H
  510. replacement (see BIOS types 4-7) -or- a software driver (see BIOS type 8)
  511. must be added to the system.
  512.  
  513. Note: OS/2 can place HPFS partitions and Linux can place Linux partitions
  514. beyond or spanning cylinder 1024. (Anyone know of other systems that can do
  515. the same?)
  516.  
  517. BIOS Type 3
  518.  
  519. Origin: Unknown, but first appeared on systems having BIOS drive type table
  520. entires defining >1024 cylinders. Rumored to have originated at the request
  521. of Novell or SCO.
  522.  
  523. ! BIOS call support: INT 13H AH=0xH and FDPT for BIOS drives 80H and 81H.
  524. INT 13H AH=08H can return an L-CHS with more than 1024 cylinders.
  525.  
  526. Description: This BIOS is like type 2 above but it allows up to 4096
  527. cylinders (12 cylinder bits). It does this in the INT 13H AH=0xH calls by
  528. placing two most significant cylinder bits (bits 11 and 10) into the upper
  529. two bits of the head number (bits 7 and 6).
  530.  
  531. Support issues: Identification of such a BIOS is difficult. As long as the
  532. drive(s) supported by this type of BIOS have <1024 cylinders this BIOS
  533. looks like a type 2 BIOS because INT 13H AH=08H should return zero data in
  534. bits 7 and 6 of the head information. If INT 13H AH=08H returns non zero
  535. data in bits 7 and 6 of the head information, perhaps it can be assumed
  536. that this is a type 3 BIOS. For more normal support of >1024 cylinders or
  537. >528MB, either an option ROM with an INT 13H replacement (see BIOS types
  538. 4-7) -or- a software driver (see BIOS type 8) must be added to the system.
  539.  
  540. Note: Apparently this BIOS type is no longer produced by any BIOS vendor.
  541.  
  542. BIOS Type 4
  543.  
  544. Origin: Compaq. Probably first appeared in systems with ESDI drives having
  545. >1024 cylinders.
  546.  
  547. ! BIOS call support: INT 13H AH=0xH and EDPT for BIOS drives 80H and 81H.
  548. If the drive has <1024 cylinders, INT 13H AH=08H returns the P-CHS and a
  549. FDPT is built. If the drive has >1024 cylinders, INT 13H AH=08H returns an
  550. L-CHS and an EDPT is built.
  551.  
  552. ! Description: Looks like a type 2 BIOS when an FDPT is built. Uses CHS
  553. translation when an EDPT is used. May convert the L-CHS directly to an LBA
  554. if the ATA device supports LBA.
  555.  
  556. Support issues: This BIOS type may support up to four drives with a EDPT
  557. (or FDPT) for BIOS drive numbers 82H and 83H located in memory following
  558. the EDPT (or FDPT) for drive 80H. Different CHS translation algorithms may
  559. be used by the BIOS and an OS.
  560.  
  561. BIOS Type 5
  562.  
  563. Origin: The IBM/Microsoft BIOS Extensions document. For many years this
  564. document was marked "confidential" so it did not get wide spread
  565. distribution.
  566.  
  567. ! BIOS call support: INT 13H AH=0xH, AH=4xH and EDPT for BIOS drives 80H
  568. and 81H. INT 13H AH=08H returns an L-CHS. INT 13H AH=41H and AH=48H should
  569. be used to get P-CHS configuration. The FDPT/EDPT should not be used. In
  570. some implementations the FDPT/EDPT may not exist.
  571.  
  572. ! Description: A BIOS that supports very large drives (>1024 cylinders,
  573. >528MB, actually >8GB), and supports the INT 13H AH=4xH read/write
  574. functions. The AH=4xH calls use LBA addressing and support drives with up
  575. to 2^64 sectors. These calls do NOT require that a drive support LBA at the
  576. drive interface. INT 13H AH=48H describes the L-CHS used at the INT 13
  577. interface and the P-CHS or LBA used at the drive interface. This BIOS
  578. supports the INT 13 AH=0xH calls the same as a BIOS type 4.
  579.  
  580. ! Support issues: While the INT 13H AH=4xH calls are well defined, they are
  581. not implemented in many systems shipping today. Currently undefined is how
  582. such a BIOS should respond to INT 13H AH=08H calls for a drive that is
  583. >8GB. Different CHS translation algorithms may be used by the BIOS and an
  584. OS.
  585.  
  586. Note: Support of LBA at the drive interface may be automatic or may be
  587. under user control via a BIOS setup option. Use of LBA at the drive
  588. interface does not change the operation of the INT 13 interface.
  589.  
  590. BIOS Type 6
  591.  
  592. Origin: The Phoenix Enhanced Disk Drive Specification.
  593.  
  594. ! BIOS call support: INT 13H AH=0xH, AH=4xH and EDPT for BIOS drives 80H
  595. and 81H. INT 13H AH=08H returns an L-CHS. INT 13H AH=41H and AH=48H should
  596. be used to get P-CHS configuration. INT 13H AH=48H returns the address of
  597. the Phoenix defined "FDPT Extension" table.
  598.  
  599. ! Description: A BIOS that supports very large drives (>1024 cylinders,
  600. >528MB, actually >8GB), and supports the INT 13H AH=4xH read/write
  601. functions. The AH=4xH calls use LBA addressing and support drives with up
  602. to 2^64 sectors. These calls do NOT require that a drive support LBA at the
  603. drive interface. INT 13H AH=48H describes the L-CHS used at the INT 13
  604. interface and the P-CHS or LBA used at the drive interface. This BIOS
  605. supports the INT 13 AH=0xH calls the same as a BIOS type 4. The INT 13H
  606. AH=48H call returns additional information such as host adapter addresses,
  607. DMA support, LBA support, etc, in the Phoenix defined "FDPT Extension"
  608. table.
  609.  
  610. ! Phoenix says this this BIOS need not support the INT 13H AH=4xH
  611. read/write calls but this BIOS is really an extension/enhancement of the
  612. original IBM/MS BIOS so most implementations will probably support the full
  613. set of INT 13H AH=4xH calls.
  614.  
  615. ! Support issues: Currently undefined is how such a BIOS should respond to
  616. INT 13H AH=08H calls for a drive that is >8GB. Different CHS translation
  617. algorithms may be used by the BIOS and an OS.
  618.  
  619. Note: Support of LBA at the drive interface may be automatic or may be
  620. under user control via a BIOS setup option. Use of LBA at the drive
  621. interface does not change the operation of the INT 13 interface.
  622.  
  623. BIOS Type 7
  624.  
  625. Origin: Described in the Western Digital Enhanced IDE Implementation Guide.
  626.  
  627. BIOS call support: INT 13H AH=0xH and FDPT or EDPT for BIOS drives 80H and
  628. 81H. An EDPT with a L-CHS of 16 heads and 63 sectors is built when "LBA
  629. mode" is enabled. An FDPT is built when "LBA mode" is disabled.
  630.  
  631. ! Description: Supports >1024 cylinders or >528MB using a EDPT with a
  632. translated CHS *** BUT ONLY IF *** the user requests "LBA mode" in the BIOS
  633. setup *** AND *** the drive supports LBA. As long as "LBA mode" is enabled,
  634. CHS translation is enabled using a L-CHS with <=1024 cylinders, 16, 32, 64,
  635. ..., heads and 63 sectors. Disk read/write commands are issued in LBA mode
  636. at the ATA interface but other commands are issued in P-CHS mode. Because
  637. the L-CHS is determined by table lookup based on total drive capacity and
  638. not by a multiply/divide of the P-CHS cylinder and head values, it may not
  639. be possible to use the simple (and faster) bit shifting L-CHS to P-CHS
  640. algorithms.
  641.  
  642. ! When "LBA mode" is disabled, this BIOS looks like a BIOS type 2 with an
  643. FDPT. The L-CHS used is taken either from the BIOS drive type table or from
  644. the device's Identify Device data. This L-CHS can be very different from
  645. the L-CHS returned when "LBA mode" is enabled.
  646.  
  647. This BIOS may support FDPT/EDPT for up to four drives in the same manner as
  648. described in BIOS type 4.
  649.  
  650. ! The basic problem with this BIOS is that the CHS returned by INT 13H
  651. AH=08H changes because of a change in the "LBA mode" setting in the BIOS
  652. setup. This should not happen. This use or non-use of LBA at the ATA
  653. interface should have no effect on the CHS returned by INT 13H AH=08H. This
  654. is the only BIOS type know to have this problem.
  655.  
  656. ! Support issues: If the user changes the "LBA mode" setting in BIOS setup,
  657. INT 13H AH=08H and the FDPT/EDPT change which may cause *** DATA CORRUPTION
  658. ***. The user should be warned to not change the "LBA mode" setting in BIOS
  659. setup once the drive has been partitioned and software installed. Different
  660. CHS translation algorithms may be used by the BIOS and an OS.
  661.  
  662. BIOS Type 8
  663.  
  664. Origin: Unknown. Perhaps Ontrack's Disk Manager was the first of these
  665. software drivers. Another example of such a driver is Micro House's EZ
  666. Drive.
  667.  
  668. ! BIOS call support: Unknown (anyone care to help out here?). Mostly likely
  669. only INT 13H AH=0xH are support. Probably a FDPT or EDPT exists for drives
  670. 80H and 81H.
  671.  
  672. ! Description: A software driver that "hides" in the MBR such that it is
  673. loaded into system memory before any OS boot processing starts. I don't
  674. know how these drivers respond to INT 13H AH=08H or how they set up drive
  675. parameter tables (anyone care to help out here?). Some of these drivers
  676. convert the L-CHS to an LBA, then they add a small number to the LBA and
  677. finally they convert the LBA to a P-CHS. This in effect skips over some
  678. sectors at the front of the disk.
  679.  
  680. ! Support issues: Several identified -- Some OS installation programs will
  681. remove or overlay these drivers; some of these drivers do not perform CHS
  682. translation using the same algorithms used by the other BIOS types; special
  683. OS device drivers may be required in order to use these software drivers
  684. For example, under MS Windows the standard FastDisk driver (the 32-bit disk
  685. access driver) must be replaced by a driver that understands the Ontrack,
  686. Micro House, etc, version of INT 13H. Different CHS translation algorithms
  687. may be used by the driver and an OS.
  688.  
  689. BIOS Type 9
  690.  
  691. Origin: SCSI host adapters.
  692.  
  693. BIOS call support: Probably INT 13H AH=0xH and FDPT for BIOS drives 80H and
  694. 81H, perhaps INT 13H AH=4xH.
  695.  
  696. ! Description: Most SCSI host adapters contain an option ROM that enables
  697. INT 13 support for the attached SCSI hard drives. It is possible to have
  698. more than one SCSI host adapter, each with its own option ROM. The CHS used
  699. at the INT 13H interface is converted to the LBA that is used in the SCSI
  700. commands. INT 13H AH=08H returns a CHS. This CHS will have <=1024
  701. cylinders, <=256 heads and <=63 sectors. The FDPT probably will exist for
  702. SCSI drives with BIOS drive numbers of 80H and 81H and probably indicates
  703. the same CHS as that returned by INT 13H AH=08H. Even though the CHS used
  704. at the INT 13H interface looks like a translated CHS, there is no need to
  705. use a EDPT since there is no CHS-to-CHS translation used. Other BIOS calls
  706. (most likely host adapter specific) must be used to determine other
  707. information about the host adapter or the drives.
  708.  
  709. ! The INT 13H AH=4xH calls can be used to get beyond 8GB but since there is
  710. little support for these calls in today's OS's, there are probably few SCSI
  711. host adapters that support these newer INT 13H calls.
  712.  
  713. Support issues: Some SCSI host adapters will not install their option ROM
  714. if there are two INT 13H devices previously installed by another INT 13H
  715. BIOS (for example, two MFM/RLL/ESDI/ATA drives). Other SCSI adapters will
  716. install their option ROM and use BIOS drive numbers greater than 81H. Some
  717. older OS's don't understand or use BIOS drive numbers greater than 81H.
  718. SCSI adapters are currently faced with the >8GB drive problem.
  719.  
  720. ! BIOS Type 10
  721.  
  722. ! Origin: A european system vendor.
  723.  
  724. ! BIOS call support: INT 13H AH=0xH and FDPT for BIOS drives 80H and 81H.
  725.  
  726. ! Description: This BIOS supports drives >528MB but it does not support CHS
  727. translation. It supports only ATA drives with LBA capability. INT 13H
  728. AH=08H returns an L-CHS. The L-CHS is converted directly to an LBA. The
  729. BIOS sets the ATA drive to a P-CHS of 16 heads and 63 sectors using the
  730. Initialize Drive Parameters command but it does not use this P-CHS at the
  731. ATA interface.
  732.  
  733. ! Support issues: OS/2 will probably work with this BIOS as long as the ATA
  734. Identify Device command returns 16 in word 3 and 63 in word 6.
  735.  
  736. /end/ --
  737.  
  738. \\===============\\=======================\\
  739.  \\  Hale Landis  \\      303-548-0567     \\
  740.  // Niwot, CO USA // landis@sugs.tware.com //
  741. //===============//=======================//
  742.  
  743. --ofjgvvxwtmcxiqsoksgppvccbaaise--
  744.