Resumen del contenido incluido en la página 1
™
Netra CP2500 Board
Programming Guide
™
For the Solaris Operating System
Sun Microsystems, Inc.
www.sun.com
Part No. 819-1749-11
March 2007, Revision A
Submit comments about this document at: http://www.sun.com/hwdocs/feedback
Resumen del contenido incluido en la página 2
Copyright 2007 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. Sun Microsystems, Inc. has intellectual property rights relating to technology that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S. and in other countries. This docu
Resumen del contenido incluido en la página 3
Contents Preface xi 1. Watchdog Timer 1 Overview 1 PICL Plug-In Module 2 Watchdog Node Management Code 5 OpenBoot PROM Interface 21 2. Environmental Monitoring 23 Environmental Monitoring Component Compatibility 24 Typical Environmental Monitoring System Application 24 Typical Cycle From Power Up to Shutdown 26 Environmental Monitoring Protection at the OpenBoot PROM 26 Environmental Monitoring Protection at the Operating System Level 26 Post Shutdown Recovery 27 Hardware Environmental Monitorin
Resumen del contenido incluido en la página 4
Warning Temperature Response at OpenBoot PROM 33 Critical Temperature Response at OpenBoot PROM 33 Using the show-sensors Command at the OpenBoot PROM 34 Environmental Monitoring Application Programming 34 Reading Temperature Sensor States Using the PICL API 35 Using a Configuration File for Sensor Information 36 Solaris Driver Interface 36 Sample Application Program 37 Reading the CPU Temperature and Environmental Limits 41 3. User Flash 43 User Flash Usage and Implementation 43 User Flash Driv
Resumen del contenido incluido en la página 5
Figures FIGURE 2-1 Typical Environmental Monitoring Application Block Diagram 25 FIGURE 2-2 Location of Environmental Monitoring Hardware on the Netra CP2500 Board – Top Side 29 FIGURE 2-3 Netra CP2500 Board Environmental Monitoring Functional Block Diagram 30 v
Resumen del contenido incluido en la página 6
vi Netra CP2500 Board Programming Guide • March 2007
Resumen del contenido incluido en la página 7
Tables TABLE 1-1 Watchdog Plug-In Interfaces for Netra CP2500 Board Software 3 TABLE 1-2 Properties Underwatchdog-controller Node 3 TABLE 1-3 Properties Underwatchdog-timer Node 4 TABLE 2-1 Compatible Environmental Monitoring Components 24 TABLE 2-2 Typical Netra CP2500 Board Hardware Environmental Monitoring Functions 28 TABLE 2-3 I2C Components 28 TABLE 2-4 PICL Temperature Sensor Class Node Properties 35 TABLE 2-5 Description of Values Displayed by Solaris Commands 42 TABLE 3-1 User Flash Nod
Resumen del contenido incluido en la página 8
viii Netra CP2500 Board Programming Guide • March 2007
Resumen del contenido incluido en la página 9
Code Samples CODE EXAMPLE 1-1 System Watchdog Node Management Code Example 5 CODE EXAMPLE 2-1 Sampleenvmond Application Program 37 CODE EXAMPLE 3-1 PROM Information Structure 46 CODE EXAMPLE 3-2 User Flash Interface Structure 47 CODE EXAMPLE 3-3 Read Action on User Flash Device 48 CODE EXAMPLE 3-4 Write Action on User Flash Device 49 CODE EXAMPLE 3-5 Block Erase Action on User Flash Device 51 CODE EXAMPLE 3-6 Sample User Flash Application Program 53 ix
Resumen del contenido incluido en la página 10
x Netra CP2500 Board Programming Guide • March 2007
Resumen del contenido incluido en la página 11
Preface The Netra CP2500 Board Programming Guide is written for program developers and ™ users who want to program the Netra CP2500 board in order to design original equipment manufacturer (OEM) systems, supply additional capability to an existing compatible system, or work in a laboratory environment for experimental purposes. You are required to have a basic knowledge of computers and digital logic programming to fully use the information in this document. The Netra CP2500 can be used by netwo
Resumen del contenido incluido en la página 12
Using UNIX Commands ® This document may not contain information on basic UNIX commands and procedures such as shutting down the system, booting the system, and configuring devices. See one or more of the following for this information: ■ Solaris Handbook for Sun Peripherals ™ ■ Solaris Operating System (Solaris OS) documentation, which is at: http://docs.sun.com ■ Other software documentation that you received with your system Typographic Conventions * Typeface Meaning Examples AaBbCc123 The nam
Resumen del contenido incluido en la página 13
Shell Prompts Shell Prompt C shell machine-name% C shell superuser machine-name# Bourne shell and Korn shell $ Bourne shell and Korn shell superuser # Related Documentation Online documents are available at: http://www.sun.com/documentation Title Part Number Netra CP2500 Board Release Notes 819-1748 Netra CP2500 Board Installation and Technical Reference 819-1747 Manual Netra CP2500 Board Programming Guide 819-1749 Netra CP2500 Board Safety and Compliance Manual 819-1750 Netra CP2500 Rear Transi
Resumen del contenido incluido en la página 14
Documentation, Support, and Training Sun Function URL Documentation http://www.sun.com/documentation/ Support http://www.sun.com/support/ Training http://www.sun.com/training/ Third-Party Web Sites Sun is not responsible for the availability of third-party web sites mentioned in this document. Sun does not endorse and is not responsible or liable for any content, advertising, products, or other materials that are available on or through such sites or resources. Sun will not be responsible or lia
Resumen del contenido incluido en la página 15
CHAPTER 1 Watchdog Timer The system management controller (SMC) on the Netra CP2500 implements a watchdog service that captures catastrophic faults in the Solaris OS running on the CPU board. The watchdog service reports such faults to the baseboard management controller (BMC) by means of either an IPMI message or by a de-assertion of the CPU’s HEALTHY# signal. This chapter contains the following sections: ■ “Overview” on page 1 ■ “PICL Plug-In Module” on page 2 ■ “Watchdog Node Management Code”
Resumen del contenido incluido en la página 16
PICL Plug-In Module The watchdog subsystem is managed by a platform information and control library (PICL) plug-in module. This PICL plug-in module provides a set of PICL properties to the system, which enables a Solaris PICL client to specify the attributes of the watchdog system. To use the PICL API to set the watchdog properties, your application must follow the following sequence: Note – The following instructions are not server-specific. Check your server documentation for additional softwa
Resumen del contenido incluido en la página 17
PICL interfaces for the watchdog plug-in module include the nodes watchdog- controller and watchdog-timer. See TABLE 1-1, TABLE 1-2, and TABLE 1-3 for descriptions of the properties of these nodes. TABLE 1-1 Watchdog Plug-In Interfaces for Netra CP2500 Board Software PICL Class Property Meaning watchdog- WdOp Represents a watchdog subsystem. controller watchdog-timer State Represents a watchdog timer hardware that belongs to its controller. Each timer depends on the status of its peers to be act
Resumen del contenido incluido en la página 18
TABLE 1-3 Properties Under watchdog-timer Node Property Values Description State armed Indicates timer is armed or running. Cleared by disarm. expired Indicates timer has expired. Cleared by disarm. disarmed Default value set at startup time. Indicates timer is disarmed or stopped. * WdTimeout Varies by system Indicates the timer initial countdown value. Should be set prior and timer level to arming the timer. \ WdAction none Default value. No action is taken. alarm Sends notifications to system
Resumen del contenido incluido en la página 19
:_class watchdog-timer :name watchdog-level2 Watchdog Node Management Code CODE EXAMPLE 1-1 contains an example of the code used for managing the watchdog timer nodes. This code can be used to change watchdog timer action and timeout values and also to arm and disarm the watchdog controller. CODE EXAMPLE 1-1 System Watchdog Node Management Code Example /* * Copyright 2003 Sun Microsystems, Inc. All rights reserved. * Use is subject to license t
Resumen del contenido incluido en la página 20
CODE EXAMPLE 1-1 System Watchdog Node Management Code Example (Continued) #define EM_INIT 1 #define EM_GETROOT 2 #define EM_GETPVALBYNAME 3 #define USAGE_STR "Usage:\n"\ "wdadm -l [...]\n"\ "wdadm -m [-t ]"\ " [-a action]]\n"\ "wdadm -c -o \n" #define DETAILED_HELP "wdadm - System Watchdog Controller Admi