Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to index page
Thread view  Board view
Japheth(R)

Homepage

Germany (South),
14.08.2007, 11:58
 

Accessing SATA devices in DOS (DOSX)

just in case someone is interested to access SATA devices in DOS, here is some info based on my experiences:

1. SATA - as the name implies - still uses the ATA port interface :)).

2. to get the ports for a SATA device if it's not using the legacy ports
(1F0-1F7, 170-177), the BIOS must support int 13h, ah=41h and return
EDD >= 3.0 (should always be true for SATA motherboards)

3. calling int 13h, ah=48h for the drive will return if it's a PCI ATA device
and if yes, return the PCI bus, device and function number, which are
needed to call the PCI BIOS function B10Ah.

4. calling int 1Ah, ax=B10Ah (read configuration dword) should now return
the ports. Config dwords 4+5 and 6+7 are the ports for ATA, config dword
8 will return the port of the DMA controller.

---
MS-DOS forever!

avoskov(R)

14.08.2007, 19:06

@ Japheth
 

Accessing SATA devices in DOS

> just in case someone is interested to access SATA devices in DOS, here is
> some info based on my experiences:
>
> 1. SATA - as the name implies - still uses the ATA port interface :)).

Does it mean that existing XDMA/new UDMA/old UDMA2_27 could be easily corrected for UDMA support for SATA HDD and provide UltraDMA not PIO mode?

Japheth(R)

Homepage

Germany (South),
14.08.2007, 22:18

@ avoskov
 

Accessing SATA devices in DOS

> Does it mean that existing XDMA/new UDMA/old UDMA2_27 could be easily
> corrected for UDMA support for SATA HDD and provide UltraDMA not PIO mode?

Yes. However, modern BIOSes supporting SATA usually also support ultra DMA, so an external driver is not necessary.

---
MS-DOS forever!

DOS386(R)

16.08.2007, 09:56

@ Japheth
 

Accessing SATA devices in DOS

> just in case someone is interested to access SATA devices in DOS, here is some info

Thanks.

> Yes. However, modern BIOSes supporting SATA usually also support ultra
> DMA, so an external driver is not necessary.

Confirming. Works well via INT $13. The weak point is the FreeDOS kernel not loving unreasonably huge HD's too much :-|

---
This is a LOGITECH mouse driver, but some software expect here
the following string:*** This is Copyright 1983 Microsoft ***

tom(R)

Homepage

Germany,
09.01.2008, 20:38

@ DOS386
 

Accessing SATA devices in DOS

> > Yes. However, modern BIOSes supporting SATA usually also support ultra
> > DMA, so an external driver is not necessary.
>
> Confirming. Works well via INT $13. The weak point is the FreeDOS kernel
> not loving unreasonably huge HD's too much :-|

Although this is an old thread, I just found it.

why do you think, that FreeDOS doesn't like huge drives ?
IMO it should support anything up to 2^32 sectors (2TB)

sol(R)

09.01.2008, 22:30

@ tom
 

Accessing SATA devices in DOS

> why do you think, that FreeDOS doesn't like huge drives ?
> IMO it should support anything up to 2^32 sectors (2TB)

I didn't know it didn't...but any screwup in making sure to use variables that are either unsigned 32-bit or larger could mess up support. So could any additions/multiplications/shifts/whatever that aren't careful to not overflow.

DOS386(R)

10.01.2008, 00:47

@ tom
 

Accessing SATA devices in DOS | FreeDOS and 2 TiB size

> IMO it should support anything up to 2^32 sectors (2TB)

should is good ... but was this tested carefully ?

> why do you think, that FreeDOS doesn't like huge drives ?

From my tests. On a 200 GiB (sorry, I don't posses the PC, it's far away now, and the tests date cca 1 year back).

IIRC:

C: FAT32 2 GiB BOOT.INI FreeDOS EDR-DOS
D: NTSC 120 GiB XP
E: FAT32 80 GiB "data" (as D: for DOS)

I could well boot both FreeDOS and EDR-DOS and use C: , "D:" with XP was invisible for DOS (both, correct), and FAT32 E:/D: wasn't accessible with FreeDOS (strange errors, failure to find sector / follow cluster chain ?), but worked well with EDR-DOS.

This might be related to minor bug with whining about "suspicious" partitions at startup - installed FreeDOS several times (1 or 2 HD's of cca 3 ... 16 GiB, several FAT 16 and FAT32 partitions) , and pretty always one partition was "bad" - but no further problems, read and write OK.

There is also the possible writing-huge-file-bug pending, sorry no new results about it.

Can anyone else test ? Laaca ? :hungry: What is the biggest HD verified to work ? The biggest partition size ? The highest partition start (was cca 120 GiB then, and this might be the crucial problem) ?

---
This is a LOGITECH mouse driver, but some software expect here
the following string:*** This is Copyright 1983 Microsoft ***

tom(R)

Homepage

Germany,
10.01.2008, 20:45

@ DOS386
 

Accessing SATA devices in DOS | FreeDOS and 2 TiB size

> > IMO it should support anything up to 2^32 sectors (2TB)
>
> should is good ... but was this tested carefully ?

there aren't that many 2 TB drives around, but it was tested on
my 2 TB RAID drive. And AFAIK there no problems reported so far

> I could well boot both FreeDOS and EDR-DOS and use C: , "D:" with XP was
> invisible for DOS (both, correct), and FAT32 E:/D: wasn't accessible with
> FreeDOS (strange errors, failure to find sector / follow cluster chain ?),
> but worked well with EDR-DOS.

FreeDOS is a bit picky before allowing access to >8GB
other then that, it should work up to 2 TB (if the BIOS supports >128 GB)

> This might be related to minor bug with whining about "suspicious"
> partitions at startup - installed FreeDOS several times (1 or 2 HD's of
> cca 3 ... 16 GiB, several FAT 16 and FAT32 partitions) , and pretty
> always one partition was "bad" - but no further problems, read and write
> OK.

Of course, it would be helpful, if you would report these warinings (that's what warnings are good for)

> There is also the possible writing-huge-file-bug pending, sorry no new
> results about it.

there are no 'possible' bugs.
there are either bugs, or there aren't.
How should we debug 'possible bugs' ?

> Can anyone else test ? Laaca ? :hungry: What is the biggest HD
> verified to work ? The biggest partition size ?

Drive Snapshot users have big disks, and at least partially these are FAT32.
So you can assume that upto ~500 GB is tested daily

> The highest partition
> start (was cca 120 GiB then, and this might be the crucial problem) ?

that's a BIOS problem; nothing that xxDOS could or should do about that limit.
Though it can make a difference if UDMA/UIDE is loaded or not.

Steve(R)

Homepage E-mail

US,
11.01.2008, 00:19

@ DOS386
 

Accessing SATA devices in DOS | FreeDOS and 2 TiB size

> D: NTSC 120 GiB XP

I still don't understand how you get a video drive.
http://www.webopedia.com/TERM/N/NTSC.html

Back to index page
Thread view  Board view
15112 Postings in 1359 Threads, 247 registered users, 16 users online (0 registered, 16 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum