mpc860sar Project Page CVS web interface SourceForge Logo

MPC86x ESAR Linux ATM Driver

UNDERSTANDING THE ATM DRIVER

Version 0.2

Rodolfo Giometti (giometti at linux dot it) Feb 3tr 2004

Version 0.1

Alex Zeffertt Nov 9th 2001 (ajz at sourceforge dot net)


CONTENTS

INTRODUCTION

This document gives an overview of how the MPC850/MPC860/MPC862 (E)SAR ATM driver works. It also describes how to build and run

PRE-REQUISITES

You will need:

CONTEXT

The driver has been tested on the MPC862ESAR and on MPC850SAR, but was written to support any MPC8xx which contains an (E)SAR (Segmentation and Reassembly or its Enhanced version) engine.

The driver has only been tested with v2.4.4 and v2.4.17 linux kernels.

The driver can be built as either a resident driver or a loadable module.

Since release 2.3 the driver also supports Multi-PHY but only for CPUs with SAR engine (the tests was made with a MPC850SAR with two PHYs). I beleave it's not too much work adding the MultiPHY support for ESAR.

The driver conforms to the "Linux ATM device driver interface Draft, version 0.1" (Werner Almesberger).

I have also ported the ATM tools (atm-0.79) to the PPC.

OTHER DOCUMENTS

Please consult:

BUILDING

This section describes how to build the new kernel, PPCBoot, and the ATM applications.

Install devkit

Before you can build the kernel you will need a compiler for the 8xx

> # Install Montavista CDK 2.0 development kit (contains cross
> # compiler)

> # IF you already have a previous version of the CDK (e.g. v1.2)
> # THEN you will need to uninstall this first
> rpm -qa | grep hhl  # finds out which hardhat RPMs are already installed
> rpm -e hhl-xxx      # repeat for each rpm listed previously
>                     # sometimes you need to do this twice
         ....
> rpm -qa | grep hh   # confirm all deleted


> # install v2.0 of CDK
> mount /mnt/cdrom
> cd /mnt/cdrom/bin
> 
> ./hhl-host-install

 ... enter "?" to display LSP names ...
 ... select appropriate compiler ...

Build kernel (incl. ATM driver)

Build the new kernel which includes ATM driver.

> cd your-existing-linux-ppc-kernel/ # I've only tested this on v2.4.4 kernels

Extract the atm driver

> cd arch/ppc/
> tar -xzf path-to-file/atm-xxxx-xx-xx.tgz # replace with actual name of file
You should now see the driver in arch/ppc/atm/. You will need to make some modifications to some other files before attempting to compile.

1. In linux/Makefile:
    Change "CROSS_COMPILE" to "ppc_8xx-" (i.e. the tools installed with CDK 2.0).


2. In linux/arch/ppc/Makefile:
    Add in the lines marked "+"

      ifdef CONFIG_8xx
      SUBDIRS += arch/ppc/8xx_io
      DRIVERS += arch/ppc/8xx_io/8xx_io.o
    + SUBDIRS += arch/ppc/atm
    + DRIVERS += arch/ppc/atm/atm.o
      endif


3. In linux/arch/ppc/config.in:
    Add in the lines marked "+"

      source arch/ppc/8xx_io/Config.in    
    + if [ "$CONFIG_ATM" = "y" ]; then
    + source arch/ppc/atm/Config.in
    + fi

 
4. In linux/arch/ppc/kernel/ppc_ksyms.c:
    Add in the line marked "+"

      #ifdef  CONFIG_8xx
    + EXPORT_SYMBOL(va_to_pte);


5. Copy the text in linux/arch/ppc/atm/Configure.help.frag to linux/Documentation/Configure.help
   just before the comment lines at the end.


6. If, you are using MII then you will need to make sure it uses port A and 
   not port D.  To do this you may need to modify the way the following register 
   fields are set up in linux/arch/ppc/8xx_io/fec.c to ensure that the MII 
   still works after you've added the ATM driver.

    PDPAR[UT]
    ECNTRL[FEC_PINMUX]  
    UTMODE[SPLIT]

    See table 41-6 OF MPC862UM.PDF.

Now configure your kernel (change options - if neccessary - to appear as below).

