How to allocate PCI bus address space?

From: Scott C. Karlin (scott@CS.Princeton.EDU)
Date: Tue May 30 2000 - 14:23:43 EST


My host system is a PC running Intel/Linux (2.2.x).

I am working with a Ramix PMC694 Intelligent Network Card.
It is a PMC (PCI Mezzanine Card) but we are using a simple
adapter to plug it into a traditional PCI slot. The card
has a Power PC (MPC8240) processor with two 10/100 Mbit/s
ethernet controllers (82559) behind a non-transparent
PCI-to-PCI bridge (21554).

The 21554 only responds to type-0 configuration cycles and
therefore hides the devices behind the bridge. By default,
the board only exposes a small address space (the scratch-pad
registers of the bridge). The boot code in ROM for the PPC
allows one to load application code into the board using
a simple handshake protocol through the scratch-pad registers.

As part of the downloaded application (and associated driver)
initialization process, I would like to "open up" the window
through the bridge to map some of the 32 Mbytes of RAM on this
board to the PCI bus.

This brings me to my question:
How can I "allocate" PCI memory space in Linux for this
new window? (And then "free" the space when the application
shuts down.)

One of the complicating factors is that the slot that the
PMC694 is plugged into may be behind a standard bridge.
I may need increase the window of the bridge for the bus that
the PMC694 is in. Note that I don't plan to let the Intel
host processor have direct access to the 82559 ethernet
controllers. That is, Linux doesn't need to know that
there is a bus behind the bridge--only that there is now
some memory back there.

Thanks for any suggestions,

Scott

--------------------------------------------------------------------------
Scott C. Karlin Princeton University
Graduate Student Department of Computer Science
Voice: (609) 258-5386 35 Olden Street
Email: scott@cs.princeton.edu Princeton, NJ 08544-2087
WWW: http://www.cs.princeton.edu/~scott
--------------------------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:25 EST