Re: PCI DMA Address
From: Måns Rullgård (mru_at_kth.se)
Date: 04/29/04
- Next message: Kris: "Need help chasing a weird problem"
- Previous message: Pete Zaitcev (OTID1): "Re: USB headache..."
- In reply to: Pete Zaitcev (OTID1): "Re: PCI DMA Address"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 29 Apr 2004 22:35:51 +0200
"Pete Zaitcev (OTID1)" <ot16a6ca05878e44c0@comcast.net> writes:
> On Wed, 28 Apr 2004 23:39:25 -0700, ina wrote:
>
>> 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.
>
> This is a misconception. Since you use mem= tricks, you are up to
> your armpits in API illegalities, so there will be no harm if you
> just use 0x6400000. There is no API which would help you to do
> what you are trying to do.
You will still need to take into account any differences in the
(physical) memory mapping as seen from the CPU vs. the PCI bus. On
regular PC hardware this is the same, but on many (64-bit) machines
this is not necessarily the case.
-- Måns Rullgård mru@kth.se
- Next message: Kris: "Need help chasing a weird problem"
- Previous message: Pete Zaitcev (OTID1): "Re: USB headache..."
- In reply to: Pete Zaitcev (OTID1): "Re: PCI DMA Address"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|