PCI DMA Address

From: ina (celina.miranda_at_eazix.com)
Date: 04/29/04


Date: 28 Apr 2004 23:39:25 -0700

Hi,

I need to create a driver for a PCI camera device that uses DMA to
transfer the captured images. The system that i use is an x86 board
that has 128M of RAM, I reserved the top of the physical RAM during
bootup by passing "mem=100".

In my driver i claimed the reserved memory by using ioremap call:
void* pAdd = ioremap(0x6400000,(1280x1024))

This is the memory where the PCI device should DMA the captured data.
My question is how do I tell the PCI device the DMA address? I know
that inorder for the PCI device to access the DMA address correctly, i
have to convert the return value of ioremap into a bus address. How do
i do this? I already used:
virt_to_phys(pAdd)
but this doesn't seem to work.

I read somewhere that the output of ioremap cannot be directly used
for virt_to_phys function call, but I'm not really sure...

Thanks,
Ina



Relevant Pages

  • dma timeout
    ... my *old hdd* got up with dma mode. ... PIIX4: IDE controller at PCI slot 00:04.1 ... ide0 at 0x1f0-0x1f7,0x3f6 on irq 14 ... hda: attached ide-disk driver. ...
    (Debian-User)
  • [PATCH RFC v5] net: add PCINet driver
    ... PCI bus as its transport mechanism. ... RFC v4 -> RFC v5: ... use seperate DMA channels for RX and TX ... Thanks to all of those who have posted comments about the driver. ...
    (Linux-Kernel)
  • Re: [Alacrityvm-devel] [PATCH v3 3/6] vbus: add a "vbus-proxy" bus model for vbus_driver obj
    ... I'm pretty sure that vhost is completely useless for my situation. ... I've got a system where I have about 20 computers connected via PCI. ... I wrote a custom driver which imitated a network interface and a serial ... Can guests do DMA to random host memory? ...
    (Linux-Kernel)
  • [PATCH 19-rc2] Fix misc Kconfig typos
    ... limits the system to just 64MB of PCI memory. ... config MACH_LPD7A400 ... If you do not enable DMA, an interrupt for each character will be ... This driver toggles the front-panel LED on sun4m systems ...
    (Linux-Kernel)
  • Re: PCI DMA Address
    ... > I need to create a driver for a PCI camera device that uses DMA to ... > transfer the captured images. ... > This is the memory where the PCI device should DMA the captured data. ...
    (comp.os.linux.development.system)