> make config

*
* MPC8xxSAR ATM CPM Options
*
MPC86x/MPC855T(Rev E)/MPC850 (ATM) support (CONFIG_8XX_ATM) [N/y/m/?]
MPC8xx mode (SAR, ESAR) [ESAR]
*
* UTOPIA port config
*
UTOPIA ATM support (CONFIG_UTOPIA) [N/y/?]
UTOPIA PHY (SUNI_ULTRA, IDT77V106, Other_PHY) [SUNI_ULTRA]
*
* UTOPIA minimum channel rates for the utopia device
*
UTOPIA minimum channel rate (32Kbs, 1Mbs) [1Mbs]
*
* UTOPIA MPHYs settings
*
*
* Serial port config
*
Serial ATM support (CONFIG_SERIAL_ATM) [Y/n/?] 
SCC used (1-3) (CONFIG_SERIAL_ATM_SCC) [1] 
Use SI in TSA mode (CONFIG_SERIAL_ATM_TSA) [M/n/?] 
Which TDM to map to SCC using TSA (TDMa, TDMb) [TDMa] 
  defined CONFIG_SERIAL_ATM_TDMA
Use SI in NMSI mode (CONFIG_SERIAL_ATM_NMSI) [M/n/?] 
CLK to use for RCLK and TCLK (1-4 for SCC1/2, 5-8 for SCC3/4) (CONFIG_SERIAL_ATM_NMSI_CLKPIN) [1] 
*
* ATM switching
*
Port to Port Switching (CONFIG_PTP_SWITCHING) [Y/n/?] 

Build the makefile dependencies (used by make)
> make depend

Build the image used by PPCBoot
NOTE If this complains that it can't find "mkimage" then you will need to Build and install PPCBoot 
(see below) and then try again.
> make pImage

If you selected M for "MPC86x/MPC855T(Rev E) ESAR (ATM) support", then you will now need to 
build the modules.

> make modules

The ATM module is built in 

linux/arch/ppc/atm/atm-8xx.o.

If CONFIG_UTOPIA was selected then you may have built one or more of the following PHY modules:

linux/arch/ppc/atm/suni.o
linux/arch/ppc/atm/idt77106.o
linux/arch/ppc/atm/generic_phy.o

As you can see above for "UTOPIA minimum channel rate" you can choose between "32Kbs" and "1Mbs" (Rodolfo added this selection for its MPC850SAR but you should carefully set this parameter to fit your needs).

If you choose ESAR support you will __not__ be prompted for the Utopia MPHY support (see the above example) since this is currently implemented only for SAR support.

If CONFIG_SERIAL_ATM was selected then you may have built one or more of the following serial PHY modules:


linux/arch/ppc/atm/tsa.o
linux/arch/ppc/atm/nmsi.o

Build PPCBoot and mkimage


> # build ppcboot (to get mkimage)

> # Get original version of code
> bzip2 -cd ppcboot-1.1.0.tar.bz2 | tar xf -

> # change the compiler used
> cd ppcboot/
> emacs Makefile # change line 36 to "CROSS_COMPILE = ppc_8xx-"

> # put "." in your path (this is a workaround to a problem only in v1.1.0)
> PATH=$PATH:.

> # choose config
> make YOUR_config

> # build ./ppcboot.bin and ./tools/mkimage
> make clean
> make depend
> make all

> # Make mkimage available
> cp tools/mkimage /usr/bin

Build ATM tools


> # untar latest tools (replace x's with date of most current tools)
> tar -xzf atm-0.79.ppc-xxxx-xx-xx.tgz
> cd  atm-0.79.ppc/

> # build
> make clean
> make depend
> make

LOADING + RUNNING

Is PPCBoot already there?

Connect serial cable between PCB and COMM1 on PC

Configure minicom for 9600 8N1 COMM1

> # Run minicom
> minicom 
Connect power to board

If nothing is output to minicom then you will need to load PPCBoot into FLASH. How to do this will depend on your particular board.

