project summary
back to sourceforge

ixp425sar: An ATM device driver for the IXP425

    (a brain dump)


Alex Zeffertt: ajz at


UPDATE:: Patches for CSR 1.3 Click here
UPDATE:: How to build big endian xscale toolchain Click here


The ixp425sar is a linux ATM device driver for the IXP425 processor.  The IXP425 is a network processor from Intel which contains an XScale core and 3 Network Processor Engines (NPEs), namely NPE-A, NPE-B, and NPE-C.  These NPEs are general purpose processors - which run Intel proprietry microcode, downloaded by the core.  Intel provide microcode for NPE-A which performs an ATM SAR function.  They also provide code that runs on the XScale core which creates an API for ATM applications.  This API is called CSR.

The CSR is not a userland API, it is a kernel mode API.  Furthermore it does not marry with the ATM DD specification.  Therefore, what is needed in order to leverage the linux-atm networking stack, is a thin layer which translates between Intel's CSR API and the linux-atm device driver API.  The aim of this project is to create such a layer.

Project Status:

The driver is currently working for us.  If you wish to participate in this project, please contact me.

Tested platforms:

We have successfully used the driver on the Richfield (IXDP425) platform using RedBoot 2.0, and linux-2.4.19-rmk7-ds2.  We threw away the ADSL expansion card that came with this platform and replaced it with an OC3 expansion card (our own design) which uses the S/UNI Ultra phy.  You will need to read the Configuration section (below) if you wish to use a different platform.

Build instructions:

    Buy an IXDP425 platform from Intel

    Download the driver:

                    [you@yours]$ export
                    [you@yours]$ export CVS_RSH=ssh
                    [you@yours]$ cvs co ixp425sar

    Get the following source code:

      Create source tree:

    Customize driver (do not skip this step):

        Microcode image fixup:

There is a bug in the NPE-A microcode in CSR 1.2.1.  The problem is that during reception, the microcode cannot offload the ATM PHY at above 50 Mbit/s.  The result is that if you hit the PHY hard with rx traffic, you get rx overflows in the PHY, which will start dropping cells.  This leads to CRC errors on received AAL5 frames.

If the above is not a problem, undefine OVERRIDE_UCODE_IMAGE in ixp425sar.c.  Otherwise read on.

This bug does not occur with the microcode images from CSR 1.01.  The work around, therefore, is to replace the NPE-A microcode images from CSR 1.2.1 with those from CSR 1.0.1.  I would like to just give you these images, but Intel wrote them so I cannot release them in a GPL'd package.  Instead I shall explain how to create the images for yourselves.

  1. Copy build/ixp425_xscale_sw/src/include/IxNpeMicrocode.h to build/ixp425_xscale_sw/src/codelets/ixp425sar_ucode.
  2. Remove the #ifdef IX_NPE_MICROCODE_FIRMWARE_INCLUDED and its corresponding #endif
  3. Replace the NPE-A DOWNLOAD MAPs with those from the version of IxNpeMicrocode.h that came with CSR 1.01.  (I.e. replace the download maps for Version IDs 00010000, 00020000, 00030000 and 00040000 - the other download maps are for NPE-B and NPE-C and should be left alone)
  4. Update the fields marked /* size of version */ in the MICROCODE IMAGE HEADER
  5. Use the code in build/ixp425_xscale_sw/src/codelets/auto-offset.c to recalculate the MICROCODE IMAGE HEADER.

 Note: this fix means that you cannot use AAL0.  This is because the CSR 1.0.1 microcode does not support AAL0.

        PHY selection:

My board uses a S/UNI ATM phy.  Yours almost certainly doesn't.  Even if it did, it would probably be memory mapped to a different address than ours.  So comment out the line

        #define USE_SUNI_PHY

This removes the dependency on build/linux/drivers/atm/suni.o

You may wish to implement your own phy driver - although this is not neccessary.  But you should certainly change TX_PORT_RATE_BPS and RX_PORT_RATE_BPS to reflect your phy's line rate.

Fast Path:

You can enable fast path by defining IX_ETH_ACC_FPATH_AWARE in build/ixp425_xscale_sw/src/include/IxEthAccFpathDep.h.  You probably want to disable it for the time being because it doesn't work.

The problem is that the Modifier in NPE-B is failing to strip the first 10 bytes which contain the LLC/SNAP header.

For the record - and in case anybody wants to try to get this to work - here's how to use fast path if enabled in the driver:

Open an AAL5 socket for rx only, but before you call bind set USE_FPATH_FLAG in qos.rxtp.spare.  After the socket is opened  RFC1483 frames received on that VC will be forwarded to NPE-B for transmission.

Like I said, at the moment this doesn't work.  The Classifier in NPE-A forwards frames to NPE-B alright but the Modifier in NPE-B doesn't strip the bumf from the front of the frames before sending them out.


If your expansion board uses UTOPIA 1 then undefine IX_NPE_MPHY in build/ixp425_xscale_sw/src/include/IxNpeA.h.  If it uses UTOPIA 2 then leave this defined.  This will affect which NPE-A image gets loaded by the ATM DD.  Note, however, that the ATM DD does not currently support multiple phy's even though CSR does.

    Build kernel and driver:

(Note you may need to edit build/linux/Makefile and build/ixp425_xscale_sw/Makefile to point it at a different cross-compiler)

[you@yours]$ cd linux
[you@yours]$ make ixdp425_config
[you@yours]$ make oldconfig
[you@yours]$ ### These variables are needed by the CSR Makefiles
[you@yours]$ TOP=`pwd`
[you@yours]$ LINUX_SRC=${TOP}/linux
[you@yours]$ HARDHAT_BASE=/usr/local
[you@yours]$ PATH=${HARDHAT_BASE}/bin:${PATH}
[you@yours]$ IX_XSCALE_SW=${TOP}/ixp425_xscale_sw
[you@yours]$ TOOLENV=linux
[you@yours]$ make dep zImage modules

The ATM driver will be created in build/ixp425_xscale_sw/lib/linuxobjs/csr_codelets_ixp425sar.o.  This module depends on build/ixp425_xscale_sw/lib/linuxobjs/csr.o.  These modules should get copied to build/linux/drivers/csr/ - so if you then want to do a "make modules_install" the install tree should include these files and the modules.dep file will include dependencies for them.


    insmod csr.o
    insmod csr_codelets_ixp425sar.o
    insmod ixp425_eth.o no_csr_init=1  # csr is already initialised by ATM driver!


On my IXDP425 platform I have acheived 100 mbit/s bridging 512 byte frames from an RFC2684 encapsulated PVC on NPE-A to Ethernet on NPE-B.  I have also acheived 100 mbit/s bridging in the opposite direction.  I have not tested bidirectional throughput.

Undirectional throughput at 64 byte frames is around 20 mbit/s.


Thanks to:

    Russell king - Maintainer of ARM support for linux
    Deepak Saxena - Maintainer of IXP425 support for linux.
    The developers at for providing a starting point.