# Configuring Hot Swap

Hot Swap functionality is an integral part of NMS OAM. It is designed for use with CompactPCI Hot Swap-compliant boards. It is supported on Windows and UNIX systems.

This topic provides the following information:

- Hot Swap-compatible boards

- Hot Swap EMC

- Hot Swap platform requirements

- Configuring Hot Swap under Windows

- Configuring Hot Swap under Solaris

- Configuring Hot Swap under Linux

## Hot Swap-compatible boards

A Hot Swap-compatible board includes a switch built into the ejector handle and a front panel Hot Swap LED. When you insert a board into the system, the switch signals that the board is fully seated with the handle closed and that the software connection can be initiated. When you remove a board, the switch signals that the board is being extracted and that the software disconnection can be initiated.

When lit, the Hot Swap LED indicates that the software disconnection is complete and extraction is permitted. You can open the handle the rest of the way and eject the board.

The PCI interface for NMS Hot Swap-compatible CompactPCI boards includes the Hot Swap control and status register (HS_CSR). The PCI interface is responsible for management of the ejector handle switches and the Hot Swap LED.

The following illustration shows the ejector handles and Hot Swap LED on an AG 4040C board:

## Hot Swap EMC

Hot Swap is implemented as an extended management component (EMC). The Hot Swap EMC:

- Automatically stops a CompactPCI board prior to its physical removal from the chassis.

- Automatically starts a board when it is physically installed in the chassis (if supported). Board automatic starting is controlled by configuration keywords. Refer to Starting boards automatically for more information.

- Makes alerts and other messages related to Hot Swap available to client applications.

The Hot Swap EMC communicates with the Hot Swap manager and driver to perform Hot Swap operations. The Hot Swap manager and driver must be started in order for Hot Swap operations to work. To learn how to start these components, refer to Starting Hot Swap.

Note: Hot Swap is supported only by CompactPCI boards, but some CompactPCI boards do not support Hot Swap. Removing a board that does not support Hot Swap functionality while the system is running can cause serious damage to the board and to the system. To determine if a board model supports Hot Swap, refer to the documentation for the board.

## Hot Swap platform requirements

Hot Swap development requires an Intel or SPARC CompactPCI-compliant platform that conforms to the following specifications:

- PICMG 2.0 Revision 2.1 CompactPCI

- PICMG 2.1 Revision 1.0 CompactPCI Hot Swap (Hot Swap platform)

- PCI BIOS Revision 2.1 (PCI BIOS services are used to manage interrupt assignments for hot-inserted boards.)

- PICMG 2.5 Revision 1.0 CompactPCI Computer Telephony (If the H.110 bus is not present, the CompactPCI board will not power up.)

## Configuring Hot Swap under Windows

To configure Hot Swap under Windows:

Step | Description
1 | Install the Hot Swap Kit during the Natural Access installation. For more information about install the Hot Swap Kit, refer to the Natural Access installation booklet. Note: If you do not install the Hot Swap Kit, inserting or removing an NMS CompactPCI board while the system is running can damage the chassis or the board.
2 | Shut down your system and turn the power off.
3 | Remove all NMS CompactPCI boards from the system.
4 | Power up the system and log in as a user with administrative privileges.
5 | Run the HSK Wizard once for each system slot processor. Refer to Running the HSK Wizard for more information.

### Running the HSK Wizard

The Hot Swap Kit Wizard performs two functions:

- Determines the logical slot number for each physical peripheral slot in a CompactPCI chassis. A slot path identifies each physical slot.

- Adjusts the resources assigned to the CompactPCI bridges in the system at boot time so that boards can be inserted and extracted while the system is running. The new resource allocations are stored in the registry and become effective whenever the system is booted.

This resource adjustment is important because, by default, CompactPCI bridge memory windows are initialized to be just big enough for devices physically installed at boot time. Unless the wizard is run to set up a different configuration, only boards physically installed at boot time can be hot swapped in and out.

