DMA in IXP2400 processor

From: gopan (gop_kumar_at_hotmail.com)
Date: 10/20/04


Date: 20 Oct 2004 09:31:31 -0700

Hi all,
         I am working on a board which has an IXP2400 processor
onboard and i want some help regarding the DMA. I am writing the
diagnostic s/w for the board and the requirement is to perform the DMA
diagnostics by writing a fixed pattern in a range of DRAM starting
from address say '0x1000', transfer it to another location in the DRAM
say '0x2000' and verify that the pattern gets transferred.

Now, those familiar with IXP2400 will know that there is a PCI
controller in the processor itself and the CSR registers, SRAM and
DRAM can be mapped to different addresses using the BAR registers. The
PCI unit has a DMA controller but it can perform DMA between DRAM to
PCI or PCI to DRAM only. ie it has
a) a DRAM address register where we need to give the DRAM address
b) a PCI address register which should be given the PCI device's mem
address
c) a byte count register, for number of bytes to transfer
      and a bit to set the direction of DMA (PCI to DRAM or DRAM to
PCI)

So, to perform a DRAM to DRAM DMA transfer, is it sufficient that i
give in the PCI address register a value which falls in the DRAM
range? ie if the BAR register corresponding to DRAM holds a value say
0x40000000, for any PCI device to
access address 0x2000 in DRAM, it should actually address 0x40002000
(this is my understanding, hope I am correct !), hence if i want to
perform a DMA from DRAM location 0x1000 to 0x2000, is it enough that i
give

 a) DRAM address register = 0x1000
 b) PCI address register = 0x40002000
         and set the DMA direction as DRAM to PCI

          will this result in the DMA controller, read from the DRAM
address 0x1000 and write to PCI address 0x40002000 and as this PCI
address is within the
range of DRAM, the data gets written to DRAM address 0x2000?

If this is not the method then please suggest me the alternatives

thanks,
gop



Relevant Pages

  • DMA and PCI in SoPC Builder
    ... I have some problems using SoPC builder with DMA and PCI (Altera ... PCI compiler 4.1.0). ... BAR1 32kBytes, nonprefetchable - control io ... The DMA has 20bit length register. ...
    (comp.arch.fpga)
  • Re: Flushing writes to PCI devices
    ... MMIO writes to PCI devices by reading from the ... hardware for a DMA transfer. ... that has the register with the start bit lower in the register address ... People who make PCI interface chips like PLX would never make ...
    (Linux-Kernel)
  • Re: Flushing writes to PCI devices
    ... On Wed, 20 Sep 2006, Alan Stern wrote: ... MMIO writes to PCI devices by reading from the ... hardware for a DMA transfer. ... that has the register with the start bit lower in the register address ...
    (Linux-Kernel)
  • Re: DMA in IXP2400 processor
    ... > So, to perform a DRAM to DRAM DMA transfer, is it sufficient that i ... > give in the PCI address register a value which falls in the DRAM ...
    (comp.os.linux.development.system)
  • Re: Oscillator and Corruption of Registers
    ... then that processor may suffer corruption of its registers. ... the register contents are stored in very small ... very small capacitors like DRAM in a Processor? ...
    (comp.arch.embedded)