If the following is output ...


    PPCBoot 1.0.4 (Oct 15 2001 - 13:59:31)

    CPU:   unknown MPC860 (0x06000000) at 80 MHz: 16 kB I-Cache 8 kB D-Cache FEC prt
             *** Warning: CPU Core has Silicon Bugs -- Check the Errata ***
    Board: YOUR Board
    DRAM:  (32 MB SDRAM) 32 MB
    FLASH: 16 MB
    In:    serial
    Out:   serial
    Err:   serial
Then you already have PPCBoot.

Configuring PPCBoot

Reboot the unit with minicom running.

=># Find out if enviroment is already correct:
=>printenv
 ...

=># If not, then do following (replace each "[]" with your own text)
=>setenv ipaddr [ipaddr of board]
=>setenv serverip [ipaddr of PC on which CDK was installed]
=>setenv autostart yes
=>setenv bootdelay 1
=>setenv ethaddr [a mac addr from daves list of free ones (format aa:bb:cc:dd:ee:ff)]
=>setenv bootargs root=/dev/nfs rw nfsroot=[serverip]:/opt/hardhat/devkit/ppc/8xx/target/ nfsaddrs=[ipaddr]:10.0.0
=>setenv bootcmd tftpboot

=># Save enviroment to flash
=>saveenv

Configuring NFS

> # export the hardhat root FS
> echo "/opt/hardhat/devkit/ppc/8xx/target (rw,no_root_squash,no_all_squash)" > /etc/exports
> exportfs
> /etc/rc.d/init.d/nfs restart

> # Stick link to kernel image in default position
> ln -s path-to-linux/arch/ppc/mbxboot/pImage  /tftpboot/5300000A.img       
>                                    # This gets picked up by an board
>                                    # with ipaddr 10.0.0.83 so you'll
>                                    # need to change "5300000A.img" to
>                                    # something else.

Running the kernel

Connect the board to your ethernet network.

Connect serial to PC and run minicom.

Finally connect power to board - it should load PPCBoot, which should automatically tftp new pImage and run it. The kernel should then automatically NFS mount /opt/hardhat/devkit/ppc/8xx/target as root filesystem.

TESTING ATM FUNCTIONALITY

If you built the driver as a kernel resident driver then you can go straight ahead and start running ATM user programs.

If you built the driver as a module then you will need to insmod the modules:

If CONFIG_UTOPIA was selected then you must insmod exactly one of

depending on which PHY you use. Note: the generic_phy.o should be used if the PHY is not one of the other two PHYs. It requires a module parameter which tells the driver what the PCR is of the PHY. e.g.

insmod generic_phy.o pcr=100000

If CONFIG_SERIAL_ATM was selected then you must insmod exactly one of

If tsa.o is used then serial ATM will be tranmitted over one of the Time Slot Assigner interfaces, i.e. either TDMa or TDMb.

If nmsi.o is used then serial ATM will be transmitted over the Non-Multiplexed Serial Interface of whichever SCC is selected for serial ATM.

Both tsa and nmsi can optionally be used with a module parameter "serial_loopback". E.g.

insmod tsa.o serial_loopback=1

internally loops back the serial interface.

Finally, you must insmod atm-8xx.o. This action actually starts the ATM driver.

The modules atm-8xx.o comes with two module parameters:

both of which default to 0. Setting either of these to a value above zero will make the ATM driver support non-zero VPIs, at the cost of reducing the VCI range. E.g.

insmod utopia_log2_vpi_ubound=1 serial_log2_vpi_ubound=3

will make the ATM driver support VPIs 0-1 on the UTOPIA port, and VPIs 0-7 on the serial port.

Simple ATM test utilities

To test comms with PC:

  > # move test programs to root FS
  > cd path-to-atm-0.79.ppc/test/
  > for file in *; if [ -x $file ] ; then cp $file /opt/hardhat/devkit/ppc/8xx/target/bin ; fi ; done
To test AAL5:

     On minicom:
     > aread -c 0.0.32

     On PC
     > awrite 0.0.32 "hello"

     (or vice versa)
To test AAL0:

     On minicom
     > 0read 0.0.32

     On PC
     > 0write 0.0.32 "hello"

     (or vice versa)
