# Hot Swap overview

NMS OAM Hot Swap functionality is used with CompactPCI Hot Swap-compliant boards on Windows and UNIX systems.

A Hot Swap-compliant board has a switch built into the ejector handle and a front panel Hot Swap LED. When the board is inserted, the switch signals that the board is fully seated (with the handle closed) and the supporting software can be initialized. When the board is extracted, the switch signals that the operator is beginning to extract the board and that software disconnection should be initiated.

When lit, the Hot Swap LED indicates that software disconnection is complete and the board can be safely extracted. The operator can open the handle the rest of the way and extract the board.

Separate instances of the Hot Swap software reside on each host running NMS OAM that supports Hot Swap. The Hot Swap software on a resource host tracks only boards installed in that host.

## Hot Swap architecture

The following software components make up NMS OAM Hot Swap. These components are installed on each host supporting Hot Swap:

- Hot Swap EMC

- Hot Swap manager

- Hot Swap driver (under Solaris, a set of board device drivers; under Windows, a plug and play manager; under Linux, part of the board device driver)

The following illustration shows the Hot Swap components:

## Hot Swap EMC

The glue logic between the Hot Swap manager library and the NMS OAM Supervisor is implemented as a standard NMS OAM extended management component (EMC). The Hot Swap EMC is a managed object in the NMS OAM database. This object allows an application to access Hot Swap information using the NMS OAM service.

## Hot Swap manager

The Hot Swap manager maintains the states of all the Hot Swap boards in the resource host. Under Windows, the Hot Swap manager is a native service.

The Hot Swap manager coordinates the insertion and extraction of boards and informs applications through the NMS OAM service of the corresponding state of the Hot Swap boards. The NMS OAM service uses the Hot Swap manager to know when to load CompactPCI boards.

The Hot Swap manager also provides the interface between applications and device drivers that monitor Hot Swap boards.

## Hot Swap driver

The Hot Swap driver handles board-independent aspects of interfacing with the Hot Swap hardware. The board device driver handles board-specific Hot Swap duties.

The Hot Swap driver contains different kernel drivers depending on the operating system, as described in the following table:

Operating system | Kernel drivers
--- | ---
Windows | Hot Swap hardware driver HS Register miniport drivers PCI bus filter driver For details, refer to Hot Swap driver under Windows.
Solaris | PCI BIOS driver Hot Swap hardware driver Resource manager driver The Hot Swap driver service coordinates these drivers. For details, refer to Hot Swap driver under Solaris.
Linux | Windrvr6 The Hot Swap manager communicates with Windrvr6, using the Hot Swap libraries. For details, refer to Hot Swap driver under Linux.

The Hot Swap driver handles the hardware and the Hot Swap manager handles the software. The following table lists various Hot Swap tasks and the components responsible for each task.

Task | Component
--- | ---
Monitoring HS_CSR | Hot Swap driver
Tracking the arrival and departure of Hot Swap capable boards | Hot Swap driver
Setting the board's Hot Swap LED | Hot Swap driver
Handling PCI configuration of inserted boards | Plug and play driver (Windows) Hot Swap driver (Solaris and Linux)
Handling the de-configuration of any boards being prepared for extraction | Plug and play driver (Windows) Hot Swap driver (Solaris and Linux)
Detecting when all channels are closed on the board | Board device driver

### Hot Swap driver under Windows

Under Windows, you must install the NMS Hot Swap Kit (HSK) for Hot Swap to operate. The HSK is included with Natural Access, but is not installed automatically by the installation program. For more information, refer to the Natural Access installation booklet.

### Hot Swap driver under Solaris

The following illustration shows the Hot Swap driver architecture under Solaris:

The following table describes the Hot Swap Solaris components:

Driver | Description
--- | ---
Resource manager driver | Implements the interface to the operating system resource database (such as resmgr, registry, device tree). Requests information about the current system configuration, allocated memory, and IRQs. Updates the resource database in conjunction with insertions and extractions.
PCI BIOS driver | Enables access to the PCI BIOS (or PCI BIOS-like) functions. Enables PCI configuration space read and write operations.
Hot Swap hardware driver | Implements the interface to the Hot Swap hardware (such as ENUM, on board HS_CSR). Uses the HSBIOS driver to access PCI configuration space.

### Hot Swap driver under Linux

Under Linux, the Hot Swap driver is part of the NMS driver packages. After Natural Access is installed, use the following command to set up the Hot Swap driver and HotSwap.emc. This command also starts the Hot Swap manager as a daemon.

The following command configures the Hot Swap driver to load automatically, on subsequent reboots of the host.

# /opt/nms/hotswap/bin/hsmgr_startup start

The following command starts the Hot Swap manager (as a daemon) on subsequent reboots of the host.

# /opt/nms/hotswap/bin/hsmstart start

The following command stops the Hot Swap manager:

# /opt/nms/hotswap/bin/hsmstart stop

The following command unloads and disables automatic loading of the Hot Swap driver on subsequent host booting:

# /opt/nms/hotswap/bin/hsmgr_startup stop