Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!usc!howland.reston.ans.net!sol.ctr.columbia.edu!hamblin.math.byu.edu!news.byu.edu!cwis.isu.edu!u.cc.utah.edu!cs.weber.edu!terry From: terry@cs.weber.edu (A Wizard of Earth C) Newsgroups: comp.os.386bsd.development Subject: Re: [FreeBSD 1.0R] DMA Problems? Date: 1 Dec 1993 21:26:10 GMT Organization: Weber State University, Ogden, UT Lines: 35 Message-ID: <2dj25i$1ga@u.cc.utah.edu> References: <CHCErs.G5w@genesis.nred.ma.us> NNTP-Posting-Host: cs.weber.edu In article <CHCErs.G5w@genesis.nred.ma.us> steve2@genesis.nred.ma.us (Steve Gerakines) writes: [ ... DMA problems with FDC ... ] >I guess my first question is, in general what causes over/underrun errors >in the first place? The device is not busy doing anything BUT the >transfer itself. My next question would be, since the CPU is not >involved while the transfer is running, how could it affect the transfer >anyway? It is probably your cache. Unless you set the "noncacheable" bit on the pages used to do the DMA, or explicitly BINVD (inferior, because it leaves a window open for error), device initiated DMA has the potential to update memory without updating cache (on reads) or write data that is valid in cache but not in memory (unless your cache is write through) on writes. Also note that device initiated DMA must take place in the low 16M (or use a buffer there that gets copied out of, called a "bounce buffer") to avoid the limitatations on device memory addressing if you are using an ISA bus machine. Since DOS doesn't use device initiated DMA, and rarely uses ofver 16M directly anyway, you wouldn't see the problem with DOS. To test: 1) Do you have less than 16M? 2) Disable your external, then internal cache, and repeat the tests. Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.