[ixp1200] [WORKING] booting over PCI (ENP boards) from a 2.6 kernel installation

Willem de Bruijn wdebruij at dds.nl
Thu Jun 10 08:48:33 EDT 2004


Hi,

  this is just a short message for people running Linux on an IXP board that 
connects to the host over PCI. As you probably know, most support 
applications are currently restricted to linux 2.4 kernels. For one of our 
projects I'm in the process of writing an alternate PciDg driver that will 
also work with newer (2.6) kernels. At the moment we are able to 

(1) map both ENP and EB memory over PCI to kernel- and userspace on the host.
(2) boot the ENP boards over PCI using Radisys' or Intel's bvloadapp utility 
while relying on our own GPLed mmapping module instead of PciDg.

Note that pseudo-ethernet is not working yet. However, if you simply want to 
get the board up and running that's not an issue. Please let me know if 
you're interested in an updated pseudo-ethernet driver, I may consider 
investing time in it then.

If you want to try out the module, do the following: get the latest ffpf 
distribution from anonymous CVS via ffpf.sourceforge.net (I'll update the 
regular distribution download shortly):

cvs -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/ffpf login 
cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/ffpf co 
ffpf/src/v1.2
 
and then build the kernelspace modules in [dir]/kernelspace, using
1) for 2.5.70+ and 2.6 (kbuild) infrastructure)
ln -s Makefile.kernel.kbuild Makefile
make -C [directory of your linux src, e.g. /usr/src/linux] SUBDIRS=${PWD} 
modules

2) for 2.4 and lower
make -f Makefile.kernel.nokbuild

this should give you a module called genpci.ko.
inserting this module with the proper parameters will ioremap all memory on an 
arbitrary PCI device to the host's kernel and export it to userspace via a 
file in /dev through both read/write/llseek and mmap mechanisms.

If the module is inserted without any options it will try to create the 
file /dev/genpci with all memory on an ENP board mapped. Since the SDRAM is 
in the 4th onboard memory region you'll have to add the length of the 
previous three memory reigons to the offsets used in bvloadapp.c to get 
bvloadapp running:

#define LINUX_LOAD_ADDRESS 0x04008000 + 256 + 4096 + (1024*1024)
#define RAMDISK_LOAD_ADDRESS 0x04800000 + 256 + 4096 + (1024*1024)

also, bvloadapp asks for /dev/bv, so you should insmod genpci.ko using the 
following command:

insmod genpci.ko name=/dev/bv

or change the filename in bvloadapp.c.

To get an EB booted, add the option device=0x1200 to the insmod parameter list 
and move the offsets around a bit. Unfortunately, my EB board kept resetting 
itself when put in a PCI slot, so I couldn't get it to work (I posted a 
question about this before).

I hope that this can be of use to some of you.

regards,

  Willem

-- 
Willem de Bruijn
wdebruij_at_dds.nl
http://www.wdebruij.dds.nl/

current project : 
Fairly Fast Packet Filter (FFPF)
http://ffpf.sourceforge.net/

-- 
Dit bericht is gescand op virussen en andere gevaarlijke inhoud door ULCN MailScanner en het bericht lijkt schoon te zijn.
This message has been scanned for viruses and dangerous content by ULCN MailScanner, and is believed to be clean.



More information about the ixp1200 mailing list