www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/18/17:01:43

Message-ID: <3E29CC98.DFE512DC@worldnet.att.net>
From: Paul Cousoulis <paulcsouls AT worldnet DOT att DOT net>
X-Mailer: Mozilla 4.78 [en] (Win95; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DMA and DJGPP
References: <3E298416 DOT 3A565C4C AT worldnet DOT att DOT net> <b0cg52$usa$1 AT nyytiset DOT pp DOT htv DOT fi>
Lines: 34
Date: Sat, 18 Jan 2003 21:55:33 GMT
NNTP-Posting-Host: 12.81.71.44
X-Complaints-To: abuse AT worldnet DOT att DOT net
X-Trace: bgtnsc05-news.ops.worldnet.att.net 1042926933 12.81.71.44 (Sat, 18 Jan 2003 21:55:33 GMT)
NNTP-Posting-Date: Sat, 18 Jan 2003 21:55:33 GMT
Organization: AT&T Worldnet
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Thanks Antti, that helps alot I'll go back through the PCI config data
and the PLX datasheet with this in mind.

Paul

Antti Koskipää wrote:
> 
> Paul Cousoulis wrote:
> > I'm building a data aquisition board that uses a PLX PCI chip to
> > communicate with the PCI bus. I need to set it up to use DMA to transfer
> > the data. I how to do I find the address and set up the memory in DJGPP
> > to get at the data?
> 
> PCI DMA is also called bus mastering. It's way different from the old
> ISA DMA, which is based on the 8237 chip, and a lot more complex. The
> 8237 cannot be used with the PCI bus. I don't know the details, but you
> should get your motherboard's northbridge manuals and look there. When a
> PC is booted up, the BIOS assigns the card some address near the end of
> the address space. DJGPP FAQ has more information on how to map this
> area for your program. If I remember correctly, the function was
> __dpmi_physical_address_mapping(). You can then access this area using
> movedata(), or simply using a pointer to it with the "Fat DS Hack" (read
> the FAQ). Bus mastering means that the card is given a command to feed
> its data straight to the main memory, bypassing CPU, so no movedata() or
> pointer usage is necessary. To find out the card's physical address,
> just use those PCI BIOS functions to access the PCI configuration space.
> Remember to zero out the lowest 4 bits from the address you get.
> 
> Hope this helps.
> 
> --
> - Antti
> 
> Address is munged.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019