4.2  What Does the Go-HotSwap Package Include?

4.2.1  Utilities

  • Go-HotSwap Configuration Manager – Only on Windows versions; accessible through: Start | Programs | Go-HotSwap | Hot Swap Configuration Manager. The Configuration Manager is a graphical configuration utility that enables defining of certain tasks to be performed upon future hot swap events (for example load/unload a legacy device driver).
  • WinDriver Utilities: Go-HotSwap includes all the utilities that are provided with WinDriver. Below is a short description of these utilities, which provide tools for diagnostics, debugging and automatic code generation. For full documentation and implementation instructions please refer to the WinDriver PCI Manual.
    • DriverWizard – A graphical development and debugging tool that guides you through the steps required to develop a device driver and collects debugging information on your driver as it runs. Diagnose your hardware using DriverWizard and let DriverWizard generate your driver's skeletal code.
    • PCI_SCAN (GoHotSwap/util) – A utility for obtaining a list of the CompactPCI devices installed and the resources allocated to each of them (memory ranges, I/O ranges and interrupts).
    • PCI_DUMP (GoHotSwap/util/) – A utility for obtaining a dump of all the PCI configuration registers of the PCI/CompactPCI devices installed.
    • PCI_DIAG (GoHotSwap/util/) – A utility for reading/writing PCI configuration registers, and accessing the PCI card's I/O and memory ranges. It can be used as a sample hardware access code.
    • WDDEBUG (GoHotSwap/util/) – A utility that enables you to log debug messages. Note that debug mode slows down transfer operations.
      Run WDDEBUG help or WDDEBUG with no arguments, to view full usage instructions.
    • WDDEBUG_GUI (GoHotSwap/util) – A graphical user interface (GUI) version of the WDDEBUG utility.
    • WDREG (GoHotSwap/util/) – Registers/removes Go-HotSwap in/from the Windows registry. To install Go-HotSwap on a new Windows computer, copy the windrvr6.sys file to the %windir%\system32\drivers directory. After copying Go-HotSwap to the drivers directory, add Go-HotSwap to the list of device drivers that Windows loads on boot by running wdreg.exe install. To install Go-HotSwap from within your own application, add the WDREG source to your own installation code.
    • Kernel PlugIn (GoHotSwap/kerplug/) – The files and samples needed to create a Kernel PlugIn.
  • Distribution Package (GoHotSwap/redist/) – The files specified in this section must be included in the driver you distribute to your customers.

4.2.2  Samples

The Go-HotSwap package provides source code for the utilities listed above, along with other samples, which demonstrate how the Go-HotSwap and WinDriver APIs can be used in various applications. Find the sample which is closest to the driver/application you need. Use it to jump-start your driver development process.

  1. Go-HotSwap Samples (GoHotSwap/hotswap/...) – Samples that demonstrate how various hot swap tasks are performed using Go-HotSwap API.
    • hs_detect (GoHotSwap/hotswap/hs_detect) – The hs_detect utility prints messages to the screen upon hot swap events.
      The application first activates the Go-HotSwap Hot Swap Engine, and registers itself to receive notifications regarding hot swap events according to a user predefined set of criteria. The default is to receive notifications regarding all hot swap events.
      When activated by the hs_detect utility, the Hot Swap Engine detects the insertion and removal of CompactPCI boards, dynamically allocates/de-allocates resources required by these boards and sends the relevant notifications to the hs_detect application.
      When the hs_detect application receives such notifications, it prints a message to the screen accordingly. For example, if a cPCI board is removed, then hs_detect prints a message saying that a board of bus x, slot y, function z has been removed.
    • hs_activate (GoHotSwap/hotswap/hs_activate) – The hs_activate utility activates any desired application upon insertion or removal of a CompactPCI board, according to the user's pre-configuration.
      This utility activates the Go-HotSwap Engine and upon each insertion/removal of a CompactPCI card, performs the actions defined in a special configuration file (GoHotSwap/hotswap/hs_activate/.../hs_conf.rul).
      The file hs_conf.rul can be edited and its configuration altered according to your requirements. This file contains the database of the actions to be carried out upon insertion/removal of each device. Please refer to hs_activate utility to see how hs_conf.rul is implemented.
    • hs_reenum (GoHotSwap/hotswap/hs_reenum) – The hs_reenum utility performs re-enumeration according to user permissions.
      It can be referred to as a sample for implementing the Go-HotSwap function WD_HsEventSend() for re-enumeration purposes.
  2. WinDriver Samples (GoHotSwap/samples) – Samples that demonstrate different common drivers. For more information, please refer to the relevant chapter in the WinDriver PCI Manual.
  3. WinDriver for PLX, Altera, AMCC and Xilinx (for example – GoHotSwap/plx/p9054_diag, etc.) – Source code of the diagnostic applications for the specific chipsets that WinDriver supports. For more information, please refer to the relevant chapter in the WinDriver PCI Manual.