For what it is worth, my "take" on 4K-byte (or other-than-512
byte) sectors for DOS systems is very-much the same as Eric's
and I shall "reply" to some comments from one of his posts --

> Also depending on your BIOS, you could have a limit of at
> most 2^28, 2^32 or 2^48 sectors per disk ...

Not a problem for a "driver", as drivers usually assume the
programs doing I-O will not try to access PAST the end of a
disk!   The disk directory controls how much data shall get
read/written, and the disk driver "takes its orders" from a
DOS system.

Absolute disk size is only a problem when specific HARDWARE
commands are needed with different sizes.   In the SATA/IDE
world, there is only 28-bit or 48-bit LBA addressing, and a
48-bit drive can accept 28-bit commands.   Thus, in my UIDE
driver, I issue 28-bit commands for up to 28-bit addresses,
while I issue 48-bitters for larger addresses.   Runs fine!

> ... There also is a DOS UIDE cache-and-driver.  For example
> LBACACHE is one of the tools which assumes 512 bytes/sector
> and uses only the first 2^32 sectors which is 2 TB for 512
> bytes/sector.

As noted above, UIDE (also UIDE2 and UIDEJR) handles 48-bit
"LBA" addressing, if any DOS system were ever to give it an
Int 13h AH=42h/43h "LBA" block with addresses so large.   I
depend on the DOS system to determine if this is necessary,
as UIDE does physical I-O only, not "logical" directory I-O
where the 32-bit directory limit is of concern.    Only the
48-bit "LBA" address limit matters to me and my drivers.

> By the way - a DRIVER could interface with any disk with
> any sector size and then just provide an int13 or int25/26
> interface with 512 byte "sector" size for data transfer to
> DOS. For transfers which do not access (aligned) blocks of
> 4 kB size, performance will be worse than native, and you
> cannot boot from such a disk, but at least this would WORK
> and you could even have a driver as part of the boot chain
> before DOS is loaded, just as Ontrack / Ezdrive MBR-loaded
> drivers which added LBA support to PCs without a LBA BIOS,
> decades ago. Making the KERNEL sector size of DOS 4 kB has
> the side effect of BUFFERS also being 4 kB each - wasting
> 3.5 kB in each buffer when you access a 512 byte / sector
> disk with such a kernel.

I agree with much of the above.   Changing DOS, and all user
apps, for any "new" sector size at THIS late date would be a
"Cast-Iron BITCH", in my opinion!   [U.S. expression for BAD
wives/girlfriends, who are usually made of "softer" items!].

For the moment, UIDE supports only 512-byte sectors, same as
LBACACHE and almost every other DOS hard-disk driver.   But,
if "new" 4K-byte sector schemes provide a RELIABLE means for
a drive to tell its driver what sector size is in use, I can
change UIDE to detect that size!   Not-much help for booting
or with "independent" programs like FDISK, etc.    But, Eric
is correct:  Changing only the DOS disk driver to accomodate
large sector sizes, then letting the driver "interface" with
the existing DOS system at 512 bytes/sector, would be a HUGE
"simplification" of this entire issue!


------------------------------------------------------------------------------
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to