The device driver module, pcidrv, may be already compiled in the
distribution using the default option settings in the file, pcidrv_options.h.
However, there is no guarantee that the code was compiled for the proper platform
architecture or operating system version on your system.
To be sure the driver is initially rebuilt for your system,
begin the installation by removing any existing compiled driver
in the $CAC/pci/pcisoldev directory:
- # make clean
If this installation is an update to a previously installed system, with no
changes to be made to the configuration,
it is only necessary to compile and install the new device driver code.
To do this run the command:
- # make /kernel/drv/pcidrv
It may be necessary to specify the C compiler on your system. If so, use the command:
- # make CC=compiler /kernel/drv/pcidrv
Where compiler is the name of the compiler program and any required arguments.
For example:
- # make CC=gcc /kernel/drv/pcidrv
For initial installations or when adding boards to the system, make appropriate
changes to the appropriate configuration file.
Once the appropriate configuration file has been modified the driver can be installed
with the command:
- # make install-vme
or
- # make install-sfvme
depending on the system type (direct VME access or a Solflower Sbus-to-VME adapter).
This will recompile the device driver module, if any changes have been made to the
dspdrv_options.h file. It may be necessary to specify the C compiler on your system.
If so, use the command:
- # make CC=compiler install-vme
or
- # make CC=compiler install-sfvme
Where compiler is the name of the compiler program and any required arguments.
The compiled driver module, pcidrv, and appropriate configuration file
will be copied to the /kernel/drv directory. The configuration file will be named
pcidrv.conf in the /kernel/drv directory.
The "make" command will update the file, /etc/devlinks.tab then attempt
to add the driver to the system. This final action may fail if a previous V6M6/V9M12
driver is already installed. If the installation was performed only to update the driver
module the errors can be ignored. However the new driver will not be installed until the
system is rebooted.
Once the driver is installed and operational (possibly requiring system reboot)
test the system by running the command:
- # pciinit -rZ pci0
The names of additional boards may be appended to the command line to test other
V6M6 / V9M12 boards in the system. Or all of the boards may be initialized with one
command:
- # pciinit -rZ all
The pciinit program must be run whenever the system is rebooted.
Once the system has been tested it can be configured to automatically initialize
the boards as part of the system boot process. Edit the file, pciinit.sh,
replacing the directory name, "/usr/cac" with the name of the installation
directory you have chosen. This name appears in three places near the end of the file.
Then run the following command to install the file in the system's start-up directory.
- # make install-rc
With SunOS 4.1.x (Solaris 1.x) the V6M6 / V9M12 device drivers must be compiled
in to the kernel. The basic instructions described here should be sufficient for veteran
kernel builders. If you have never rebuilt the kernel before please refer to the
Sun Microsystems System Administration Manual for information on building new kernels.
If a SPARCstation 2 and Solflower Sbus to VME adapter is used, consult the
Solflower documentation for additional kernel configuration information.
Note: Be sure to save a copy of the existing kernel, /vmunix, in case a problem arises with the new kernel.
The device driver installation procedure is listed below. If you are installing the V6M6 /V9M12 device driver for the first time, begin with step 1. When updating the device driver or adding new boards to the configuration, skip to step 5.
1. Create a symbolic link to the pcisundev directory in the Kernel system directory:
- # cd /usr/kvm/sys
# ln -s $CAC/pci/pcisundev pcidev
This creates a symbolic link to the PCI driver source code in the location searched
by kernel build procedure.
Future driver code updates will automatically be picked up by this link.
2. Edit the system device table C source file, conf.c, to include entry points
for the driver.
- # vi /usr/kvm/sys/sun/conf.c
The file, $CAC/pci/pcisundev/pci_conf.c, contains the two sections of code to be
added to conf.c. The first section is declarations and macros starting
with #include <pci.h>. These 13 lines should be added just before the declaration
of the cdevsw array. The second section is five lines to be added to the end
of the cdevsw array. Take note of the index associated with the new
element - this is the major device number associated with the V6M6 / V9M12 boards.
Modify the comment in the code, replacing "Maj Dev Num" with the index number
for reference.
It is only necessary to add one entry to the "cdevsw" array. All of the boards (up to 14 per system) use the same major device number.
3. Change to the machine specific configuration directory.
- # cd ../<arch>/conf
where <arch> is the directory specific to machine kernel
architecture (and can be determined using the "arch" command).
4. Edit the file named files adding the following line at the end of the
file to specify location of the device driver source software:
pcidev/pcidrv.c optional pci device-driver
5. In the machine specific configuration directory,
edit the site specific configuration file for your system.
If you do not already have a kernel configuration file specific to your system:
- # cp GENERIC <sys_name>
where <sys_name> is your system's kernel name.
Edit the configuration file:
- # vi <sys_name>
For each V6M6 / V9M12 board installed in the system, add lines at the end of the
configuration file in the following format:
device pci0 at vme32d32 ? csr 0x10200000
priority 3 vector pciintr 0xD0
The items shown in boldface type are the values that are likely to require
changing to match your system's configuration.
The number of the pci device will increment for each device line added.
The value following "csr" specifies the VME address for each board.
This value must a) be modulo 0x20000, b) match its upper four digits with the address
switch settings on the board and c) lie within the addressable A32 VME space of the host
system.
The value following "priority" specifies the interrupt level
for interrupts generated from the board. The value following "vector pciintr"
specifies the board's interrupt vector.
Example configuration entries can be found in the file:
$CAC/pci/pcisundev/pci_config_file
6. Run the system configuration program for the new or modified configuration file. For native VME systems:
- # /etc/config <sys_name>\
For Solflower Sbus to VME adapter systems:
- # sfconfig <sys_name>
7. Build a new kernel using the new configuration information.
- # cd ../<sys_name>
# make
This will compile all the necessary system files, including the V6M6 / V9M12 device driver code (pcidrv.c) and create a new vmunix file in the current directory.
8. Install the new kernel.
- # mv /vmunix /vmunix.old (to backup old kernel)
# mv vmunix /vmunix (to copy new kernel)
9. Create device node entries for the V6M6 / V9M12 boards.
- # cd $CAC/pci/pcisundev
# makepcidev <major num> <num boards>
Replace <major num> with the major device number determined in step 2.
If unsure, view the file, /usr/kvm/sys/sun/conf.c, and determine the index of the pci
entry point structure in the "devsw" array. Replace <num boards>
with the number of boards installed.
The makepcidev program will remove any existing pci entries in the /dev directory
and recreate them using the major device number and number of boards specified.
10. Reboot the system to bring up the new kernel:
- # /etc/fastboot
11. Test the system by running the command:
- # pciinit -rZ pci0
The names of additional boards may be appended to the command line to test other
V6M6 / V9M12 boards in the system. Or all of the boards may be initialized with one
command:
- # pciinit -rZ all
12. Edit the system start-up script:
The pciinit program must be run whenever the system is rebooted.
Once the system has been tested it can be configured to automatically initialize
the boards as part of the system boot process. Edit the file, /etc/rc.local,
and add the following line:
- /usr/cac/bin/pciinit -rZ -d /usr/cac all
Note that nvironment variables are not active in the start up script.
The -d option tells pciinit where to look for the memory and processor initializer
code that is run on the processor modules. Replace /usr/cac with the absolute
pathname associated with the environment variable CAC defined during the installation.