From: Thomas Demmer Newsgroups: comp.os.msdos.djgpp Subject: Re: DMA transfer Date: Tue, 04 Nov 1997 12:43:28 +0100 Organization: Lehrstuhl fuer Stroemungsmechanik Lines: 35 Message-ID: <345F0A60.FE25AED@LSTM.Ruhr-UNI-Bochum.De> References: <199711040117 DOT KAA11803 AT asd DOT tnes DOT nec DOT co DOT jp> NNTP-Posting-Host: c64.lstm.ruhr-uni-bochum.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit CC: satoh AT asd DOT tnes DOT nec DOT co DOT jp To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk satoh AT asd DOT tnes DOT nec DOT co DOT jp wrote: > > Hello all, > > I'm writing a NIC board driver using gcc compiler (DJGPP V2). > I allocate memory on PC's memory using malloc() function and > I have to set the physical address to register of the board. > ( This board performs PCI bus master device.) > But malloc() function returns virtual memory address, and I > have no idea to translate malloc'ed virtual memory address into > physical address. > > Does anyone know how to allocate DMAable large memory on PC > and translate the virtual memory address into physiacal address. On ftp://x2ftp.oulu.fi/pub/msdos/programming/djgpp2/ I saw something about doing DMA with a soundblaster, IIRC it was in gccfaq10.zip, but I might be wrong. It explained the methods quite good and had an example of programming a soundblaster. -- Ciao Tom ************************************************************* * Thomas Demmer * * Lehrstuhl fuer Stroemungsmechanik * * Ruhr-Uni-Bochum * * Universitaetsstr. 150 * * D-44780 Bochum * * Tel: +49 234 700 6434 * * Fax: +49 234 709 4162 * * http://www.lstm.ruhr-uni-bochum.de/~demmer * *************************************************************