OSDev.org
https://forum.osdev.org/

DMA / UDMA where to start?
https://forum.osdev.org/viewtopic.php?f=1&t=11540
Page 1 of 1

Author:  Pyr0Mathic [ Thu Apr 13, 2006 3:28 am ]
Post subject:  DMA / UDMA where to start?

Hi all,

i am currently working on improving the speed of my operating system. Currently it is simply to slow.

Small background on what i am doing:
-Ftp server for P3 500, whit at least 64MB ram.
-2x, 200 gig, or so, hdd
-4x Realtek 8139, 100MBit, so total of 40MB\s ( dont know if that is possible, but whitout udma it sertainly isnt)

But thusfar i did all my R/W from hdd whit direct IO commands so PIO mode. but this seems to me to be very slow.

So i want to support ATA 33/66/100/133 etc all those modes, or at least a couple of them, but where do i start. And also if i would need to write direct to Pci device's directly. is there a basic set of instructions which is supported by all the hardware, or is it bounded to a chipset, manufacturer. So would i be required to build several drivers for several chip-sets out there.

So basicly the question is where do i start, and how can i make it as universal as possible. Cause the only thing i really need to do is Read or Write a sector to or from the Hdd...

Regards.
PyroMathic

Author:  Solar [ Thu Apr 13, 2006 4:44 am ]
Post subject:  Re:DMA / UDMA where to start?

FAQ: DMA

Author:  Kemp [ Thu Apr 13, 2006 7:44 am ]
Post subject:  Re:DMA / UDMA where to start?

I'd hate to see the lag you'd get running transfers out of all those cards at the same time. Under XP my system gets laggy when my transfers reach around the 1MB/s (8Mb/s) mark, though I think that's more related to my hard drives (been having performance issues there :( )

Author:  Pyr0Mathic [ Thu Apr 13, 2006 7:48 am ]
Post subject:  Re:DMA / UDMA where to start?

Lo, thx for the link.

Have read it, but isnt dma to slow to reach speeds of atleast 66 MB\s. or is the Dma chip simple going at the speed of the bus, at max? dont i need udma to reach those speeds?


Quote:
Under XP my system gets laggy when my transfers reach around the 1MB/s (8Mb/s)


on what pc are u running that? and also what is your cpu load when u are using your ftp server?


Regards.
PyroMathic

Author:  nick8325 [ Thu Apr 13, 2006 9:21 am ]
Post subject:  Re:DMA / UDMA where to start?

Yes, the DMA controller from the link is an ancient ISA thing from the dawn of time...

PCI devices, AFAIK, ignore it completely and have their own DMA controllers built in. So to get DMA working for some PCI device I think you need to read the documentation for the device, which should say how to program the DMA.

I don't know very much about ATA, but I think the transfer modes and commands are standard, but there's no standard to tell the DMA chip where to transfer the data---that depends on the chipset, I think.

P.S. I could be completely wrong :)

Author:  Kemp [ Thu Apr 13, 2006 9:33 am ]
Post subject:  Re:DMA / UDMA where to start?

2GHz/512MB RAM. That wasn't an FTP app I was talking about though, it was using DC++. While the app could be to blame, I think it's my hard drives. One is running in PIO mode (presumably because it's on the same channel as my DVD drive, though I'm not sure), but while Windows says the other two are running in one of the UDMA modes they appear to perform as if they were running in PIO mode (quite slow, crazy CPU load doing large transfers to or from disk or from one disk to the other).

In other words, my problem probably has nothing to do with what you're talking about, sorry ;D

Author:  paulbarker [ Thu Apr 13, 2006 10:17 am ]
Post subject:  Re:DMA / UDMA where to start?

This is completely off topic, so feel free to ignore it.

@Kemp, same problem here. There are 2 types of ATA cable, 40 conductor (aka 40 wire) and 80 conductor (aka 80 wire). 80 wire cables are for HDDs, the 40 wire ones are for CDROMs, DVDs and other ATAPI devices. Check you have them the right way round and everything. If you havent got an 80 wire cable, get one. A 40 wire cable is usually the limiting factor when UDMA seems slow.

This was my problem and my solution, YMMV as always :)

Author:  Pype.Clicker [ Fri Apr 14, 2006 9:06 am ]
Post subject:  Re:DMA / UDMA where to start?

i can offer this page of the wiklicker where i'm collecting info about UDMA programming.

HTH.

Author:  Pyr0Mathic [ Fri Apr 14, 2006 1:13 pm ]
Post subject:  Re:DMA / UDMA where to start?

Hi, ty for the link. it seems to be very usefull.

Also found the manuel for my chipset... the intel chipset - 82371EB, the manual also covers pieces about udma, the only thing is that my shipset only supports udma 33.

Regards.
PyroMathic

Author:  Pype.Clicker [ Fri Apr 14, 2006 1:58 pm ]
Post subject:  Re:DMA / UDMA where to start?

afaik, as far as programming is concerned, there's no difference between UDMA 33, UDMA 66 or UDMA 999 (yet to be announced :P) ... the only difference is the "selected UDMA mode" in the drive settings, which is usually set to the highest compatible value.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/