Mail Archives: djgpp/2003/01/18/17:01:43
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 -