Changeset 533 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h
- Timestamp:
- Apr 3, 2013, 4:12:34 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/Handlers/Int13h/EBIOS/AH48h_GetExtendedDriveParameters.asm
r530 r533 23 23 ;-------------------------------------------------------------------- 24 24 ; Int 13h function AH=48h, Get Extended Drive Parameters. 25 ; 26 ; It is not completely clear what this function should return as total sector count in some cases. 27 ; What is certain is that: 28 ; A) Phoenix Enhanced Disk Drive Specification v3.0 says that P-CHS values 29 ; are never returned for drives with more than 15,482,880 sectors (16384*15*63). 30 ; For those drives we can simply return total sector count from 31 ; ATA ID WORDs 60 and 61 (LBA28) or WORDs 100-103 (LBA48). 32 ; B) IBM PC DOS 7.1 fdisk32 displays warning message if P-CHS values multiplied 33 ; together are different than total sector count. Therefore for drives with less 34 ; than or equal 15,482,880 sectors we MUST NOT return total sector count from 35 ; ATA ID WORDs 60 and 61. 36 ; 37 ; Lets take an example. 6 GB Hitachi microdrive reports following values in ATA ID: 38 ; Sector count from WORDs 60 and 61 : 12,000,556 39 ; Cylinders : 11905 40 ; Heads : 16 41 ; Sectors per track : 63 42 ; 43 ; When multiplying C*H*S we get : 12,000,240 44 ; So the CHS size is a little bit less than LBA size. But we must use 45 ; the smaller value since C*H*S must equal total sector count! 46 ; 47 ; Now we get to the uncertain area where I could not find any information. 48 ; Award BIOS from 1997 Pentium motherboard returns following values: 49 ; AH=08h L-CHS: 745, 255, 63 (exactly the same as what we return) 50 ; => Total Sector Count: 745*255*63 = 11,968,425 51 ; AH=48h P-CHS: 11873, 16, 63 52 ; AH=48h Total Sector Count: 11873* 16*63 = 11,967,984 53 ; 54 ; Notice how AH=48h returns lesser total sector count than AH=8h! The only 55 ; way I could think of to get 11873 cylinders is to divide AH=08h sector 56 ; count with P-CHS heads and sectors: (745*255*63) / (16*63) = 11873 57 ; 58 ; I have no idea what is the reasoning behind it but at least there is one 59 ; BIOS that does just that. 60 ; 61 ; Since I don't have any better knowledge, I decided that when RESERVE_DIAGNOSTIC_CYLINDER 62 ; is defined, we do what the Award BIOS does. When it is not defined, we multiply 63 ; P-CHS values together and use that as total sector count. 64 ; 25 65 ; 26 66 ; AH48h_GetExtendedDriveParameters
Note:
See TracChangeset
for help on using the changeset viewer.