To test throughput:

  Connect the utopia PHY in loopback mode.
  Then, in minicom:
  > cd /bin
  > aburst
    USAGE:
            aburst --addr itf.vpi.vci\
            --tt {ubr|cbr} --aal {0|5} [--datalen datalen]\
            [--pcr pcr] [--random] [--ping]

            Notes:
                pcr is required if cbr is selected
                datalen is required if aal 5 is selected

   If you run aburst in --ping mode it will 10 cells/frames in
   the air at any one time, it will assume if it hasn't received any
   cells/frames in 0.1 seconds that all currently in the air have been
   lost, and it will print out:

   o    the current total cells/frames received (granularity = 1024)
   o    the current total cells/frames lost     (granularity = 10)

   > # Example:
   > # Find the total loopback throughput using CBR/AAL5/20cellframes/maxPCR45000
   > aburst --ping --addr 0.0.32 --tt cbr --pcr 45000 --aal 5 --datalen $(echo $[48*(20-1)]) & sleep 10; killall aburst
     frames recvd=0x5000 lost=0x0
   > echo $[(0x5000*53*8)/30]  # Prints out throughput

CLIP (Classical IP over ATM)

(Note: if you built driver as a module you will need to "insmod atm-8xx.o" before you do any of the following.)

To set this up do the following:

On PC:

> # If not already done download atm-0.79.tar.gz from the web, and build

> tar -xzf atm-0.79.tar.gz
> # This is from atm/USAGE
> cd ../atm
> make depend
> make
> make install

> # Now set up CLIP on PC
> atmarpd &                        # start the atmarp daemon
> atmarp -c                        # create IP i/f called atm0
> ifconfig atm0 192.168.0.1        # give atm0 an IP address
> atmarp -s 192.168.0.254 0.0.100  # tell atmarpd which PVC to use for board

> # Now copy ported tools to boards root FS
> cp -r cd path-to-atm-0.79.ppc/arpd /bin
On board via minicom:

> # Now set up CLIP on board
> cd /bin/arpd/
> ./atmarpd &                        # start the atmarp daemon
> ./atmarp -c                        # create IP i/f called atm0
> ifconfig atm0 192.168.0.254        # give atm0 an IP address
> ./atmarp -s 192.168.0.1 0.0.100    # tell atmarpd which PVC to use for PC
Finally...

On PC:

> ping 192.168.0.254
On board:

> ping 192.168.0.1

Hardware mods required for testing SERIAL ATM

when using tsa.o

For testing purposes only - TDMa or TDMb (the port used for serial ATM) can be put into "loopback" mode with "insmod tsa.o serial_loopback=1". This means that anything sent out on L1TXDa is echoed to L1RXDa.

This means that you should be able to do tests like this

> aburst --ping --addr 1.0.32 --tt ubr --aal 0 
for example.

HOWEVER, to do this you need a generate clock signal into L1RCLKa (TDMa's clock input) and a 128 bit sync input on L1RSYNCa (TDMa's sync input):

            ____                                ____
L1RSYNCa  __    ____________________ .....______    ______
            __  __  __  __  __  __  _.....  __  __  __  __  
L1RCLKa   __  __  __  __  __  __  __ .....__  __  __  __  

              ^<---------------128 bits---------->^
              start of frame                      start of next frame 
You will also need to modify SERIAL_PHY_BITRATE in serial.c

when using nmsi.o

For testing purposes only the Non-Multiplexed Serial Interface belonging to the SCC used for serial ATM can be put into "loopback" mode with "insmod nmsi.o serial_loopback=1". This means that anything sent out on TXDn is echoed to RXDn.

This means that you should be able to do tests like this

> aburst --ping --addr 1.0.32 --tt ubr --aal 0 
for example.

HOWEVER, to do this you need a generate clock signal into CLKx (where x = CONFIG_SERIAL_ATM_NMSI_CLKPIN) You will also need to modify SERIAL_PHY_BITRATE in serial.c

Switched PVC testing

NOTE: If you are using the modular version of the driver replace all occurences of "/proc/switch" with "/proc/net/atm/switch".

Make the h/w mods required to use the TDMa in loopback mode (see above section).

Connect the board to the PC via UTOPIA-PHY-ATM.

In minicom:

> # Set up three CBR PVCs
> echo "add 0.0.32 1.0.32 18000 cbr" > /proc/switch
> echo "add 1.0.32 0.0.32 18000 cbr" > /proc/switch
> echo "add 0.0.110 0.0.110 45000 cbr" > /proc/switch

