ATA disks and BIOS ...
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
ATA disks and BIOS ...
Just something that troubles me ... if some of you have a hint, i would appreciate.
The ATA (a.k.a. IDE) disk standard allows up to 4 devices to be connected to the P.C. : primary master, primary slave, secondary master and secodary slave.
As i failed (so far) to find a detection technique that would give good results in both BOCHS-1.4.1 and BOCHS-2.0.2 (prior i test it on real hardware), i wanted to reuse the detection results from the BIOS initialization.
But so far, all i could find from BiosCentral (as well as other information i got from "Pc Bible - M. Tischer") seems to prove that the BIOS only recognizes two drives: 0x80 and 0x81.
This seems to be confirmed by the CMOS data map, which has a single byte (offset 12h) to store the type of the detected hard disk.
So, how do the BIOS handle the case of a system that would have 3 or 4 hdds ? or can't we just access the other disks using INT 13h ?
The ATA (a.k.a. IDE) disk standard allows up to 4 devices to be connected to the P.C. : primary master, primary slave, secondary master and secodary slave.
As i failed (so far) to find a detection technique that would give good results in both BOCHS-1.4.1 and BOCHS-2.0.2 (prior i test it on real hardware), i wanted to reuse the detection results from the BIOS initialization.
But so far, all i could find from BiosCentral (as well as other information i got from "Pc Bible - M. Tischer") seems to prove that the BIOS only recognizes two drives: 0x80 and 0x81.
This seems to be confirmed by the CMOS data map, which has a single byte (offset 12h) to store the type of the detected hard disk.
So, how do the BIOS handle the case of a system that would have 3 or 4 hdds ? or can't we just access the other disks using INT 13h ?
Re:ATA disks and BIOS ...
Hi
Have you tried accessing drives 82h (Secondary Master) and 83h (Secondary Slave) with the normal Int 13h calls.
If they don't work, Try the BIOS Extensions (I think they even support large drives!!):
Int 13/AH=42h - IBM/MS INT 13 Extensions - EXTENDED READ
Int 13/AH=43h - IBM/MS INT 13 Extensions - EXTENDED WRITE
Int 13/AH=44h - IBM/MS INT 13 Extensions - VERIFY SECTORS
Int 13/AH=45h - IBM/MS INT 13 Extensions - LOCK/UNLOCK DRIVE
Int 13/AH=46h - IBM/MS INT 13 Extensions - EJECT MEDIA
Int 13/AH=47h - IBM/MS INT 13 Extensions - EXTENDED SEEK
Int 13/AH=48h - IBM/MS INT 13 Extensions - GET DRIVE PARAMETERS
Int 13/AH=49h - IBM/MS INT 13 Extensions - EXTENDED MEDIA CHANGE
Int 13/AH=4Eh - IBM/MS INT 13 Extensions v2.1+ - SET HARDWARE CONFIGURATION
Hope this Helps!
srg
Have you tried accessing drives 82h (Secondary Master) and 83h (Secondary Slave) with the normal Int 13h calls.
If they don't work, Try the BIOS Extensions (I think they even support large drives!!):
Int 13/AH=42h - IBM/MS INT 13 Extensions - EXTENDED READ
Int 13/AH=43h - IBM/MS INT 13 Extensions - EXTENDED WRITE
Int 13/AH=44h - IBM/MS INT 13 Extensions - VERIFY SECTORS
Int 13/AH=45h - IBM/MS INT 13 Extensions - LOCK/UNLOCK DRIVE
Int 13/AH=46h - IBM/MS INT 13 Extensions - EJECT MEDIA
Int 13/AH=47h - IBM/MS INT 13 Extensions - EXTENDED SEEK
Int 13/AH=48h - IBM/MS INT 13 Extensions - GET DRIVE PARAMETERS
Int 13/AH=49h - IBM/MS INT 13 Extensions - EXTENDED MEDIA CHANGE
Int 13/AH=4Eh - IBM/MS INT 13 Extensions v2.1+ - SET HARDWARE CONFIGURATION
Hope this Helps!
srg
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:ATA disks and BIOS ...
thanks for the info. I'll try it, but as it is named "IBM/MS extensions", i fear it requires a driver from MS-Dos to work :-/
by the way, Clicker can now detect ATA-compliant hdd and report model name & geometry in "system.device.disk.*"
something that still troubles me is the difference between physical and logical geometry ... probably i should dig those docs about sector addressing modes from CHS to LBA, featuring all the intermediate extensions ...
by the way, Clicker can now detect ATA-compliant hdd and report model name & geometry in "system.device.disk.*"
something that still troubles me is the difference between physical and logical geometry ... probably i should dig those docs about sector addressing modes from CHS to LBA, featuring all the intermediate extensions ...
Re:ATA disks and BIOS ...
Things get easier at the hardware level, i.e. without the BIOS. Unless you want to address really huge drives, you can use either CHS or LBA. And a CHS-only drive will be very rare these days. I reckon you could probably go with LBA only, and ignore cylinders and heads completely.
Re:ATA disks and BIOS ...
..
Last edited by Perica on Sun Dec 03, 2006 9:10 pm, edited 1 time in total.
Re:ATA disks and BIOS ...
Yes.
Internally, IDE drives don't use cylinders, heads and sectors. The controller converts CHS and LBA into the same address anyway.
Internally, IDE drives don't use cylinders, heads and sectors. The controller converts CHS and LBA into the same address anyway.
Re:ATA disks and BIOS ...
..
Last edited by Perica on Sun Dec 03, 2006 9:10 pm, edited 1 time in total.
Re:ATA disks and BIOS ...
AFAIK there is an IDE floppy drive specification, but I've never seen an IDE floppy drive. Any floppy drive that you see will be normal, and use CHS.Perica Senjak wrote:Is there a LBA interface for floppy disk drives??
CHS = Cylinder/Head/Sector. Track/Head/Sector is more common when referring to floppy disks, although it's the same idea.Also, just out of curiosity..... what does CHS and LBA stand for??
LBA = Logical Block Addressing.
Re:ATA disks and BIOS ...
Hmmm.... What about SCSI floppy drives - I'm pretty sure they exist.AFAIK there is an IDE floppy drive specification, but I've never seen an IDE floppy drive. Any floppy drive that you see will be normal, and use CHS.
Mark
Re:ATA disks and BIOS ...
..
Last edited by Perica on Sun Dec 03, 2006 9:10 pm, edited 1 time in total.
Re:ATA disks and BIOS ...
It's yet another kind of bus. Probably most similar to IDE (in fact, ATAPI commands for CD-ROMs are SCSI commands send over the IDE bus). SCSI pre-dates the current IDE drives (ATA drives) by a few years.