Create permanent mapping from PCI bus to region of physical memory

Howard, Marc Marc.Howard at
Tue Apr 11 12:56:10 EST 2006

Howard, Marc wrote:
>> Hi,
>> I'm working on a PPC440GX based board in which a PCI based peripheral
>> communicates with the host via a shared region of processor memory.  The
>> peripheral will read and write this region autonomously.  Because of
>> this I need a fixed mapping FROM the PCI bus TO system memory.
>> It's easy enough to rope off the top 16 MB or so of system physical
>> memory by lying to linux in the boot arguments.  What I can't seem find
>> is a system call to use to create a fixed, permanent mapping of PPC
>> memory as seen from the PCI bus.
>> Has anyone out there done this and could share a code snippet with me?

>Hi Marc,

>So the PPC440GX is the host, but what is the peripheral, and
>what restricts it to require a fixed address? Can it handle
>a set of fixed addresses, eg. a scatter-gather buffer setup
>by the host? Can the host and peripheral communicate in any
>other way, eg. when the peripheral changes something in the
>shared memory, surely it has to interrupt the host to let it

>Does the peripheral contain a CPU, if thats the case, then
>the host and peripheral could also maintain a smaller region
>that contains addresses of other pages, i.e., no need to
>restrict the design to a single block of memory, you just
>need a page of pointers to other shared blocks of pages.


The periperal is an FPGA.  No, there is no internal processor;
everything is coded in Verilog.

Scatter/gather isn't a viable option because of this.  Additionally
non-contiguous memory would reduce bandwidth and increase
FPGA design complexity.  The data must be contignuous because
of these reasons and the need for the data to be randomly
accessible from the outside using simple address arithmetic.

I realize this isn't a standard linux request but having
fixed, linear memory is quite common in embedded apps.  There
should be a way to create this mapping in the 440GX's hardware
and I'm just looking for a system call (if there is one) to
implement it.



-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Linuxppc-embedded mailing list