> # Confirm that the PVCs were set up correctly
> cat /proc/switch
          
          inputVC outputVC PCR      traffic-type
          ======================================
          0.0.32  1.0.32   18000    cbr
          1.0.32  0.0.32   18000    cbr
          0.0.110 0.0.110  45000    cbr

On PC:

  > # Build aburst for the PC
  > cp ~/atm-0.79.ppc/test/aburst.c ~/atm-0.79.ppc/test/Makefile /usr/src/atm/test/
  > cd /usr/src/atm/test;
  > make aburst;
To test switching using only the UTOPIA:

On PC:

  > aburst --ping --addr 0.0.110 --tt ubr --aal 5 --datalen 1
To test switching using both the UTOPIA and the SERIAL:

On PC:

  > aburst --ping --addr 0.0.32 --tt ubr --aal 5 --datalen 1

THE DESIGN OF THE ATM DRIVER - NOTE: OUT OF DATE

Before continuing you should read part VI of MPC862UM.pdf. This saves me having to repeat everything here.

Files

Location
arch/ppc/atm/
README
This file
Config.in
Used by "make menuconfig" and provides the options: CONFIG_ESAR_SUPPORT (selecting this provides following options) CONFIG_UTOPIA (register an ATM driver for UTOPIA port) CONFIG_SERIAL_ATM_TDMA (register an ATM driver for serial TDMa port) CONFIG_SERIAL_ATM_TDMB (register an ATM driver for serial TDMb port) CONFIG_PTP_SWITCHING (create /proc/switch interface for switched PVCs)
Makefile
Chooses what to build based on enviromental variables selected from Config.in
mpc860sar_detect.c
Contains mpc860sar_detect() which is the first initialisation function that gets called during boot. Returns number of ATM devices registered. If built as a module mpc860sar_detect() is the module initialisation function.
mpc860sar.c
Contains generic ATM code which is used by both serial and the UTOPIA device drivers the
mpc860sar.h
ditto
utopia.c
Contains code used only by UTOPIA device drivers
utopia.h
ditto
serial.c
Contains code used by serial TDMa device driver and serial TDMb device driver
serial.h
ditto
switcher.c
Contains code which initialises the /proc/switch interface and handles switched PVC creation/deletion via echo "..." > /proc/switch and listing via cat /proc/switch. (See menuconfig help on CONFIG_PTP_SWITCHING for details.)
switcher.h
ditto
errata.h
Contains exhaustive list of all the h/w bugs I've found. Each bug has a description of the problem, a description of the workaround, and a "#define XXX_BUG". If new hardware is found to not have a bug simply comment out the corresponding #define in errata.h.
debug.h
Contains several #define DEBUG_XXX lines. Uncomment out these lines to to debug XXX
cpm.h
Definition of CPM register space
cpmtimer.c
Code neccessary to set up Timer 4 (the APC tick).
cpmtimer.h
ditto
risctimer.c
Code neccessary to set up AAL5 timestamp timer (I think!)
risctimer.h
ditto
suni.c
Code which configures the S/UNI ultra (the PHY) on the other end of the UTOPIA bus. Doesn't do anything at the moment.
suni.h
ditto
intpool.c
Generic code which allows client code to create a pool of non-negative integers (the pool is called an intpool_t object). The client code can also allocate from the pool, and then later free the number back to the pool. The server code will keep track of the free integers and always allocate the smallest free integer. One of these objects is created for each device registered and used to keep track of which channel numbers are currently free.
intpool.h
ditto
mpool.c
Generic code which allows client code to create a pool of memory blocks from one contiguous block of memory. (I.e. the client code can create an mpool_t object.) The client code can then allocate 64byte, 128byte, ..., 4Mbyte blocks from the pool. When it is done the client code can free the blocks back to the pool. The server code ensures that 64byte blocks are always 64byte aligned, that 128byte blocks are always 128byte aligned, and so on. The server code also ensures that the alloc() function will always succeed provided there is an aligned block of the required size available. An mpool object is created for each device registered. Each time a channel is created a block is allocated from this object and used to house buffer descriptors. It is not possible to use kmalloc for this purpose because all the buffer descriptors on one device must lie within a 256Kb region. The fact that mpool_alloc() allows client code to allocate blocks of varying sizes means that we can support different rx/tx ring sizes for CBR and UBR channels.
mpool.h
ditto
mm.c
Functions for allocating/freeing physically contiguous, uncached pages.
mm.h
ditto