The wizard prompts you for the number of slots in the chassis. It then asks you to insert a board in each slot. When you insert the board, the wizard locates the board and maps the logical slot number to the physical slot. It then asks you to remove the board and insert it in another slot, and repeats the process.

Configure each system slot processor in the system separately. If the CompactPCI bus is divided into multiple segments controlled by separate CPUs, you must run the wizard separately for each CPU. In this case, the slot numbers indicated on the chassis may not match the slot numbers indicated in the wizard.

You can use any NMS Hot Swap-compatible board in the configuration process.

To use the HSK Wizard:

Step | Description
1 | Launch the HSK Wizard by selecting Start->Programs->Hot Swap Kit-> HSK Wizard. The Slot count dialog box appears.
2 | Enter the total number of slots contained in the chassis including slots occupied by system components. Click Next. The Please insert board dialog box appears.
3 | Insert a board into the specified slot, and close the ejector handles. If you cannot insert the board because the specified slot is a system slot, select I can’t insert board because this is a system slot. If your CompactPCI bus is divided into multiple segments, the slot numbers indicated on the chassis may not match the slot numbers indicated in the wizard. In this case, you must determine which slots belong to the segment. When prompted for physical slot 1, use the left-most peripheral slot in the segment. When prompted for physical slot 2, use the slot to the right of this slot, and so on.
4 | Click Next. If you selected I can’t insert board because this is a system slot, the Please insert board dialog box appears prompting you to insert a board in another slot. Repeat step 3 for the new slot. Otherwise, the wizard searches the CompactPCI bus and associates the specified slot number with the slot currently containing the board. The Please extract board dialog box appears.
5 | Open the board’s ejector handles. After a moment, the Hot Swap LED on the board lights.
6 | When the Hot Swap LED lights, extract the board. If you remove the board before the LED lights, you can damage the chassis or the board.
7 | Click Next.
8 | Repeat steps 3 through 7 for each slot in the system. Continue inserting and extracting boards as directed by the wizard. After you have inserted and extracted a board from every slot, the Review dialog box displays the settings for each physical slot.
9 | Click Finish. A dialog box displays a prompt to save your changes to the registry.
10 | If you are satisfied with your changes, click Yes. Otherwise, click No and run the wizard again.

### Windows Hot Swap Kit utilities

You can make modifications to the Hot Swap configuration and monitor Hot Swap activity using the following utilities installed with the Hot Swap Kit:

Utility | Description
Hot Swap Kit Configuration | Changes the default mapping between physical PCI slot numbers and logical slot numbers. Changes the default resource assignments for slots. Modifies the PCI configuration space polling rate. Modifies the software disconnection timeout. Specifies alternate HS_CSR drivers.
Slot Information | Retrieves current information about boards installed in a CompactPCI system.

To access a utility, select Start->Programs->Hot Swap Kit and select the utility in the menu. For more information about a specific utility, start the utility and press F1.

## Configuring Hot Swap under Solaris

To allow hot swapping of boards in a CompactPCI Solaris system, adequate address space must be preconfigured. To maximize the number of slots available for hot swapping:

- Have all slots populated at boot time, or

- Have no slots populated at boot time.

To learn more about how to allocate space for hot swapping on Solaris systems, refer to Configuring PCI bus address space for Hot Swap (Solaris).

## Configuring Hot Swap under Linux

On Linux hosts, the Hot Swap kernel module allocates and de-allocates memory for inserted or removed boards. The NMS Hot Swap software is located in the following directory: /opt/nms/hotswap/bin. The libraries are located in the following directory: /opt/nms/lib.

The following command installs the Hot Swap driver (kernel module) and starts the Hot Swap manager as a daemon:

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

The following command can uninstall the Hot Swap driver. This command stops the Hot Swap manager if it is running:

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

The following command stops the Hot Swap manager:

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

On subsequent boots of the host (after the Hot Swap driver is installed), the following command starts the Hot Swap manager as a daemon:

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