freebsd-dev/sys/dev/rr232x
Scott Long 2b83592fdc Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will
use to synchornize and protect all data objects that are used for that
SIM.  Drivers that are not yet MPSAFE register Giant and operate as
usual.  RIght now, no drivers are MPSAFE, though a few will be changed
in the coming week as this work settles down.

The driver API has changed, so all CAM drivers will need to be recompiled.
The userland API has not changed, so tools like camcontrol do not need to
be recompiled.
2007-04-15 08:49:19 +00:00
..
amd64-elf.rr232x_lib.o.uu
array.h
him.h
himfuncs.h
hptintf.h
i386-elf.rr232x_lib.o.uu
ldm.h
LICENSE
list.h
os_bsd.c
os_bsd.h Make this compile with -Wundef. 2006-05-16 15:23:27 +00:00
osm_bsd.c Remove Giant from CAM. Drivers (SIMs) now register a mutex that CAM will 2007-04-15 08:49:19 +00:00
osm.h
README
rr232x_config.c
rr232x_config.h

RocketRAID 232x Controller Driver for FreeBSD
Copyright (C) 2005 HighPoint Technologies, Inc. All rights reserved.

#############################################################################
Revision History:

   v1.02 02/20/2006
         Add RR2322 support

   v1.01 2005-8-30
         First source code release

$FreeBSD$

#############################################################################

1. Overview
---------------------
  This package contains FreeBSD driver source code for HighPoint RocketRAID 
  232x SATA controller.

  NO WARRANTY

  THE DRIVER SOURCE CODE HIGHPOINT PROVIDED IS FREE OF CHARGE, AND THERE IS
  NO WARRANTY FOR THE PROGRAM. THERE ARE NO RESTRICTIONS ON THE USE OF THIS
  FREE SOURCE CODE. HIGHPOINT DOES NOT PROVIDE ANY TECHNICAL SUPPORT IF THE
  CODE HAS BEEN CHANGED FROM ORIGINAL SOURCE CODE.

  LIMITATION OF LIABILITY

  IN NO EVENT WILL HIGHPOINT BE LIABLE FOR DIRECT, INDIRECT, SPECIAL,
  INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR
  INABILITY TO USE THIS PRODUCT OR DOCUMENTATION, EVEN IF ADVISED OF THE
  POSSIBILITY OF SUCH DAMAGES. IN PARTICULAR, HIGHPOINT SHALL NOT HAVE
  LIABILITY FOR ANY HARDWARE, SOFTWARE, OR DATA STORED USED WITH THE
  PRODUCT, INCLUDING THE COSTS OF REPAIRING, REPLACING, OR RECOVERING
  SUCH HARDWARE, OR DATA.