Structures

dev_data_t
See mpc860sar.h

Each struct atm_dev structure has a pointer to some driver specific data called dev_data. In my driver this data is a dev_data_t struct.

cpm_channel_t
See mpc860sar.h

Each struct atm_vcc structure has a pointer to some driver specific data called dev_data. In my driver this data is a cpm_channel_t struct. This struct is also used for the raw cell queue which is not tied to an struct atm_vcc.

sw_pvc_t
See mpc860sar.h

Switched PVCs are created via the /proc/switch interface and consequently do not have an associated atm_vcc struct. Instead the driver uses a sw_pvc_t structure.

CPM configuration

The driver uses Address Compression (ACP) tables. These are currently set up to allow VPI 0 only, and VCIs in the range 0-16383. OAM cells are routed to the same Receive Connection Table (RCT) as other cells on the same VPI/VCI. If the CPM receives a cell outside the range specified it will (I think) ignore the VPI and all set VCI bits above bit 13.

Channel number 0 is used for the Raw Cell Queue (RCQ). This is mandated by the 862UM. Channels 1-31, however, are never used by terminated channels. Instead, the first terminated PVC is given channel number 32. Channels numbered 0-31 use Connection Tables (CTs) in Dual Port RAM (DPRAM), whereas channels numbered 32 up use CTs in external memory. Therefore we use the higher channel numbers where possible to save on DPRAM (which is running short).

The driver uses 2 APC levels per port. The first is used for sheduling CBR channels; the second is used for scheduling UBR channels. The CBR channels are activated (placed in APC sheduling table 1) when the PVC opened. They are only deactivated when the PVC is closed. The total booked bandwidth for APC level 1 is monitored and the driver will not overbook. Therefore APC Overrun events should not occur on APC level 1, and if they do the driver takes the drastic measure of stopping the APC tick (CPM timer 4). The timer is only restarted by a further send().

The UBR channels are activated (placed in APC scheduling table 2) by send() whenever it detects that the channel is not already active. The intention was that the channel was deactivated by Auto VC Off (AVCF) whenever the CPM detected there was no further data to send from that channel. However, this appears to be broken (the CPM always clears the TCT[ACT] bit whether the channel has be removed from APC scheduling table 2 or not - see errata.h). Therefore the driver does not use AVCF. Instead, each time it gets a tx buffer done interrupt on a UBR channel, the driver checks to see if there are any further buffers to send, and if not deactivates the channel in software.

When a UBR channel is created it is scheduled at the maximum possible rate (i.e. PCR=min(APC tick rate,PHY cell rate)). Therefore sending on several UBR channels simultaneously, or opening a CBR channel and sending on a UBR channel simultaneously, is liable to cause APC Overrun events on the APC sheduling table 2. These are ignored by the s/w and are (probably) harmless.

When a serial ATM driver on (say) TDMa is configured, the code in serial.c must configure the Time Slot Assigner to make a request to the SCC every frame. The driver configures the TSA to expect 16 byte frames on TDMa. This frame size was chosen because it is the maximum (single entry) frame size configurable (see MPC862UM section on SI). This means that the TSA makes less frequent DMA requests to SCC, and this reduces CPM load.

When a Port To Port (PTP) switched channel is created the driver allocates a PTP Receive Connection Table (PTPRCT) on the receiving port and a PTP Transmit Connection Table (PTPTCT) on the transmitting port. It then points the PTPRCT at the PTPTCT. No host intervention is then required on a per cell basis.

Interrupt mechanism

There are four types of interrupt. The table below describes how they are handled by the driver:

