home *** CD-ROM | disk | FTP | other *** search
/ Hackers Toolkit v2.0 / Hackers_Toolkit_v2.0.iso / HTML / archive / Unix / HOWTOs / VME-HOWT < prev    next >
Text File  |  1999-11-04  |  29KB  |  1,057 lines

  1.   VME Howto
  2.   John Huggins and Michael Wyrick, vmelinux@va.net
  3.   v0.8a, 30 July 1998
  4.  
  5.   This document came about to show the embedded system community how to
  6.   run Linux on their VMEbus Pentium and other PCI local bus based VMEbus
  7.   processor designs.
  8.   ______________________________________________________________________
  9.  
  10.   Table of Contents
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.   1. Introduction
  68.  
  69.      1.1 Knowledge Required
  70.      1.2 Why use Linux on VMEbus systems?
  71.      1.3 Purpose
  72.      1.4 Feedback
  73.      1.5 VMELinux Revision History
  74.      1.6 Copyright/Distribution
  75.  
  76.   2. Installation of the VMELinux Kernel Driver
  77.  
  78.      2.1 Download the Source
  79.      2.2 Install the source to the software
  80.      2.3 Compile the VMELinux components
  81.      2.4 Load the VMELinux Kernel Module
  82.      2.5 Difficulties
  83.  
  84.   3. How to talk to the VMEbus with the VMEUtils and the VMEShell Packages
  85.  
  86.      3.1 What is the VMEUtils program
  87.      3.2 What are the VMEShell Scripts
  88.      3.3 The "vmemap" command.
  89.      3.4 Read Byte, Word or Long
  90.      3.5 Write Byte, Word or Long
  91.      3.6 Read the VMEbus to a file
  92.      3.7 Write a file to the VMEbus
  93.      3.8 Parameters
  94.      3.9 Options
  95.      3.10 A Note about DMA mode.
  96.  
  97.   4. How to talk to the Tundra Universe PCI-VME bridge using the devices drivers.
  98.  
  99.      4.1 The device drivers used with VMELinux
  100.      4.2 VMEMaster Device Drivers
  101.      4.3 VMESlave Device Drivers
  102.      4.4 Direct Control of the Universe Registers
  103.      4.5 read()
  104.      4.6 write()
  105.      4.7 lseek()
  106.      4.8 ioctl()
  107.      4.9 open() and close()
  108.  
  109.   5. Advantages of the VMEbus, Linux and VMELinux
  110.  
  111.      5.1 Pin and socket connectors
  112.      5.2 Eurocard assembly
  113.      5.3 Linux is Low Cost
  114.      5.4 Linux is Stable
  115.      5.5 Linux is Dynamic
  116.  
  117.   6. Current and planned Board Support
  118.  
  119.      6.1 Xycom XVME655 Pentium VMEbus Board
  120.      6.2 XyCom XVME656 Pentium VMEBus Board
  121.      6.3 Dynatem DPC1-0367
  122.      6.4 Planned Board Support
  123.  
  124.   7. Conclusion
  125.  
  126.   8. FAQ
  127.  
  128.      8.1 The Shell utilities return a bunch of stars (*) when I access a board I know is there.  What gives?
  129.      8.2 How does VMELinux handle interrupts?
  130.      8.3 I have RedHat 5.1 and can't get VMELinux programs to compile.
  131.  
  132.  
  133.   ______________________________________________________________________
  134.  
  135.   1.  Introduction
  136.  
  137.   1.1.  Knowledge Required
  138.  
  139.   Using Linux on an embedded VMEbus processor board is not very
  140.   difficult.  However, more than fundamental knowledge is required.
  141.   This document is not a primer on how to fully configure a Linux
  142.   machine.
  143.  
  144.  
  145.   In order to understand this HOWTO document it is assumed that you are
  146.   thoroughly familiar with the following:
  147.  
  148.  
  149.   ╖  Configuring and compiling a Linux kernel to operate the various
  150.      peripherals on your board.  Kernel-HOWTO
  151.  
  152.   ╖  Setting up and configuring of network devices NET-3 HOWTO
  153.  
  154.   ╖  Setting up of inetd NET-3 HOWTO
  155.  
  156.   ╖  Setting up and use of the Tundra Universe PCI to VME Bridge Chip
  157.      Tundra Universe.  The new VMEUtils program makes knowledge of the
  158.      Universe unnecessary for those who do not wish to deal with
  159.      register level Universe access.
  160.  
  161.   ╖  Compiling and installing various network packages like Apache Site
  162.      Wu-Ftpd FAQ
  163.  
  164.   ╖  The VMEbus Rev. D and VME64.  Excellent information may be found at
  165.      the  VMEbus International Trade Association (VITA).
  166.  
  167.   If you are uncertain of how to proceed with any of the above it is
  168.   STRONGLY recommended that you use the links provided to familiarize
  169.   yourself with all packages. We may not reply to any mail regarding any
  170.   of the above.  Please direct any questions to the appropriate author
  171.   of the HOWTO or consult the respective hardware manufacturer.
  172.  
  173.   This document describes the installation and use of VMELinux on a
  174.   Xycom XVME-655 6U VME processor board. Other brands of VME boards that
  175.   use a Pentium and the Tundra Universe chip should be capable of
  176.   running VMELinux.  Please consult the Board Support Section of the
  177.   VMELinux web site for tested boards.  VMELinux Project Web Site
  178.  
  179.  
  180.  
  181.   1.2.  Why use Linux on VMEbus systems?
  182.  
  183.   Operating systems for VMEbus computers are usually Real-time Operating
  184.   Systems (RTOS) which have high cost and a significant learning curve.
  185.   In return the RTOS offers quick response to real world events for
  186.   control of machinery or response to a process.
  187.  
  188.   The VMEbus provides a rugged computer enclosure and interconnection
  189.   system. Many system integrators require this ruggedness and also need
  190.   very fast real-time response.  However, there are many times when
  191.   there is little need for real-time response, but the software still
  192.   needs:
  193.  
  194.   ╖  networking capability,
  195.  
  196.   ╖  remote access via telnet or similar program,
  197.  
  198.  
  199.   ╖  file transfer via FTP or similar programs,
  200.  
  201.   ╖  remote booting via BOOTP or similar method,
  202.  
  203.   ╖  a way to respond to system interrupts.
  204.  
  205.      Linux has all these capabilities. Thus, the VMELinux Project
  206.      exists.
  207.  
  208.  
  209.  
  210.   1.3.  Purpose
  211.  
  212.   The purpose of VMELinux is to give the VME system integrator another
  213.   choice in operating systems. Rich in features, high in reliability and
  214.   low in cost, Linux offers benefits to the embedded computer industry.
  215.   High cost operating systems economically prohibit the use of VME in
  216.   many applications. With Linux and the VMELinux drivers, the rugged
  217.   VMEbus has new possibilities.
  218.  
  219.   The purpose of the VMELinux Project is to:
  220.  
  221.   ╖  Maintain and improve the free VMELinux Kernel Driver software,
  222.  
  223.   ╖  Offer added value software components such as the VMEUtils program
  224.      and VMEShell utilities.
  225.  
  226.   ╖  Test the software on various makes and brands of manufacturer
  227.      supplied VME processor boards,
  228.  
  229.   ╖  Maintain web based documentation on each tested brand and make of
  230.      boards,
  231.  
  232.   ╖  Maintain this HOWTO.
  233.  
  234.   ╖  Integrate user suggested and user supplied improvements into the
  235.      virgin code so we may all benefit from the programming talents of
  236.      others.
  237.  
  238.   ╖  Become the original source for all the above software so VMELinux
  239.      users can be assured of original code from the authors.
  240.  
  241.  
  242.   1.4.  Feedback
  243.  
  244.   As VMELinux is tested in the field, we encourage comments about how
  245.   well or how bad it works. Please feel free to send comments to The
  246.   VMELinux Project
  247.  
  248.  
  249.   As we get experience about each brand of VME CPU, we will list the
  250.   different configurations in this HOWTO. For now we will describe only
  251.   the Xycom board.
  252.  
  253.  
  254.   1.5.  VMELinux Revision History
  255.  
  256.   Linux Kernel Driver
  257.  
  258.   ╖  November, 1997, v0.2 - Initial version on Xycom Board
  259.  
  260.   ╖  December, 1997, v0.3 - Useable version used for actual work with
  261.      project.
  262.  
  263.   ╖  February, 1998, v0.6 - DMA mode added to VME access modes.
  264.  
  265.   ╖  June, 1998, v0.8 - Fixed a few things to allow the new VMEUtils to
  266.      work.
  267.  
  268.   ╖  June 24, 1998, v0.8a - Current version made available on the
  269.      website.
  270.  
  271.   VMEUtils Program
  272.  
  273.   ╖  February, 1998, v0.6 - Created a command line interpreter to access
  274.      the VMEbus
  275.  
  276.   ╖  June, 1998, v0.8 - Fixed several issues to allow VMEShell Utilities
  277.      to function
  278.  
  279.   ╖  June 24, 1998, v0.8a - Current version made available on the
  280.      website.
  281.  
  282.   VMEShell Utilities
  283.  
  284.   ╖  June, 1998, v0.8 - Created command line utilities that allow access
  285.      to the VMEbus from the Linux shell prompt.  These shell programs
  286.      interface with the VMEUtils program.
  287.  
  288.   ╖  June 24, 1998, v0.8a - Changed the name of all the shell programs
  289.      so they all begin with "vme."  Current version made available on
  290.      the website.
  291.  
  292.  
  293.   1.6.  Copyright/Distribution
  294.  
  295.   This document is Copyright 1997-1998 by John Huggins and the VMELinux
  296.   Project.
  297.  
  298.  
  299.   A verbatim copy may be reproduced or distributed in any medium
  300.   physical or electronic without permission of the author.  Translations
  301.   are similarly permitted without express permission if it includes a
  302.   notice on who translated it.  Commercial redistribution is allowed and
  303.   encouraged; however please notify The VMELinux Project of any such
  304.   distributions.
  305.  
  306.  
  307.   Excerpts from the document may be used without prior consent provided
  308.   that the derivative work contains the verbatim copy or a pointer to a
  309.   verbatim copy.
  310.  
  311.  
  312.   Permission is granted to make and distribute verbatim copies of this
  313.   document provided the copyright notice and this permission notice are
  314.   preserved on all copies.
  315.  
  316.  
  317.   In short, we wish to promote dissemination of this information through
  318.   as many channels as possible. However, we wish to retain copyright on
  319.   this HOWTO document, and would like to be notified of any plans to
  320.   redistribute this HOWTO.
  321.  
  322.  
  323.   2.  Installation of the VMELinux Kernel Driver
  324.  
  325.   2.1.  Download the Source
  326.  
  327.   Download the distribution from the VMELinux Web Site.
  328.  
  329.  
  330.  
  331.   2.2.  Install the source to the software
  332.  
  333.   Place the file in a directory reserved for VME usage; We suggest
  334.   /universe. Untar the zipped/tarred file by typing...
  335.  
  336.   tar -xzf VMELinux_08a.tar.gz
  337.  
  338.  
  339.  
  340.   You should see three directories and one link to ca91c042
  341.  
  342.   ca91c042
  343.   vmeshell
  344.   vmeutils
  345.   driver
  346.  
  347.  
  348.  
  349.   In ca91c042 you should find:
  350.  
  351.   ca91c042/
  352.   ca91c042/Makefile
  353.   ca91c042/ca91c042.c
  354.   ca91c042/ca91c042.h
  355.   ca91c042/README
  356.   ca91c042/e
  357.   ca91c042/ins
  358.   ca91c042/stat
  359.   ca91c042/uns
  360.  
  361.  
  362.  
  363.   In vmeshell you should find:
  364.  
  365.   vmeshell/vmer
  366.   vmeshell/README
  367.   vmeshell/vmeseek
  368.   vmeshell/cmd.vme
  369.   vmeshell/vmew
  370.   vmeshell/vmeregw
  371.   vmeshell/vmeregr
  372.   vmeshell/vmefa
  373.   vmeshell/vmecall
  374.   vmeshell/e
  375.   vmeshell/ec
  376.   vmeshell/fa.vme
  377.   vmeshell/map.vme
  378.   vmeshell/tmp.vme
  379.   vmeshell/vmedb
  380.   vmeshell/vmedl
  381.   vmeshell/vmedw
  382.   vmeshell/vmemap
  383.   vmeshell/vmerb
  384.   vmeshell/vmerf
  385.   vmeshell/vmerl
  386.   vmeshell/vmerw
  387.   vmeshell/vmewb
  388.   vmeshell/vmewf
  389.   vmeshell/vmewl
  390.   vmeshell/vmeww
  391.  
  392.  
  393.  
  394.   In the vmeutils directory you should find:
  395.  
  396.  
  397.   vmeutils/commands.cpp
  398.   vmeutils/commands.h
  399.   vmeutils/universe.h
  400.   vmeutils/Makefile
  401.   vmeutils/vmeutils.h
  402.   vmeutils/unilib.h
  403.   vmeutils/unilib.cpp
  404.   vmeutils/vmeutils.cpp
  405.   vmeutils/README
  406.  
  407.  
  408.  
  409.   2.3.  Compile the VMELinux components
  410.  
  411.   Enter the "ca91c042" directory and make the VMELinux device driver
  412.   module.
  413.  
  414.   make
  415.  
  416.  
  417.  
  418.   Now you must create the several /dev driver files.  Type:
  419.  
  420.   make devices
  421.  
  422.  
  423.  
  424.   Once made, you should see the file "ca91c042.o" in the directory.
  425.   This is a loadable module.  See below for loading information.  Plus,
  426.   you should find several "vme..." files in the /dev directory.
  427.  
  428.   Once the devices are made in the /dev directory you must change their
  429.   permissions.  Type:
  430.  
  431.   cd /dev
  432.   chmod 666 vme*
  433.  
  434.  
  435.   Here is how the files should look:
  436.  
  437.   hostname:/dev# ls -l vme*
  438.   crw-rw-rw-   1 root     root      70,   8 Jul 30 10:51 vme_ctl
  439.   crw-rw-rw-   1 root     root      70,   0 Jul 30 10:51 vme_m0
  440.   crw-rw-rw-   1 root     root      70,   1 Jul 30 10:51 vme_m1
  441.   crw-rw-rw-   1 root     root      70,   2 Jul 30 10:51 vme_m2
  442.   crw-rw-rw-   1 root     root      70,   3 Jul 30 10:51 vme_m3
  443.   crw-rw-rw-   1 root     root      70,   4 Jul 30 10:51 vme_s0
  444.   crw-rw-rw-   1 root     root      70,   5 Jul 30 10:51 vme_s1
  445.   crw-rw-rw-   1 root     root      70,   6 Jul 30 10:51 vme_s2
  446.   crw-rw-rw-   1 root     root      70,   7 Jul 30 10:51 vme_s3
  447.   hostname:/dev#
  448.  
  449.  
  450.  
  451.   Change to the "vmeutils" directory and type make there.
  452.  
  453.   make
  454.  
  455.  
  456.  
  457.   This will compile the "vmeutils" program.  This program directly
  458.   speaks to the kernel driver.  It is a reference work for those of you
  459.   who wish to write your own programs to directly speak with the driver.
  460.  
  461.   Copy the program "vmeutils" to your user binary directory.  On our
  462.   system this is "/usr/local/bin."  Alternatively, you can create a link
  463.   in the user bin directory to the "vmeutils" program.
  464.  
  465.   Change to the "vmeshell" directory.  There are no files to be compiled
  466.   here.  These are shell programs that use the "vmeutils" program to
  467.   access the VMEbus.  All the files beginning with "vme" should with
  468.   have a link made or be copied to the "/usr/local/bin" directory.
  469.  
  470.   You are now ready to try the driver.
  471.  
  472.  
  473.   2.4.  Load the VMELinux Kernel Module
  474.  
  475.   Make sure you are root and insert "load" the VMELinux Kernel Module
  476.   for the Universe chip by typing...
  477.  
  478.   insmod ca91c042
  479.  
  480.  
  481.  
  482.   Or just type "ins" to let the shell script do this for you.  Once
  483.   complete, type...
  484.  
  485.   stat
  486.  
  487.  
  488.   You should see a list of registers displayed on your screen.  Some¡
  489.   thing like this...
  490.  
  491.   Universe driver info:
  492.     Control Pointer = 0000
  493.     Stats  reads = 0  writes = 0  ioctls = 0
  494.     LSI0_CTL = 00800000    LSI1_CTL = 00800000
  495.     LSI0_BS  = C0000000    LSI1_BS  = 00000000
  496.     LSI0_BD  = C0010000    LSI1_BD  = 00000000
  497.     LSI0_TO  = 40009000    LSI1_TO  = 00000000
  498.     LSI2_CTL = 00800000    LSI3_CTL = 00800000
  499.     LSI2_BS  = 00000000    LSI3_BS  = 00000000
  500.     LSI2_BD  = 00000000    LSI3_BD  = 00000000
  501.     LSI2_TO  = 00000000    LSI3_TO  = 00000000
  502.     image_va0   = 00000000     image_va1   = 00000000
  503.     image_va2   = 00000000     image_va3   = 00000000
  504.  
  505.   Driver Program Status:
  506.     DMACTL 0    = 00000000 DMACTL 1    = 00000000
  507.     DMACTL 2    = 00000000 DMACTL 3    = 00000000
  508.     OkToWrite 0 = 0        OkToWrite 1 = 0
  509.     OkToWrite 2 = 0        OkToWrite 3 = 0
  510.     Mode 0      = 0        Mode 1      = 0
  511.     Mode 2      = 0        Mode 3      = 0
  512.  
  513.  
  514.   If not, something went wrong.
  515.  
  516.   2.5.  Difficulties
  517.  
  518.   The Universe driver does a good job of finding the Universe chip on a
  519.   PCI bus, but differences in board design may prevent this.  We tested
  520.   all our routines on a Xycom XVME-655 board.  There is little reason
  521.   why this should not work on any other Intel board with a PCI bus and
  522.   the Universe PCI-VME bridge chip.  If you encounter problems, please
  523.   let us know at the The VMELinux Project
  524.  
  525.  
  526.  
  527.  
  528.  
  529.   3.  How to talk to the VMEbus with the VMEUtils and the VMEShell Pack¡
  530.   ages
  531.  
  532.   3.1.  What is the VMEUtils program
  533.  
  534.   This program can be run as is.  Once started, you will see a command
  535.   prompt.  Type ? And you will see a list of commands.  While useful, I
  536.   think you will find the VMEShell scripts a better way to go.  They do
  537.   use this program to speak with the kernel driver so it is necessary to
  538.   have this program available in the current PATH.
  539.  
  540.   The source code for "vmeutils" is also instruction on how to speak
  541.   directly to the kernel driver.  For those of you who wish to create
  542.   programs that directly speak with the driver, these source files are
  543.   good examples.
  544.  
  545.   3.2.  What are the VMEShell Scripts
  546.  
  547.   The VMEShell programs are unix shell scripts.  They offer the operator
  548.   a simple way to access the data on a VMEbus.  Using these commands
  549.   creates temporary files in the user's working directory which store
  550.   information on the last access you did.  This is nice because it will
  551.   be possible to log off the machine, log back in and proceed from where
  552.   you left off without having to re-enter VMEbus information again.
  553.   Plus, these files are stored in the current working directory, so you
  554.   can have different VME access configuration just by setting up
  555.   different directories for each VME board of interest.
  556.  
  557.   Assuming you placed the shell programs and the "vmeutils" program in
  558.   the /usr/local/bin directory, you should be able to log in as a
  559.   regular user and run them.  What follows assumes exactly this.
  560.  
  561.   3.3.  The "vmemap" command.
  562.  
  563.   Login as a regular user and create a directory to experiment with.
  564.   Once in this directory type:
  565.  
  566.   vmemap
  567.  
  568.  
  569.   You should get a help screen like this...
  570.  
  571.   Usage:  map address count space size type
  572.     where address is VME Address to set Universe image to
  573.  
  574.       Space = 0 CR/CSR    Space = 1 A16
  575.       Space = 2 A24       Space = 3 A32
  576.  
  577.       Size  = 1 8 bit     Size  = 2 16 bit
  578.       Size  = 3 32 bit    Size  = 4 64 bit
  579.  
  580.       Type  = 0 USR/DATA  Type  = 1 USR/PRG
  581.       Type  = 2 SUP/DATA  Type  = 3 SUP/PRG
  582.  
  583.  
  584.   This is where you tell VMELinux how you want to access the VMEbus.  We
  585.   assume you already know about the VMEbus' many modes of operation, but
  586.   here is a short list to help you.
  587.  
  588.   ╖  address is the actual VMEbus address you wish to see.  This should
  589.      be set to the lower most value of the address range of interest.
  590.  
  591.   ╖  count is the number of bytes you consider a valid range to view.
  592.      This is the number of bytes starting at the address specified
  593.      above.
  594.  
  595.   ╖  space is the addressing space (mode).  For those of you who do not
  596.      know what we are talking about here, the VMEbus has four
  597.      overlapping address spaces that can be called independant of each
  598.      other.  A16 is a 64 KiloByte space.  A24 is a 16 MegaByte space.
  599.      A32 is a 4 GigaByte space.  There is an A64 space defined the VME
  600.      specification, but the Universe does not support it.
  601.  
  602.   ╖  Size refers to the maximum datawidth allowed for the VME board you
  603.      are accessing.  Some VMEbus board only handle 8 bit data paths.
  604.      Others transfer 32 bits (four bytes) at a time.  Some can handle a
  605.      special VME block mode which can move 64 bits per transaction.  The
  606.      Universe can handle all these modes allowing you to mix inexpensive
  607.      serial port boards with hugh memory arrays.
  608.  
  609.   ╖  Type is the type of VME transaction performed.  Some VME boards
  610.      make a distinction between "User" access (USR) and "Supervisior"
  611.      access (SUP).  Also, some boards allow access to two "pages" of
  612.      memory: Program (PRG) and Data.  The Universe supports all modes.
  613.  
  614.      Typing...
  615.  
  616.      vmemap 0x8000 0x100 1 2 0
  617.  
  618.  
  619.   sets up the VMELinux driver to access an A16 board at base address
  620.   8000 Hex with a range of 100H bytes with 16 bit data width and
  621.   USR/DATA mode.
  622.  
  623.   You will find two new files in your current directory.
  624.  
  625.   ╖  fa.vme
  626.  
  627.   ╖  map.vme
  628.  
  629.      fa.vme stores a "fixed adder" value that will be added to all
  630.      subsequent accesses with the programs below.
  631.  
  632.   map.vme store the parameters above so you do not have to enter them
  633.   every time.
  634.  
  635.   All the following shell utilities read values from these two files to
  636.   performs VME accesses.
  637.  
  638.  
  639.   3.4.  Read Byte, Word or Long
  640.  
  641.   Syntax:
  642.  
  643.   ╖  vmerb -[options] address size
  644.  
  645.   ╖  vmerw  -[options] address size
  646.  
  647.   ╖  vmerl -[options] address size
  648.  
  649.   3.5.  Write Byte, Word or Long
  650.  
  651.   Syntax:
  652.  
  653.   ╖  vmewb -[options] address value
  654.  
  655.   ╖  vmeww  -[options] address value
  656.  
  657.   ╖  vmewl -[options] address value
  658.  
  659.  
  660.  
  661.   3.6.  Read the VMEbus to a file
  662.  
  663.   Syntax:
  664.  
  665.   ╖  vmerf -[options] address size filename
  666.  
  667.   3.7.  Write a file to the VMEbus
  668.  
  669.   Syntax:
  670.  
  671.   ╖  vmewf -[options] address filename
  672.  
  673.   3.8.  Parameters
  674.  
  675.   There are several parameters used with these commands: address, size
  676.   and filename.
  677.  
  678.   ╖  address - The actual hexadecimal VMEbus address you wish to read.
  679.      If the map command is set to access A16 VME address space, the
  680.      address should be 0xABCD.  If the space is A24 then use 0xABCDEF.
  681.      For A32 space use 0xABCDEFGH.
  682.  
  683.   ╖  size - The number of bytes to read.  This value is always the
  684.      number of bytes regardless of the data word size read.  For
  685.      example, if you want to read 16 bytes of information and use vmerl,
  686.      the display will show 16 bytes displayed as 4 long words.
  687.  
  688.   ╖  filename - The name of the file to send "read" VMEbus data to or
  689.      "write" VMEbus data from.
  690.  
  691.   ╖  value - a hex value written as "0xXXXX."
  692.  
  693.   3.9.  Options
  694.  
  695.   Available options are defined with a single dash with the any
  696.   combination of the following:
  697.  
  698.   ╖  q - Hides details on the access to the vmeutils program (default)
  699.  
  700.   ╖  Q - Shows details on the access to the vmeutils program
  701.  
  702.   ╖  p - Single access PCI addressing mode (opposite of d) (default)
  703.  
  704.   ╖  d - DMA access PCI addressing mode (opposite of p) (very fast
  705.      access to the VMEbus)
  706.  
  707.   ╖  0, 1, 2, or 3 - Which Universe chip "Image" to use (defaults to 0)
  708.  
  709.   ╖  b - binary mode off (default)
  710.  
  711.   ╖  B - binary mode on
  712.  
  713.   ╖  v - turn off verbose parameter printing (default)
  714.  
  715.   ╖  V - turn on verbose parameter printing to see how the driver is
  716.      begin used
  717.  
  718.   3.10.  A Note about DMA mode.
  719.  
  720.   VMELinux offers access to all the features of the Universe Chip.
  721.   Especially useful is access to the DMA engine on the chip.  With this
  722.   feature the Universe chip transfers data on the PCI bus by becoming a
  723.   PCI master.  This is nice, but the real benefit comes from the VMEbus
  724.   accesses.  Even if the VMEbus interface is not using block mode
  725.   transfers, the Universe chip can complete VMEbus transfers under 400
  726.   nanoseconds sustained.  This is the direct result of the Universe
  727.   taking complete control of both the PCI bus and the VMEbus.  Thus, it
  728.   is possible to access non block mode VMEbus peripherals much faster
  729.   than older technologies.
  730.  
  731.  
  732.   4.  How to talk to the Tundra Universe PCI-VME bridge using the
  733.   devices drivers.
  734.  
  735.   4.1.  The device drivers used with VMELinux
  736.  
  737.  
  738.   ╖  /dev/vme_ioctl
  739.  
  740.   ╖  /dev/vme_m0
  741.  
  742.   ╖  /dev/vme_m1
  743.  
  744.   ╖  /dev/vme_m2
  745.  
  746.   ╖  /dev/vme_m3
  747.  
  748.   ╖  /dev/vme_s0
  749.  
  750.   ╖  /dev/vme_s1
  751.  
  752.   ╖  /dev/vme_s2
  753.  
  754.   ╖  /dev/vme_s3
  755.  
  756.   4.2.  VMEMaster Device Drivers
  757.  
  758.   /dev/vme_m* are drivers used to access the VMEbus as a bus master.
  759.  
  760.   The Universe chip offers the programmer four VMEMaster windows to the
  761.   VMEbus.  These windows are called Images.  The details of the
  762.   registers within these windows is beyond the scope of this Howto.
  763.   Please refer to the Universe documentation for details. Tundra
  764.   Universe
  765.  
  766.   4.3.  VMESlave Device Drivers
  767.  
  768.   /dev/vme_s* are drivers used to allow another VMEbus master to access
  769.   this device.
  770.  
  771.   The Universe chip offers the programmer four VMESlave windows to the
  772.   VMEbus.  These windows are called Images.  The details of the
  773.   registers within these windows is beyond the scope of this Howto.
  774.   Please refer to the Universe documentation for details. Tundra
  775.   Universe
  776.  
  777.   Slave VME modes are not yet supported by VMELinux.
  778.  
  779.   4.4.  Direct Control of the Universe Registers
  780.  
  781.   /dev/vme_ioctl allows read and write access to the Universe registers.
  782.  
  783.   For experienced users, this device allows direct access to the
  784.   Universe chip's internal registers.  Explanation of these registers
  785.   and what they do is beyond the scope of this howto. Please consult the
  786.   Universe documentation available from Tundra Universe
  787.  
  788.   4.5.  read()
  789.  
  790.   n = read(vme_handle,buf,len);
  791.  
  792.  
  793.   Where:
  794.  
  795.   ╖  vme_handle = The value returned by "open,"
  796.  
  797.   ╖  buf = pointer to data block,
  798.  
  799.   ╖  len = number of bytes to read from the VMEbus.
  800.  
  801.   4.6.  write()
  802.  
  803.   write(vme_handle,buf,len);
  804.  
  805.   Where:
  806.  
  807.   ╖  vme_handle = The value returned by "open,"
  808.  
  809.   ╖  buf = pointer to data block,
  810.  
  811.   ╖  len = number of bytes to write to the VMEbus.
  812.  
  813.   4.7.  lseek()
  814.  
  815.   lseek(vme_handle,vme_pnt,Seek_Type);
  816.  
  817.   Where:
  818.  
  819.   ╖  vme_handle = The value returned by "open,"
  820.  
  821.   ╖  vme_pnt = The actual VME address to access,
  822.  
  823.   ╖  Seek_Type = SEEK_SET or SEEK_CUR
  824.  
  825.   4.8.  ioctl()
  826.  
  827.   ioctl(vme_handle, command, argument);
  828.  
  829.   Where:
  830.  
  831.   ╖  vme_handle = The value returned by "open,"
  832.  
  833.   ╖  command = IOCTL_SET_CTL or IOCTL_SET_MODE or IOCTL_SET_BS or
  834.      IOCTL_SET_BD or IOCTL_SET_TO
  835.  
  836.   ╖  argument to be sent
  837.  
  838.      And:
  839.  
  840.   ╖  IOCTL_SET_CTL = Sets the image CTL register to argument. Argument
  841.      must be 32 bits.
  842.  
  843.   ╖  IOCTL_SET_MODE = "MODE_DMA" or "MODE_PROGRAMMED" - Sets the mode by
  844.      which the Universe chips communicates to the PCI bus (Not VME Block
  845.      Mode)
  846.  
  847.   ╖  IOCTL_SET_BS = Sets the image BS register to arguments.  NOTE: The
  848.      BD register must already be set prior to making this call.
  849.  
  850.   ╖  IOCTL_SET_BD = Sets the image BD register to argument.
  851.  
  852.   ╖  IOCTL_SET_TO = Set the image TO register to argument.
  853.  
  854.   4.9.  open() and close()
  855.  
  856.   Here is where you open and close the four VMELinux Master or Slave
  857.   devices plus the Control device.  Slave images are not yet supported.
  858.  
  859.   ╖  vme_handle = open("//dev//vme_m0",O_RDWR,0);
  860.  
  861.   ╖  uni_handle = open("//dev//vme_ctl",O_RDWR,0);
  862.  
  863.  
  864.   ╖  close(vme_handle);
  865.  
  866.   ╖  close(uni_handle);
  867.  
  868.  
  869.   5.  Advantages of the VMEbus, Linux and VMELinux
  870.  
  871.   5.1.  Pin and socket connectors
  872.  
  873.   The VMEbus standard uses pin and socket connectors. This is superior
  874.   to edge connections in that the connection is not exposed to humidity
  875.   and other environmental conditions. It is a more expensive way of
  876.   doing things, but offers longer times before failure.
  877.  
  878.   5.2.  Eurocard assembly
  879.  
  880.   A VMEboard is either a 3U (160 x 100 mm) or a 6U size (160 x 233.35
  881.   mm). These sizes correspond to the Eurocard standard for board modules
  882.   and card cages. Eurocard is a popular format used by many different
  883.   busses including CompactPCI. This popularity makes the materials
  884.   needed for cage assembly inexpensive and easy to obtain.
  885.  
  886.   5.3.  Linux is Low Cost
  887.  
  888.   The nature of Linux is in its user supported and freely available
  889.   format. The number of people using Linux is growing. The number of
  890.   people contributing to the continued development of the Linux software
  891.   base is growing. It is unfair to state that Linux is a good value
  892.   because it is available for little to no charge. Linux is a good value
  893.   because it works.
  894.  
  895.   5.4.  Linux is Stable
  896.  
  897.   There are those who say that Linux us an unstable operating system. It
  898.   is true that the new Linux kernels in development are experimental and
  899.   should not be relied on for critical applications. However, stable
  900.   versions of the Linux OS are always available and provide very stable
  901.   operation. VMELinux is always based on the stable versions of the
  902.   kernel source; Today's stable kernels are the 2.0.X series.
  903.  
  904.   5.5.  Linux is Dynamic
  905.  
  906.   Because so many people are developing Linux, you do not have to wait
  907.   long for improvements, fixes or new features to become part of the
  908.   Linux distribution.
  909.  
  910.   6.  Current and planned Board Support
  911.  
  912.   While the VMELinux driver should work with any PCI based design, the
  913.   following boards have actually run our software.
  914.  
  915.   6.1.  Xycom XVME655 Pentium VMEbus Board
  916.  
  917.  
  918.   ╖  This XyCom board is compatible with the standard VMELinux kernel
  919.      driver package from VMELinux Project
  920.  
  921.   ╖  A prepared kernel will be available soon.  It will be based on the
  922.      newest version of the Linux kernel and will include appropriate
  923.      drivers for the onboard NE2100 Ethernet interface.  Check the
  924.      website for details.
  925.   6.2.  XyCom XVME656 Pentium VMEBus Board
  926.  
  927.  
  928.   ╖  This XyCom board is compatible with the standard VMELinux kernel
  929.      driver package from VMELinux Project
  930.  
  931.   ╖  A prepared kernel will be available soon.  It will be based on the
  932.      newest version of the Linux kernel and will include appropriate
  933.      drivers for the onboard AHA2940/AIC7000 SCSI and 82558 Intel
  934.      EtherExpress Ethernet peripherals.  Check the website for details.
  935.  
  936.   6.3.  Dynatem DPC1-0367
  937.  
  938.  
  939.   ╖  This board is compatible with the standard VMELinux kernel driver
  940.      package from VMELinux Project
  941.  
  942.   ╖  A prepared kernel will be available soon.  It will be based on the
  943.      newest version of the Linux kernel and will include appropriate
  944.      drivers for the onboard SCSI and Tulip Ethernet peripherals.  Check
  945.      the website for details.
  946.  
  947.   6.4.  Planned Board Support
  948.  
  949.   If you do not see VMELinux support for your board let us know. Maybe
  950.   the manufacture will lend us a board for development.
  951.  
  952.   7.  Conclusion
  953.  
  954.   VMELinux offers the user a low cost way to implement a VMEbus system
  955.   quickly, reliably and with all the advantages of a unix environment.
  956.   We are using VMELinux in our projects so you can be sure future
  957.   developments will come quick.  On the drawing board for this year are:
  958.  
  959.   ╖  Implementation of Interrupts and Handling thereof,
  960.  
  961.   ╖  Porting to other brands of Intel VMEbus boards,
  962.  
  963.   ╖  Porting of VMELinux to other processors that use the Universe chip,
  964.  
  965.   ╖  A study of running the VMELinux kernel driver module as a RT-Linux
  966.      task.
  967.  
  968.   This document outlines the steps you need to install the VMELinux
  969.   Kernel Driver into the example Xycom XVME-655 Pentium VME board.  It
  970.   is our hope that others will attempt installation of VMELinux into
  971.   other boards and let us know their success.
  972.  
  973.  
  974.   Mail any responses to The VMELinux Project.  If you have a question or
  975.   an update to the document let us know and we will add it.
  976.  
  977.  
  978.  
  979.   8.  FAQ
  980.  
  981.  
  982.   8.1.  The Shell utilities return a bunch of stars (*) when I access a
  983.   board I know is there.  What gives?
  984.  
  985.   Check to be sure the /dev/vme... files have their permissions set to
  986.   666.  If not, the shell utilities will return a * in place of data to
  987.   indicate an error condition similar to a VME bus error.
  988.  
  989.  
  990.  
  991.   8.2.  How does VMELinux handle interrupts?
  992.  
  993.   Right now it doesn't.  However, we are planning to get that part going
  994.   soon.  Please be patient.
  995.  
  996.   8.3.  I have RedHat 5.1 and can't get VMELinux programs to compile.
  997.  
  998.   RedHat 5.1 includes a new compiler.  If you manually edit the Makefile
  999.   in each directory to call up the new egcs compiler, things should
  1000.   compile.  We fully intend to support RedHat 5.1 installations, but for
  1001.   now I suggest using 5.0 or Slackware.
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.