2. Rebuild the kernel with RR232x support
--------------------------------------------

  1) Install kernel source package and building tools. 
  
  2) Extract the driver files under the kernel source tree:

     # cd /usr/src/sys/
     # tar xvzf /your/path/to/rr232x-freebsd-src.tgz

  3) Update the kernel configuration file to include the HighPoint source.
     Assume the configure file is GENERIC, and new kernel configure file is 
     MYKERNEL:

     # cd i386/conf          (or amd64/conf for AMD64)
     # cp GENERIC MYKERNEL

  4) Edit MYKERNEL, and add the following line under "RAID controllers 
     interfaced to the SCSI subsystem":

          device  "rr232x"   #HighPoint RocketRAID 232x

  5) For i386 system, edit /usr/src/sys/conf/files.i386 and append the lines
     shown below:

          rr232x_lib.o optional    rr232x  \
              dependency  "$S/dev/rr232x/i386-elf.rr232x_lib.o.uu" \
              compile-with    "uudecode < $S/dev/rr232x/i386-elf.rr232x_lib.o.uu" \
              no-implicit-rule

          dev/rr232x/os_bsd.c      optional        rr232x
          dev/rr232x/osm_bsd.c     optional        rr232x
          dev/rr232x/rr232x_config.c      optional        rr232x

     For amd64 system, edit /usr/src/sys/conf/files.amd64 and append the lines
     shown below:

          rr232x_lib.o optional    rr232x  \
              dependency  "$S/dev/rr232x/amd64-elf.rr232x_lib.o.uu" \
              compile-with    "uudecode < $S/dev/rr232x/amd64-elf.rr232x_lib.o.uu" \
              no-implicit-rule

          dev/rr232x/os_bsd.c      optional        rr232x
          dev/rr232x/osm_bsd.c     optional        rr232x
          dev/rr232x/rr232x_config.c      optional        rr232x

     Note FreeBSD 5.3/5.4 i386 already have a built-in RR232x driver, you should
     replace the old configuration lines with the lines listed above.


  6) Rebuild and install the kernel:

     a) for FreeBSD 5.x-i386:
     
        # cd /usr/src/sys/i386/conf/
        # /usr/sbin/config MYKERNEL
        # cd ../compile/MYKERNEL/
        # make depend
        # make 
        # make install

     b) for FreeBSD 5.x-amd64:

        # cd /usr/src/sys/amd64/conf/
        # /usr/sbin/config MYKERNEL
        # cd ../compile/MYKERNEL/
        # make depend
        # make 
        # make install

     c) for FreeBSD 4.x:
     
        # cd /usr/src/sys/i386/conf/
        # /usr/sbin/config MYKERNEL
        # cd ../../compile/MYKERNEL/
        # make depend
        # make 
        # make install

    If the driver was previously configured as an auto-loaded module by
    /boot/defaults/loader.conf, please remove the entry rr232x_load="YES"
    from loader.conf to prevent the driver from being loaded twice.
    
  7) Reboot from the new kernel.


3. Build/Load the driver as a kernel module
------------------------------------------------

  1) Install kernel source package and building tools. 
  
  2) Extract the driver files under the kernel source tree:
    
     # cd /usr/src/sys/
     # tar xvzf /your/path/to/rr232x-opensource-v1.12-bsd.tgz


  4) Build the driver module:
    
     # cd modules/rr232x
     # make

  5) Copy the driver module to the kernel module directory

     For FreeBSD 4.x:
     
     # cp rr232x.ko /modules/

     For FreeBSD 5.x:
    
     # cp rr232x.ko /boot/kernel/

  6) Reboot and load the driver under loader prompt. e.g:

        BTX loader 1.00  BTX version is 1.01
        Console: internal video/keyboard
        BIOS driver A: is disk0
        BIOS driver C: is disk2
        BIOS 636kB/74512kB available memory
        
        FreeBSD/i386 bootstrap loader, Revision 0.8
        (mailto:jkh@narf.osd.bsdi.com, Sat Apr 21 08:46:19 GMT 2001)
        Loading /boot/defaults/loader.conf
        /kernel text=0x24f1db data=0x3007ec+0x2062c -
        
        Hit [Enter] to boot immediagely, or any other key for command prompt.
        Booting [kernel] in 9 seconds<64><73>
        
         <-- press SPACE key here 
        Type '?' for a list of commands, 'help' for more detailed help.
        ok load rr232x
        /modules/rr232x.ko text=0xf571 data=0x2c8+0x254
        ok boot
        
     For FreeBSD 5.x, you can select 6 on the boot menu to get a loader prompt.
  
  7) You can add a below line into /boot/defaults/loader.conf to load the
     driver automatically:
    
           rr232x_load="YES"
    
     Please refer to the installation guide in HighPoint FreeBSD driver release 
     package for more information.
     

#############################################################################
Technical support and service

  If you have questions about installing or using your HighPoint product,
  check the user's guide or readme file first, and you will find answers to
  most of your questions here. If you need further assistance, please
  contact us. We offer the following support and information services:

  1)  The HighPoint Web Site provides information on software upgrades,
      answers to common questions, and other topics. The Web Site is
      available from Internet 24 hours a day, 7 days a week, at
      http://www.highpoint-tech.com.

  2)  For technical support, send e-mail to support@highpoint-tech.com

  NOTE: Before you send an e-mail, please visit our Web Site
        (http://www.highpoint-tech.com) to check if there is a new or 
        updated device driver for your system.