Hi Eric and Andre, I read carefully the following document about CHS and LBA addressing performed by the BIOS:
http://www.ata-atapi.com/hiwchs.htm > Hi, this sounds like a wrong error message. > > Having more than 64k heads or sectors-per-track is just > a sign of implausible extended geometries. The real limit > tested for is 2 Terabyte (more than 4 G total sectors)... > However, maybe the fallback is to use CHS if the LBA data > is implausible - then you can indeed only use 8 GB...? > > Eric > > > if (lba_bios_parameters.heads > 0xffff || > > lba_bios_parameters.sectors > 0xffff || > > lba_bios_parameters.totalSectHigh != 0) ... > > printf("Drive is too large to handle, using only 1st 8 GB\n" > > " heads %lu sectors %lu , total=0x%lx-%08lx\n", ... > > (ULONG) lba_bios_parameters.heads, > > (ULONG) lba_bios_parameters.sectors, > > (ULONG) lba_bios_parameters.totalSect, > > (ULONG) lba_bios_parameters.totalSectHigh); ... My guess -------- The above piece of code is correct as long as INT13 is called with AH=08H (which calls the BIOS function: Get Drive Parameters). Excerpt from the site: "... AH=08H, Get Drive Parameters. This call is restricted to drives up to 528MB without CHS translation and to drives up to 8GB with CHS translation. For older..." My guess 2 ---------- If INT13 is called with AH=48H, (BIOS function: Extended Get Drive Parameters), the caller is able to "see" beyond 8 GB. The BIOS, though, must support "AH=48H". My guess 3 ---------- The cluster size, which is written in the boot sector by the formatting program at "format time", is also important to determine the actual addressing limit. If the cluster size was set to 8, an older BIOS could still address (8 GB * 8 * 512) = 32 GB of disk space. Comment ------- As far as my porting is concerned, I'm leaning to support the LBA addressing only, because the Windows APIs allow me to access hard disks and flash USB disks, by sector number. Enrico ------------------------------------------------------ Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