General/UTOPIA
The CPM has added an entry to the interrupt queue for the UTOPIA port. The interrupt handler called is utopia_interrupt_handler(). utopia_interrupt_handler() schedules a generic Bottom Half (BH) handler called mpc860sar_interrupt_bh() to be run immediately after the interrupt has been handled. This BH handler extracts all of the unprocessed entries from device's interrupt queue. It then processes each entry. (Rx entries are handled by mpc860sar_rx_bh() and Tx entries are handled by mpc860sar_tx_bh().)
Non-General/UTOPIA
This type of interrupt is caused by a UTOPIA specific event. It is handled entirely by utopia_interrupt_handler().
General/serial
The CPM has added an entry to the interrupt queue for the serial port. The interrupt handler called is serial_interrupt_handler(). serial_interrupt_handler() schedules a generic Bottom Half (BH) handler called mpc860sar_interrupt_bh() to be run immediately after the interrupt has been handled. This BH handler extracts all of the unprocessed entries from device's interrupt queue. It then processes each entry. (Rx entries are handled by mpc860sar_rx_bh() and Tx entries are handled by mpc860sar_tx_bh().)
Non-General/serial
This type of interrupt is caused by a serial specific event. It is handled entirely by utopia_interrupt_handler().

Important parameters

In serial.c:

SCCa =
which SCC to use if CONFIG_SERIAL_ATM_TDMA is selected
SCCb =
which SCC to use if CONFIG_SERIAL_ATM_TDMB is selected
SERIAL_USE_LOOPBACK =
Define this to put TDMx in loopback mode.
SERIAL_PHY_BITRATE =
bit rate of PHY. Setting this too high will result in APC Overrun events
SERIAL_MIN_CHANNEL_BITRATE =
Lowest channel bit rate configurable. Lowering this increases DPRAM usage since: apc_table_size = sizeof(ushort)*(apc_tick_rate/min_channel_pcr)
SERIAL_LOG2_MAX_CHANNELS =
log2(max allowable open PVCs incl. switched) Increasing this value increases external memory usage (since we preallocate an array of cpm_channel_t structs, Buffer Descriptors, and CTs)
SERIAL_NUM_VPIS =
Set this to 1 because I've not tested > 1
SERIAL_SCREEN_OAM =
1 for send OAM to different RCT, 0 for send to same RCT. Use 0 as 1 is not tested.
SERIAL_LOG2_NUM_VCIS_PER_VPI =
log2(1+max_vci) Note that you must ensure that: SERIAL_LOG2_NUM_VCIS_PER_VPI + log2(SERIAL_NUM_VPIS) + SERIAL_SCREEN_OAM < 14 (Due to restrictions in the size of the ACP lookup tables)
SERIAL_INTERRUPT_TABLE_SIZE =
Size of interrupt queue for this device. Decrease to reduce DPRAM usage; increase to reduce likelihood of Interrupt Queue Overflow (IQOV) events.
SERIAL_NUM_APC_LEVELS =
1 to only allow CBR channels; 2 to allow CBR and UBR. (Only 2 is tested.)
SERIAL_PTP_TX_RING_SIZE =
How many buffers to use with a PTPTCT. Effects amount of ext mem used for BDs.
SERIAL_RCQ_RX_RING_SIZE =
How many buffers (1 cell long) to use with Raw Cell Queue (RCQ) RCT (channel 0). Effects amount of ext mem used for BDs.
SERIAL_RX_RING_SIZE =
How many buffers to use in terminated PVC RCT. Effects amount of ext mem used for BDs.
SERIAL_TX_RING_SIZE =
How many buffers to use in terminated PVC TCT. Effects amount of ext mem used for BDs.
In utopia.c:

All of the above (with SERIAL replaced by UTOPIA)

In mpc860sar.h:

AAL5_MTU =
Used to calculate size of buffers in AAL5 RCTs. Should really be 9188, but this is v. wasteful of external memory. If set lower then be sure to do following when setting up CLIP: atmarp -s ipaddr conn-id ubr:sdu=AAL5_MTU
MAX_CHANNEL_BITRATE =
The global upper limit on the VC bitrate. Note that the APC tick rate equals MAX_CHANNEL_BITRATE/(53*8). Therefore increasing this value also increases the APC tick rate, and hence loading on the CPM.
All of the options in arch/ppc/atm/Config.in (see "make menuconfig" help sections on these).


Alex Zeffertt
Last modified: Tue Feb 3 18:13:31 GMT 2004