Summary of Contents for Sun Microsystems Netra CP2000 Series
Page 1
Netra™ CP2000 and CP2100 Series CompactPCI Boards Programming Guide for the Solaris Operating Environment Sun Microsystems, Inc. www.sun.com Part No. 816-2485-14 October 2004, Revision A Submit comments about this document at: http://www.sun.com/hwdocs/feedback...
Page 2
Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, Etats-Unis. Tous droits réservés. Sun Microsystems, Inc. a les droits de propriété intellectuels relatants à la technologie incorporée dans le produit qui est décrit dans ce document. En particulier, et sans la limitation, ces droits de propriété intellectuels peuvent inclure un ou plus des brevets américains énumérés à...
Contents Watchdog Timer 1 Watchdog Timers 1 Watchdog Timer Driver 2 Operations on the Watchdog Timers 3 Parameters Transfer Structure 3 Input/Output Controls 7 Errors Example 8 Configuration 10 OpenBoot PROM Interface 11 Data Structure 12 Watchdog Operation 12 Commands at OpenBoot PROM Prompt 12 Corner Cases 13 Setting the Watchdog Timer at OpenBoot PROM 13 User Flash 15...
Page 4
User Flash Driver 19 Switch Settings 19 OpenBoot PROM Device Tree and Properties 20 User Flash Packages 20 User Flash Device Files 21 Interface (Header) File 21 Application Programming Interface 21 Structures to Use in IOCTL Arguments 22 Errors 23 Example Programs 23 Sample User Flash Application Program 33 Advanced System Management 41...
Page 5
ASM Application Programming 68 Specifying the ASM Polling Rate 69 Monitoring the Temperature 69 Solaris Driver Interface 69 Sample Application Program 71 Temperature Table Data 73 System Configuration and Test Equipment 73 Thermocouple Locations 74 Programming the User LED 75 Files and Packages Required to Support the Alarm/User LED 77 Applications 77 Application Programming Interface (API) 78...
Page 6
Reconfiguration Coordination Manager (RCM) Overview 100 Using RCM with the Netra CP2100 Series CompactPCI Board 100 Using RCM to Work With the Intel 21554 Bridge Chip 102 RCM Script Example 103 Testing the RCM Script Example 105 Avoiding Error Messages When Extracting Devices in Basic Hot-Swap Mode 107 Index 109 Netra CP2000 and CP2100 Series cPCI Boards Programming Guide •...
Page 7
Figures Typical Netra CP2000/CP2100 Series ASM Application Block Diagram 49 FIGURE 3-1 Location of ASM Hardware on the Netra CP2040/CP2140 Board 55 FIGURE 3-2 Location of ASM Hardware on the Netra CP2060 Board 56 FIGURE 3-3 Location of ASM Hardware on the Netra CP2080 Board 57 FIGURE 3-4 Location of ASM Hardware on the Netra CP2160 Board 58 FIGURE 3-5...
Page 8
viii Netra CP2000 and CP2100 Series cPCI Boards Programming Guide • October 2004...
Page 9
Tables OpenBoot PROM Prompt Commands 18 TABLE 1-1 User Flash Implementation 22 TABLE 2-1 Compatible Releases That Support the User Flash Driver 23 TABLE 2-2 User Flash Node Properties 26 TABLE 2-3 System Calls 27 TABLE 2-4 Compatible Netra CP2000/CP2100 Series ASM Components 48 TABLE 3-1 Typical Netra CP2060 Hardware ASM Functions 52 TABLE 3-2...
Page 10
Netra CP2000 and CP2100 Series cPCI Boards Programming Guide • October 2004...
Page 11
Code Samples Include File wd_if.h 10 CODE EXAMPLE 1-1 Status of Watchdog Timers and Starting Timers 14 CODE EXAMPLE 1-2 PROM Information Structure 28 CODE EXAMPLE 2-1 User Flash Interface Structure 28 CODE EXAMPLE 2-2 Read Action on User Flash Device 30 CODE EXAMPLE 2-3 Write Action on User Flash Device 32 CODE EXAMPLE 2-4...
Page 12
Netra CP2000 and CP2100 Series cPCI Boards Programming Guide • October 2004...
Page 13
Preface The Netra ™ CP2040, Netra CP2060 and Netra CP2080, Netra CP2140 and Netra CP2160 CompactPCI boards are a crucial building block that network equipment providers (NEPs) and carriers can use when scaling and improving the availability of next-generation, carrier-grade systems. The Netra CP2000 and CP2100 Series cPCI Boards Programming Guide is written for program developers and users who want to program these products in order to design original equipment manufacturer (OEM) systems, supply additional...
Page 14
How This Book Is Organized Chapter 1 provides details on the Netra CP2000 board and the CP2100 board series watchdog timer driver and its operation. Chapter 2 describes the user flash driver for the Netra CP2000 board series and the CP2100 board series onboard flash PROMs and how to use it.
Page 15
Typographic Conventions Typeface Meaning Examples The names of commands, files, Edit your.login file. AaBbCc123 and directories; on-screen Use ls -a to list all files. computer output % You have mail. What you type, when contrasted AaBbCc123 with on-screen computer output Password: AaBbCc123 Book titles, new words or terms,...
Page 16
Related Documentation Application Title Part Number Reference and Installation Netra CP2060/CP2080 Technical Reference 806-6658-xx and Installation Manual Reference and Installation Netra CP2040 Technical Reference and 806-4994-xx Installation Manual Reference and Installation Netra CP2140 Technical Reference and 816-4908-xx Installation Manual Reference and Installation Netra CP2160 CompactPCI Board 816-5772-xx Installation and Technical Reference...
C H A P T E R Watchdog Timer The System Management Controller (SMC) on the Netra CP2000/CP2100 board, implements a two-level watchdog timer. The watchdog timer is used to recover the central processing unit (CPU) in case the CPU freezes. This chapter provides detailed information on the SMC-based watchdog timer driver and its operation for the Netra CP2000/CP2100 boards.
16-bit Timer (WD1) Each tick represents 100 ms. This timer, set to a nonzero number, counts down first. When the timer reaches zero, a warning is sent to the host CPU through EBus and the WD2 pre-timeout counter is set to a nonzero value when interrupt option is enabled.
Operations on the Watchdog Timers Operations on the watchdog timers require a call to ioctl(2) using the parameters appropriate to the operation. The watchdog driver exports Input Output Controls (IOCTLs) to start, stop, and get the current status of the watchdog timers. When the device is initially opened, both the watchdog timers, WD1 and WD2, are in STOPPED state.
Page 21
Include File w (Continued) d_if.h CODE EXAMPLE 1-1 typedef struct { thr_fd; /* wd fd, used in the thread */ uint8_t thr_lock; /* lock for the thread */ uint8_t level; /* wd level */ uint16_t count; /* value to be loaded into limit reg */ uint16_t next_count;...
Page 22
(Optional) The period for the timer specified by restart to run next_count before it expires. The next_count parameter is subject to the same range and default value rules as count, described above. This is a mechanism for controlling the action taken by a timer inhibit when it expires.
Input/Output Controls The watchdog timer driver supports the following input/output control (IOCTL) requests: Get the state of all the watchdog timers. If the level field of the WIOCGSTAT watchdog_if_t structure is a valid value (either WD1 or WD2), the WIOCGSTAT IOCTL returns the status of both timers in the status vector or the structure.
Errors An application program attempted to perform an open(2) on EBUSY /dev/wd but another application already owned the device. An invalid pointer to a watchdog_if_t structure was passed as a EFAULT parameter to ioctl(2). The IOCTL command passed to the driver was not recognized. EINVAL The level parameter of the watchdog_if_t structure is set to an invalid value.
Page 25
Status of Watchdog Timers and Starting Timers (Continued) CODE EXAMPLE 1-2 * get the status of the timers wdog1.level = WD1; /* must be a valid value */ if (ioctl(fd, WIOCGSTAT, &wdog1) < 0) { perror("WIOCGSTAT ioctl failed"); exit(0); printf("Status WD1: 0x%x WD2: 0x%x\n", wdog1.status[0], wdog1.status[1]);...
Status of Watchdog Timers and Starting Timers (Continued) CODE EXAMPLE 1-2 exit(0); * loop, restarting the timers to prevent RESET for (;;) { watchdog_if_t wstat; * first sleep for the desired period * before restarting the timer(s) sleep(rperiod); * setup to get the status of the timers wstat.level = WD1;/* must be a valid value */ if (ioctl(fd, WIOCGSTAT, &wstat) <...
SUNW, UltraSPARCengine_CP-40 (for Netra CP2040 and CP2140) ■ SUNW, UltraSPARCengine_CP-60 (for Netra CP2060 CP2160) ■ SUNW, UltraSPARCengine_CP-80 (for Netra CP2080) ■ By rule, the watchdog driver and its configuration file must reside in the platform- specific driver directory, /platform/implementation/kernel/drv. The value of implementation for a given Netra CP2000/CP2100 board system can be obtained by running the uname(1) command on that machine with the -i option: # uname -i...
If watchdog-enable? is set to false,the watchdog timer is disabled at boot time,. Once the kernel is booted, applications have the option to start the watchdog timer. If watchdog-enable? is set to true, the watchdog timer is enabled at boot time with its default actions: The WD1 timer is controlled by the value in watchdog-timeout variable.
Corner Cases When watchdog reset occurs, the power module is toggled. Thus, the state of the CPU, except those stored in nonvolatile memory, will be lost. Once watchdog reset occurs after the host CPU is restarted, the host CPU must restart the watchdog timer. The host CPU must perform a corner case.
Page 30
▼ To Set the Watchdog Timer With Pre-Timeout Time This procedure sets the reload values of countdown timer and pre-timeout timer. Following the Level 1 expiry, there are 80 seconds before the reset action. 1. Set the timer to 80 seconds = 0x50. Set the countdown value to 10 minutes, as in the previous procedure, and set the pre-timout timer to 80 seconds.
C H A P T E R User Flash This chapter describes the user flash driver for the onboard flash PROMs and how to use it. The Netra CP2000/CP2100 series boards are equipped with user flash memory. This chapter includes the following sections: “User Flash Usage and Implementation”...
The user flash includes flash PROM chips that can be programmed by users (see TABLE 2-1 User Flash Implementation TABLE 2-1 CompactPCI Board Implementation Total Memory Size Netra CP2040 Two user flash modules 2 X 4MB Netra CP2060 One user flash module 1 x 4 MB Netra CP2080 One user flash module...
System Compatibility lists the compatible releases that support the user flash driver. TABLE 2-2 Compatible Releases That Support the User Flash Driver TABLE 2-2 CompactPCI Board Component Compatible Release Netra CP2060 Hardware All board versions OpenBoot PROM OpenBoot PROM Release 4.0.45 SMC Firmware Release 3.10.5 FPGA Version 1.2 PLD Version 4.2...
Page 34
Compatible Releases That Support the User Flash Driver TABLE 2-2 CompactPCI Board Component Compatible Release Netra CP2040 Hardware All board versions OpenBoot PROM Release 4.0.27 SMC Firmware Release 3.4.4 FPGA Version 1.0 PLD Version 1.2 All the above versions or other versions that support this feature Operating environment...
User Flash Driver The uflash is the device driver for flash PROM devices on the Netra CP2000/CP2100 series boards. Access to the driver is carried out through open, read, write, pread, pwrite and ioctl system interfaces. Depending on the platform, one or more of these devices are supported. There is one logical device file for each physical device that can be accessed from applications.
OpenBoot PROM Device Tree and Properties This section provides information on the user flash OpenBoot PROM device node and its properties. User flash OpenBoot PROM device node: /pci@1f,0/pci@1,1/ebus@1/flashprom@10,800000 /pci@1f,0/pci@1,1/ebus@1/flashprom@10,400000 for the user flash node properties. TABLE 2-3 User Flash Node Properties TABLE 2-3 Property Description/Value...
User Flash Device Files The user flash device files are as follows: /dev/uflash0—Netra CP2060, Netra CP2080, and Netra CP2160 ■ /dev/uflash0, /dev/uflash1—Netra CP2040 ■ /dev/uflash0, /dev/uflash1—Netra CP2140 ■ Interface (Header) File The user flash header file is located in the following path: /usr/include/sys/uflash_if.h Application Programming Interface Access to the user flash device from the Solaris operating environment is through a...
#define UIOCEBLK (uflashIOC|5) /* erase a block */ #define UIOCEALL (uflashIOC|6) /* erase all unlocked blocks */ #define UIOCEFUL (uflashIOC|7) /* erase full chip */ Structures to Use in IOCTL Arguments PROM Information Structure The PROM information structure holds device information returned by the driver in response to an identify command.
User Flash Interface Structure CODE EXAMPLE 2-2 num_of_blks; uflash_info_t info; /* to be filled by the driver */ } uflash_if_t; Errors Application passed one or more incorrect arguments to the system EINVAL call. Write or Erase operation was attempted on a locked block. EACCESS A hardware malfunction has been detected.
Page 40
Read Example Program contains the Read Action on the user flash device. CODE EXAMPLE 2-3 Read Action on User Flash Device CODE EXAMPLE 2-3 * uflash_read.c * An example that shows how to read user flash #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h>...
Page 41
Read Action on User Flash Device (Continued) CODE EXAMPLE 2-3 ufd0 = 0; if (ufd1 == -1) ufd1 = 0; /* get uflash sizes */ if (ufd0 && ioctl(ufd0, UIOCIBLK, &ufif0) == -1 ) { perror("ioctl(ufd0, UIOCIBLK): "); exit(1); if (ufd1 && ioctl(ufd1, UIOCIBLK, &ufif1) == -1 ) { perror("ioctl(ufd1, UIOCIBLK): ");...
Page 42
Read Action on User Flash Device (Continued) CODE EXAMPLE 2-3 if (pread(ufd0, buf0, ufd0.info.blk_size, 0) != ufd0.info.blk_size) perror("uflash0:read"); /* read block 1 of user flash 1 */ if (pread(ufd1, buf1, ufd1.info.blk_size, ufd0.info.blk_size) != ufd1.info.blk_size) perror("uflash1:read"); return(0); main() { int ret; module = argv[0];...
Page 43
Write Action on User Flash Device (Continued) CODE EXAMPLE 2-4 static int uflash_init() { char *buf0 = malloc(ufd0.info.blk_size); char *buf1 = malloc(ufd1.info.blk_size); if (!buf0 || !buf1) { printf("%s: cannot allocate memory\n", module); return(-1); /* open device(s) */ if ((ufd0 = open(uflash0, O_RDWR)) == -1 ) { perror("uflash0: ");...
Page 44
Write Action on User Flash Device (Continued) CODE EXAMPLE 2-4 printf("number of blocks = 0x%p", ufd1.info.blk_num); printf("block size = 0x%p" ufd1.info.blk_size); static int uflash_uninit() { if (ufd0) close(ufd0); if (ufd1) close(ufd1); cleanup: if (buf0) free(buf0); if (buf1) free(buf1); static int uflash_write() { int i;...
Page 45
Erase Example Program contains the Erase Action on the User Flash Device. CODE EXAMPLE 2-5 Erase Action on User Flash Device CODE EXAMPLE 2-5 * uflash_erase.c * An example that shows how to erase user flash #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h>...
Page 46
Erase Action on User Flash Device (Continued) CODE EXAMPLE 2-5 if (ufd1 && ioctl(ufd1, UIOCIBLK, &ufif1) == -1 ) { perror("ioctl(ufd1, UIOCIBLK): "); exit(1); if (ufd0) { printf("%s: \n", uflash0); printf("manfacturer id = 0x%p\n", ufd0.info.mfr_id); printf("device id = 0x%p\n", ufd0.info.dev_id); printf("number of blocks = 0x%p", ufd0.info.blk_num);...
Page 47
Erase Action on User Flash Device (Continued) CODE EXAMPLE 2-5 ret = uflash_init(); if (!ret) uflash_erase(); uflash_uninit(); Block Erase Example Program contains the Block Erase Action on the user flash device. CODE EXAMPLE 2-6 Block Erase Action on User Flash Device CODE EXAMPLE 2-6 * uflash_blockerase.c * An example that shows how to erase block(s) of user flash...
Page 48
Block Erase Action on User Flash Device (Continued) CODE EXAMPLE 2-6 ufd0 = 0; if (ufd1 == -1) ufd1 = 0; /* get uflash sizes */ if (ufd0 && ioctl(ufd0, UIOCIBLK, &ufif0) == -1 ) { perror("ioctl(ufd0, UIOCIBLK): "); exit(1); if (ufd1 &&...
Block Erase Action on User Flash Device (Continued) CODE EXAMPLE 2-6 printf("\nblockerase successful on %s\n", uflash0); /* erase 4 blocks starting from block 5 of user flash 1 */ uf1.blk_num = 5; uf1.num_of_blks = 4; if (ufd1 && ioctl(ufd1, UIOCEBLK, &ufd1) == -1 ) { perror("ioctl(ufd1, UIOCEBLK): ");...
Page 50
Sample User Flash Application Program (Continued) CODE EXAMPLE 2-7 erase whole PROM Please note that not all of the above ioctl calls are available for all flash PROMs. It is the user’s responsibility to find out the features of a given PROM. The type, block size, and number of blocks of the PROM are returned by *"identify"...
Page 51
Sample User Flash Application Program (Continued) CODE EXAMPLE 2-7 "0 -- read user flash PROM", "1 -- write user flash PROM", "2 -- identify user flash PROM", "3 -- query blocks", "4 -- lock blocks", "5 -- master lock", "6 -- clear all locks", "7 -- erase blocks",...
Page 52
Sample User Flash Application Program (Continued) CODE EXAMPLE 2-7 r_buf = (caddr_t)malloc(PROM_SIZE); w_buf = (caddr_t)malloc(PROM_SIZE); * Open the user flash PROM #0. if ((fd0 = open(devname0, O_RDWR)) < 0) { fprintf(stderr, "couldn’t open device: %s\n", devname0); exit(1); * Open the user flash PROM #1. if ((fd1 = open(devname1, O_RDWR)) <...
Page 53
Sample User Flash Application Program (Continued) CODE EXAMPLE 2-7 case ’a’:/* switch PROM */ fd = (fd == fd0)? fd1: fd0; prom_id = (prom_id == 1)? 0: 1; break; case ’9’: /* erase the whole flash PROM */ fprintf(stderr, "Are you sure?[y/n]"); scanf ("%c", &c);...
Page 54
Sample User Flash Application Program (Continued) CODE EXAMPLE 2-7 break; case ’5’: /* master lock */ /* on certain PROMs */ if (ioctl(fd, UIOCMLCK, &uflash_if) == -1) goto getout; break; case ’4’: /* lock flash PROM block */ /* on certain PROMs */ fprintf(stderr, "Enter PROM block number[0, 31]>...
Page 55
Sample User Flash Application Program (Continued) CODE EXAMPLE 2-7 case ’2’: /* identify flash PROM */ if (ioctl(fd, UIOCIBLK, &uflash_if) == -1) goto getout; fprintf(stderr, "manufacturer id = 0x%x, device id 0x%x\n# of blks = %d, blk size = 0x%x\n", uflash_if.info.mfr_id &...
Page 56
Sample User Flash Application Program (Continued) CODE EXAMPLE 2-7 fprintf(stderr, "Enter PROM offset[0, 0xXX,XXXX]> "); scanf ("%x", &offset); fprintf(stderr, "Enter number of bytes[hex]> "); scanf ("%x", &size); getchar();/* clean up the char buf */ n_byte = pread (fd, r_buf, size, offset); if (n_byte != size) { /* the read failed */ printf ("Read process was failed at \...
C H A P T E R Advanced System Management Advanced System Monitoring (ASM) is an intelligent fault detection system that increases uptime and manageability of the board. The System Management Controller (SMC) module on the Netra CP2000/CP2100 series supports the temperature monitoring functions of ASM.
ASM Component Compatibility lists the compatible ASM hardware, OpenBoot PROM, and Solaris TABLE 3-1 operating environment for the Netra CP2000/CP2100 series. Compatible Netra CP2000/CP2100 Series ASM Components TABLE 3-1 Component ASM Compatibility Hardware All board versions support ASM OpenBoot PROM ASM is supported by OpenBoot PROM.
The Netra CP2000/CP2100 series functions as a system controller board or as a satellite board in a CompactPCI system rack. The Netra CP2000/CP2100 series board monitors its CPU-vicinity temperature and issues warnings at both the OpenBoot PROM and Solaris operating environment levels when these environmental readings are out of limits.
ASM Protection at the Operating Environment Level Monitoring changes in the ASM temperatures can be a useful tool for determining problems with the room where the system is installed, functional problems with the system, or problems on the board. Establishing baseline temperatures early in deployment and operation could be used to trigger alarms if the temperatures from the sensors increase or decrease dramatically.
changes in average readings). Or, an OEM can communicate the occurrence of an unusual condition to a specialized management network using the Netra CP2000/CP2100 series board Ethernet port. Refer to “Sample Application Program” on page 71 for an example of how a simple ASM monitoring program can be implemented.
Page 63
Note that in the readings for the SDRAM modules show the TABLE 3-2 TABLE 3-3 sensor readings as currently unavailable because the tables list information of a typical Netra board that does not support memory modules. Typical Netra CP2060 Hardware ASM Functions TABLE 3-2 Function Capability...
* This reading would be available on a typical Netra board that supports memory modules. Local I C Bus TABLE 3-4 Function Device C Multiplexer PCA9540 CPU-vicinity temperature MAX1617 Inlet 1 MAX1617 Exhaust 1 MAX1617 Exhaust 2 MAX1617 General I/O PCF8574 FRU ID AT24C64 EEPROM...
Power module temperature sensor (located on underside of the power PMC temperature sensor module) Memory onboard Heat sink temperature temperature sensor sensor Memory module temperature sensor (on the module) Location of ASM Hardware on the Netra CP2040/CP2140 Board FIGURE 3-2 Chapter 3 Advanced System Management...
Power module temperature sensor (located on the underside of the Board temperature sensor power module) xxxxxx PMC temperature sensor Heat sink temperature Location of ASM Hardware on the Netra CP2060 Board FIGURE 3-3 Netra CP2000 and CP2100 Series cPCI Boards Programming Guide • October 2004...
Power module temperature sensor (located on underside of the power Board temperature sensor module) xxxxxx PMC temperature sensor Heat sink temperature Memory module temperature sensor (on the module) Location of ASM Hardware on the Netra CP2080 Board FIGURE 3-4 Chapter 3 Advanced System Management...
Exhaust 2 temperature sensor Inlet 1 temperature sensor Exhaust 1 temperature sensor Location of ASM Hardware on the Netra CP2160 Board FIGURE 3-5 Netra CP2000 and CP2100 Series cPCI Boards Programming Guide • October 2004...
is a block diagram of the ASM functions. FIGURE 3-6 Solaris UltraSPARC Device Application Operating Driver Program OEMs can write their OEMs can implement own device drivers their own monitoring PCIO and control logic OEMs can modify factory defaults EBus 12.0 volts Voltage controller...
Power On/Off Switching The onboard voltage controller allows power to the rest of the Netra CP2000/CP2100 series board only when the following conditions are met: The VDD core-1.7-volt supply voltage is greater than 1.53 volts (within 10% of ■ nominal). The 12-volt supply voltage is greater than 10.8 volts (within 10% of nominal).
Adjusting the ASM Warning and Shutdown Parameter Settings on the Board The Netra CP2000/CP2100 board uses the Advanced System Monitoring (ASM) detection system to monitor the temperature of the board. The ASM system will display messages if the board temperature exceeds the set warning and shutdown settings.
shows the sensor readings of a typical Netra CP2040 board operating in a TABLE 3-5 Sun server in a room with an ambient temperature of 21˚C. The temperature readings were reported using the show-sensors OpenBoot PROM command. Note that the reported temperatures are higher than the ambient room temperature. Reported Temperature Readings at an Ambient Room Temperature of 21˚C TABLE 3-5 on a Typical Netra CP2040 Board...
Reported Temperature Readings at an Ambient Room Temperature of 21˚C TABLE 3-6 on a Typical Netra CP2160 Board Difference Between Reported and Reported Temperatures Ambient Room Temperature (in Board Sensor Location (in Degrees Celsius) Degrees Celsius) ˚C ˚C Board exhaust air temperature #2 ˚C ˚C...
Page 74
OpenBoot PROM Warning Temperature Parameter OBP programs SMC for temperature monitoring using the sensor commands. lists the default threshold temperature settings for the CP2000/CP2100 TABLE 3-7 series boards. Default Threshold Temperature Settings TABLE 3-7 Default Threshold Temperature Settings for Netra Netra cPCI Board Boards (In Degrees Celsius) Warning...
The warning-temp global OpenBoot PROM parameter determines the temperature at which a warning is displayed. The shutdown-temperature global OpenBoot PROM parameter determines the temperature at which the system is shut down. The temperature monitoring environment variables can be modified at the OpenBoot PROM command level as shown in examples below: ok setenv warning-temperature 71 OR,:...
Page 76
NVRAM module variable name: warning-temperature ■ Function: sets the CPU warning temperature threshold ■ Data type: byte ■ Unit: decimal ■ Default value: 70 ■ OpenBoot PROM usage: ■ ok setenv warning-temperature temperature-value NVRAM module variable name : critical-temperature ■ Function: sets the CPU critical temperature threshold ■...
Warning Temperature Response at OpenBoot PROM When the CPU-vicinity temperature reaches “warning-temperature,” a similar message is displayed at the ok prompt at a regular interval: Temperature sensor #2 has threshold event of <<< WARNING!!! Upper Non-critical - going high >>> The current threshold setting is : 70 The current temperature is : 71 Critical Temperature Response at OpenBoot PROM...
OpenBoot PROM Sensor Reading Typical for a Typical Netra CP2060 Board TABLE 3-9 Sensor Name Current Reading CPU-vicinity temperature (senses the local temperature of the CPU area) PMC temperature Motherboard Heat Sink temperature Motherboard memory temperature for Netra C2060 SDRAM module#1 temperature This sensor reading is not available for Netra CP2080 SDRAM module#2 temperature...
Page 79
Note – To execute an IPMI command, at the OpenBoot PROM ok prompt, type the packets in reverse order followed by the relevant information as shown in examples in “Examples of IPMI Command Packets” on page 64. Change the bytes in the example packet to accommodate different IPMI addresses, different threshold values or different sensor numbers.
Page 80
2. Type execute-smc-cmd ( ) command at the ok prompt as follows: cmd 33 ok 0 33 execute-smc-cmd This command verifies that the target satellite board received and executed the command and sent a response. 3. Check the completion code which is the seventh byte from left. If the completion code is 0, then the target board successfully executed the command.
Page 81
checksum2 dont care upper c upper nc dont care lower critical lower nc threshold Byte to tell what is being set sensor num rqSeq/rsLUN rq Slave addr checksum1 (calculate it every time the packet is formed) NetFn/LUN rs Slave addr channel number Note –...
Page 82
checksum2 sensor num rqSeq/rsLUN rq Slave addr checksum1 (calculate it every time the packet is formed) NetFn/LUN re Slave addr channel number Get Sensor Reading A typical example of the sensor command is as follows: 93 e 2d 12 20 34 12 ba 0 9 34 execute-smc-cmd checksum2 sensor num rqSeq/rsLUN...
Page 83
checksum2 dont care dont care dont care dont care dont care Set the event enable (writing 00 instead of 80 would disable the events) sensor num rqSeq/rsLUN rq Slave addr checksum1 (calculate it every time the packet is formed) NetFn/LUN rs Slave addr channel number Get Sensor Event Enable...
checksum2 sensor num rqSeq/rsLUN rq Slave addr check1 (calculate it every time the packet is formed) NetFn/LUN re Slave addr channel number Note – The NetFN/LUN for all sensor IPMI commands is 12, which implies that the netFn is 0x04 lun= 0x2. ASM Application Programming The following sections describe how to use the ASM functions in an application program.
Currently, this driver handles only the local I C bus. On the Netra CP2000 series and the Netra CP2140 board, this driver enables the user to monitor the CPU-vicinity temperature,...
Page 86
power module temperature. On the Netra CP2160 board, th driver enables the user to monitor the CPU temperature, the Inlet 1, Exhaust 1, Exhaust 2, SDRAM module 1 and the power module temperatures. Note – The local I C bus is supported by the Solaris driver interface. Interface Summary Input Output Control with I_STR should be used to get sensor information.
Sample Application Program This section presents a sample ASM application that monitors the CPU-vicinity temperature. Please refer to /usr/platform/sun4u/include/sys/stdasm.h if you want to add support for the other six sensors in the application. Sample ASM Application Program CODE EXAMPLE 3-2 #include <stdio.h>...
Page 88
Sample ASM Application Program (Continued) CODE EXAMPLE 3-2 stdasm_data SAData; struct strioctl sioc; SAData.sensorNum = STDASM_CPU; /* Can be STDASM_PMC or any other */ SAData.scportNum = ScPort; sioc.ic_cmd = STDASM_GETSENSOR; /* Ioctl flag for asm driver */ sioc.ic_len = sizeof(stdasm_data); sioc.ic_dp = (char *)&(SAData);...
Thermocouple Locations The two thermocouples are positioned as follows: The first thermocouple is attached at the base of a fin on the CPU heat sink in the ■ center area of the heat sink so that it is directly above the CPU. The second thermocouple is placed near the bottom edge of the board to measure ■...
C H A P T E R Programming the User LED This chapter describes how to use the Alarm/User LED. The Alarm/User LED is located on the front panel of the Netra CP2100 series boards. The bi-colored LED is red and green in color (see for the location of the Alarm/User LED on the FIGURE 4-1 board front panel).
ABORT RESET ALARM/ USER READY ETHERNET microsystems CP2140-650 SWAP Illustration of a Typical Netra CP2140 Board Front Panel Showing the FIGURE 4-1 Alarm/User LED Files and Packages Required to Support the Alarm/User LED To use the Alarm/User LED feature, the user should update the firmware with the appropriate firmware version that supports this feature on the Netra board.
Note – To check the current firmware version and for instructions on how to update the firmware, refer to the technical reference manual of the Netra board that you are using. The list of packages that are required are as follows: SUNWledl: SPARC V9 64-bit C library libcp2000.so available at: ■...
Supported LED and Command Combinations for the Netra CP2160 Board TABLE 4-2 Color of LED LED_OFF LED_ON LED_SQUAREWAVE LED_HEARTBEAT † USER_LED_RED USER_LED_GREEN * When the user turns on the red LED, the green LED goes out and when the user turns out the green LED, the red LED goes out.
Compile As you compile your application, you need to use the compiler command (cc) flag -I, to include the sys/led.h file named in “Files and Packages Required to Support the Alarm/User LED” on page 77. Specify 64-bit binaries by setting the - xarch=v9 and -D__sparcv9 compiler flags.
C H A P T E R Programming Netra CP2100 Series Board Controlled Devices This chapter describes, for developers, how to create applications that can identify and control hardware devices connected to Netra CP2100 series board-controlled systems. Note – These applications are supported on the Netra CP2140 and Netra CP2160 boards when they are used with the CP2000 Supplemental CD 4.0 for Solaris 8 only.
Unknown – The device has been powered on in a slot and connected to the ■ system, but the system has not attempted to configure the device. Failed – The device has failed an attempt to be unconfigured from a slot. The ■...
The cphsc device driver exports an hsc_slotinfo_t element that has the following structure: typedef struct hsc_slotinfo { hsc_slot_state_t hsc_slot_state; hsc_dev_state_t hsc_dev_state; uint16_t hsc_devnum; uint16_t hsc_slotnum; } hsc_slotinfo_t; typedef enum {HSC_SLOT_EMPTY, HSC_SLOT_DISCONNECTED, HSC_SLOT_CONNECTED, HSC_SLOT_UNKNOWN} hsc_slot_state_t; typedef enum {HSC_DEV_CONFIG, HSC_DEV_UNCONFIG, HSC_DEV_UNCONFIG_FAILED, HSC_DEV_UNKNOWN} hsc_dev_state_t; Where the state of a chassis’s CompactPCI slot (hsc_slot_state_t) can be: HSC_SLOT_EMPTY –...
Page 100
Creating a Header File for the HSIOC_GET_INFO ioctl() To make full use of the HSIOC_GET_INFO ioctl(), create a header file containing the required preprocessing directives and macros (see ). After CODE EXAMPLE 5-1 creating the header file, include the file in any application that uses the ioctl(). HSIOC_GET_INFO ioctl() Header File CODE EXAMPLE 5-1 * HSIOC_GET_INFO ioctl() Header File...
Page 101
Using the HSIOC_GET_INFO ioctl() This ioctl() has one argument, arg, which is a pointer to an hsc_gi_arg_t structure. The first field of hsc_gi_arg_t is a pointer to user-allocated storage; the second field is a pointer to the size of this storage in bytes. hsc_gi_arg_t arg;...
Page 102
, a pseudo function finds the device type information for a CODE EXAMPLE 5-2 given slot number (hsc_slotnum) and device number (hsc_devnum). The paragraphs that follow describe how you might implement this CODE EXAMPLE 5-2 function in your application. Using cphsc to Find Device Type Information CODE EXAMPLE 5-2 int n;...
The attachment points (slots) are represented as minor nodes of the CompactPCI bus node. The minor number of these nodes corresponds to the PCI device number. This is not a true device tree node because it represents a receptacle rather than the occupant itself.
Page 104
1. Call the di_init() function to retrieve a snapshot of the kernel device tree starting from the top (root node denoted by “/”). For example: root = di_init("/", DINFOSUBTREE | DINFOPROP | DINFOMINOR) 2. Call the di_walk_minor() function, starting from the root node, to find the attachment point node with a minor node whose minor number is equal to the PCI device number under question.
High Availability Signal Support Using high availability (HA) signal support, you can write your application to control which CompactPCI slots in an HA chassis are powered on. Before your application can control these signals, you must first set two Netra CP2140 series board OpenBoot™...
The poweron-vector configuration variable is an 8-bit bit-vector that indicates which CompactPCI slots will be powered on during the chassis power-on. By setting this variable, you set which slots in the chassis will be powered on. Note – You can use the poweron-vector variable only when the ha-signal-handler variable is set to 1.
Page 107
An 8-bit bit-vector represents all the slots within an 8-slot HA CompactPCI chassis. The SBC and the standby SBC (SSBC) are reserved slots in an HA chassis and are not counted in the 8-bit bit-vector. See for the bit number to slot number TABLE 5-1 sequencing.
To set the HA signal state, use the HSIOC_SETHASIG ioctl() as follows: hsc_ha_sigstate_t arg; ioctl(cphscfd, HSIOC_SETHASIG, &arg); Note – Only the bdsel and reset fields in the hsc_ha_sigstate_t structure are writable. The other fields are ignored. Bringing a Slot Online Note –...
Page 109
Slot 5’s BDSEL# signal is asserted after the HSIOC_SETHASIG ioctl() is executed, as follows: arg.bdsel = 0xf7 arg.healthy = 0xff arg.reset ioctl(cphscfd, HSIOC_SETHASIG, &arg) Use the HSIOC_GETHASIG ioctl() to poll the HA signals until slot 5 asserts a HEALTHY# signal. The condition to wait for is: (arg.healthy &...
After a board is successfully removed from the chassis, the slot containing this board should have its BDSEL# and RESET# signals set to 1 so that future hot-swap insertions will be detected within this slot. Hot-Swap HA Signal States for a Single CompactPCI Slot TABLE 5-2 BDSEL HEALTHY...
Page 111
boards installed in them. If both slots 5 and 7 assert the BDSEL# signal, the value for the bdsel bit-vector (used with the HSIOC_SETHASIG ioctl()) should be the complement of 0xa8 (or 0x57). You can also use the healthy bit-vector as a guide to setting the bdsel bit-vector. Any bit set in the healthy bit-vector indicates that the HEALTHY# signal is de-asserted, and that the board should not be powered on unless the board was already powered on and then became unhealthy for some reason.
For example, to de-assert the RESET# signal for slots 5 and 7, you would do the following: hsc_ha_signal_t arg; ioctl(cphscfd, HSIOC_GETHASIG, &arg); /* get current values */ arg.bdsel = arg.healthy; /* BDSEL set to HEALTHY */ arg.reset |= 0x28; /* de-assert reset for slot 5 and 7 */ ioctl(cphscfd, HSIOC_SETHASIG, &arg);...
Page 113
Netra CP2100 Series Software Header File CODE EXAMPLE 5-3 * Binary definition of the HSIOC_* ioctl()s #define _HSIOC (’h’ << 8) #define HSIOC_GET_INFO (_HSIOC | 1) /* get hsc_slot_t table */ #define HSIOC_GETHASIG (_HSIOC | 8) /* get ha signal state */ #define HSIOC_SETHASIG (_HSIOC | 9) /* set ha signal state */...
Page 114
Netra CP2000 and CP2100 Series cPCI Boards Programming Guide • October 2004...
C H A P T E R Reconfiguration Coordination Manager This document describes how you can use Reconfiguration Coordination Manager scripts to automate certain dynamic reconfiguration processes when a Netra CP2000/CP2100 series board is used as a system controller. Note – The Reconfiguration Coordination Manager scripts are supported on the Netra CP2140 and Netra CP2160 boards when they are used with the CP2000 Supplemental CD 4.0 for Solaris 8 only.
Page 116
Reconfiguration Coordination Manager (RCM) Overview Beginning with the Solaris 8 2/02 release, the Solaris operating environment provides a Reconfiguration Coordination Manager (RCM) scripting interface that enables you to create scripts that can shut down applications and release system resources from hardware devices during dynamic reconfiguration (DR) operations. For example, you can create an RCM script to release network interfaces of a network interface card prior to unconfiguring the card from the system.
Page 117
You can write RCM scripts to shut down applications running on peripheral CompactPCI cards installed into the system backplane. The RCM daemon will execute these scripts when an operator attempts to unconfigure a card using the cfgadm command or by opening the CompactPCI board’s ejection levers. For more information about the cfgadm command, refer to the cfgadm(1M) man page and the Solaris documentation.
Page 118
Using RCM to Work With the Intel 21554 Bridge Chip CompactPCI cards containing the Intel 21554 PCI-PCI bridge chip falsely turn on the blue extraction LED when they are dynamically removed from a chassis using the Netra CP2100 series board as a system controller. This blue extraction LED, located on a CompactPCI card’s front panel, incorrectly turns on when the ejection levers are opened for extraction while the card’s devices (for example, the card’s network interfaces) are still in use.
Page 119
Netra CP2100 series CompactPCI board. RCM Script Example (SUNW,cp2000_io.pl) CODE EXAMPLE 6-1 #! /usr/bin/perl -w # Copyright 2002 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. #ident "@(#)SUNW,cp2000_io.pl 1.1 02/03/28 SMI"...
Page 120
RCM Script Example (SUNW,cp2000_io.pl) (Continued) CODE EXAMPLE 6-1 # dispatch table for RCM commands %dispatch = ( "scriptinfo" => \&do_scriptinfo, "register" => \&do_register, "resourceinfo" => \&do_resourceinfo, "queryremove" => \&do_preremove, "preremove" => \&do_preremove sub do_scriptinfo print "rcm_script_version=1\n"; print "rcm_script_func_info=ifconfig coordinator for DR\n"; # optionally specify command timeout value in seconds to override # the default timeout value.
Page 121
RCM Script Example (SUNW,cp2000_io.pl) (Continued) CODE EXAMPLE 6-1 print "rcm_resource_usage_info=ifconfig managed QFE device\n"; exit (0); sub do_preremove if ($ENV{RCM_ENV_FORCE} eq ’TRUE’) { if ($cmd eq ’preremove’) { ‘/usr/sbin/ifconfig qfe0 down‘; if ($? == 0) { ‘/usr/sbin/ifconfig qfe0 unplumb‘; exit(0); } else { print "rcm_failure_reason=device in use by ifconfig\n";...
Page 122
In this example, the test system is operating in full hot-swap mode and has the following configuration: 8-slot High-Availability (HA) CompactPCI chassis ■ Netra CP2100 series board used as the system board controller (SBC) ■ Sun Dual FastEthernet/SCSI 6U CompactPCI adapter in slot 4 ■...
Page 123
At this point, the operator opens the ejection levers of the Sun Dual FastEthernet/SCSI 6U CompactPCI adapter to begin the extraction process. When the levers are opened, the Solaris DR framework (in conjunction with the Solaris RCM framework) calls the SUNW,cp2000_io.pl RCM script, which unplumbs and brings down the FastEthernet (qfe0) interface.
Page 124
For example, if you attempt to extract the Sun Dual FastEthernet/SCSI 6U CompactPCI adapter from a system operating in basic hot-swap mode, and you have installed the RCM script shown in , you may see error CODE EXAMPLE 6-1 messages produced by other Solaris RCM modules in the system’s console. For instance, if the adapter has a plumbed IP address, the Solaris SUNW,ip_rcm.so RCM module will fail the dynamic removal operation and display error messages unless you use the cfgadm -f command.
Need help?
Do you have a question about the Netra CP2000 Series and is the answer not in the manual?
Questions and answers