Sun-microsystems Netra CP2500 Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Hardware Sun-microsystems Netra CP2500 herunter. Sun Microsystems Netra CP2500 User Manual Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 74
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
Sun Microsystems, Inc.
www.sun.com
Submit comments about this document at: http://www.sun.com/hwdocs/feedback
Netra
CP2500 Board
Programming Guide
For the Solaris
Operating System
Part No. 819-1749-11
March 2007, Revision A
Seitenansicht 0
1 2 3 4 5 6 ... 73 74

Inhaltsverzeichnis

Seite 1 - Programming Guide

Sun Microsystems, Inc.www.sun.comSubmit comments about this document at: http://www.sun.com/hwdocs/feedbackNetra™CP2500 BoardProgramming GuideFor the

Seite 2

x Netra CP2500 Board Programming Guide • March 2007

Seite 3 - Contents

xiPrefaceThe Netra CP2500 Board Programming Guide is written for program developers andusers who want to program the Netra™CP2500 board in order to de

Seite 4

xii Netra CP2500 Board Programming Guide • March 2007Using UNIX CommandsThis document may not contain information on basic UNIX®commands andprocedures

Seite 5

Preface xiiiShell PromptsRelated DocumentationOnline documents are available at:http://www.sun.com/documentationShell PromptC shell machine-name%C she

Seite 6

xiv Netra CP2500 Board Programming Guide • March 2007Documentation, Support, and TrainingThird-Party Web SitesSun is not responsible for the availabil

Seite 7

1CHAPTER1Watchdog TimerThe system management controller (SMC) on the Netra CP2500 implements awatchdog service that captures catastrophic faults in th

Seite 8

2 Netra CP2500 Board Programming Guide • March 2007PICL Plug-In ModuleThe watchdog subsystem is managed by a platform information and control library(

Seite 9 - Code Samples

Chapter 1 Watchdog Timer 3PICL interfaces for the watchdog plug-in module include the nodes watchdog-controller and watchdog-timer. SeeTABLE 1-1, TABL

Seite 10

4 Netra CP2500 Board Programming Guide • March 2007To identify current settings of watchdog-controller, issue the commandprtpicl -v as shown in the sa

Seite 11 - How This Book Is Organized

Chapter 1 Watchdog Timer 5Watchdog Node Management CodeCODE EXAMPLE 1-1 contains an example of the code used for managing the watchdogtimer nodes. Thi

Seite 12 - Typographic Conventions

Copyright 2007 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved.Sun Microsystems, Inc. has intel

Seite 13 - Related Documentation

6 Netra CP2500 Board Programming Guide • March 2007#define EM_INIT 1#define EM_GETROOT 2#define EM_GETPVALBYNAME 3

Seite 14 - Sun Welcomes Your Comments

Chapter 1 Watchdog Timer 7#define WATCHDOG_DISARMED "disarmed"/* * data structure that will be passed as argument to * picl_wa

Seite 15 - Watchdog Timer

8 Netra CP2500 Board Programming Guide • March 2007 } return (-1);}static voidprint_errmsg(char *message, ...){ va_list ap;

Seite 16 - PICL Plug-In Module

Chapter 1 Watchdog Timer 9 /* read the property value */ if ((err = picl_get_propval(proph, *vbuf, pinfo.size)) !=

Seite 17 - Chapter 1 Watchdog Timer 3

10 Netra CP2500 Board Programming Guide • March 2007 */static picl_errno_tprint_watchdog_node_props(picl_nodehdl_t nodeh){ int32_t *timeout = N

Seite 18

Chapter 1 Watchdog Timer 11 wdadm_args_t *wd_arg = NULL; picl_nodehdl_t childh, peerh; char cntrl_name[PICL_PROPNAMELEN_MAX];

Seite 19 - Watchdog Node Management Code

12 Netra CP2500 Board Programming Guide • March 2007 if (wd_arg == NULL || print) { if (count == 0) {

Seite 20

Chapter 1 Watchdog Timer 13 } return (err);}/* * This function is the callback function that gets called * due to picl_walk_tree_by_clas

Seite 21 - Chapter 1 Watchdog Timer 7

14 Netra CP2500 Board Programming Guide • March 2007 if (strncmp(cntrl_name, wd_arg->name, (ptr - wd_arg->name)) != 0) { r

Seite 22

Chapter 1 Watchdog Timer 15 if (wd_arg->action) if ((err = wdadm_set_picl_prop(peerh, WATCHDOG_ACTION

Seite 23 - Chapter 1 Watchdog Timer 9

iiiContentsPreface xi1. Watchdog Timer 1Overview 1PICL Plug-In Module 2Watchdog Node Management Code 5OpenBoot PROM Interface 212. Environmental Monit

Seite 24

16 Netra CP2500 Board Programming Guide • March 2007 ptr = strchr(wd_name, ’:’); if (ptr == NULL) { /* invalid format */

Seite 25 - Chapter 1 Watchdog Timer 11

Chapter 1 Watchdog Timer 17 print_errmsg(gettext(err_msg[EM_GETPVALBYNAME]), picl_strerror(err)); ret

Seite 26

18 Netra CP2500 Board Programming Guide • March 2007 return (err);}intmain(int argc, char **argv){ int err; int

Seite 27 - Chapter 1 Watchdog Timer 13

Chapter 1 Watchdog Timer 19 tflg = 1; (void) strlcpy(timeout, optarg, PICL_CL

Seite 28

20 Netra CP2500 Board Programming Guide • March 2007 rc = print_wd_info(argc, argv, optind); (void) picl_shutdown();

Seite 29 - Chapter 1 Watchdog Timer 15

Chapter 1 Watchdog Timer 21OpenBoot PROM InterfaceThere is no user interface to the watchdog timer at the OpenBoot™PROM level.When the Netra CP2500 bo

Seite 30

22 Netra CP2500 Board Programming Guide • March 2007

Seite 31 - Chapter 1 Watchdog Timer 17

23CHAPTER2Environmental MonitoringThe Netra CP2500 board uses an intelligent fault detection environmentalmonitoring system that increases uptime and

Seite 32

24 Netra CP2500 Board Programming Guide • March 2007Environmental Monitoring ComponentCompatibilityTABLE 2-1 lists the compatible environmental monito

Seite 33 - Chapter 1 Watchdog Timer 19

Chapter 2 Environmental Monitoring 25FIGURE 2-1 Typical Environmental Monitoring Application Block DiagramTransition card(OEM supplied)I2CnodeRackmidp

Seite 34

iv Netra CP2500 Board Programming Guide • March 2007Warning Temperature Response at OpenBoot PROM 33Critical Temperature Response at OpenBoot PROM 33U

Seite 35 - OpenBoot PROM Interface

26 Netra CP2500 Board Programming Guide • March 2007The Netra CP2500 monitors its CPU diode temperature and issues warnings at boththe OpenBoot PROM a

Seite 36

Chapter 2 Environmental Monitoring 27Protection at the operating system level takes place when the PICL environmentalmonitoring program (envmond) is r

Seite 37 - Environmental Monitoring

28 Netra CP2500 Board Programming Guide • March 2007Hardware Environmental MonitoringFunctionsThis section summarizes the hardware environmental monit

Seite 38 - System Application

Chapter 2 Environmental Monitoring 29FIGURE 2-2 Location of Environmental Monitoring Hardware on the Netra CP2500 Board – Top SideFIGURE 2-3 is a bloc

Seite 39

30 Netra CP2500 Board Programming Guide • March 2007FIGURE 2-3 Netra CP2500 Board Environmental Monitoring Functional Block DiagramPICLapplicationprog

Seite 40 - Shutdown

Chapter 2 Environmental Monitoring 31Switching Power On and OffThe on-board voltage controller allows power to the CPU of the Netra CP2500 onlywhen th

Seite 41 - Post Shutdown Recovery

32 Netra CP2500 Board Programming Guide • March 2007The CPU diode temperature can be used to prevent damage to the board by shuttingthe board down if

Seite 42 - Functions

Chapter 2 Environmental Monitoring 33Note – If you have developed an application that uses the environmentalmonitoring software to monitor the tempera

Seite 43

34 Netra CP2500 Board Programming Guide • March 2007Using the show-sensors Command at theOpenBoot PROMThe show-sensors command at OpenBoot PROM displa

Seite 44

Chapter 2 Environmental Monitoring 35The environmental monitoring parameter values in the application program applywhen the system is running at the S

Seite 45 - Switching Power On and Off

vFiguresFIGURE 2-1 Typical Environmental Monitoring Application Block Diagram 25FIGURE 2-2 Location of Environmental Monitoring Hardware on the Netra

Seite 46 - Adjusting the Environmental

36 Netra CP2500 Board Programming Guide • March 2007Using a Configuration File for Sensor InformationOn the Netra CP2500, you can enable or disable se

Seite 47 - Monitoring

Chapter 2 Environmental Monitoring 37Sample Application ProgramThis section presents a sample environmental monitoring (envmond) applicationthat monit

Seite 48 - Programming

38 Netra CP2500 Board Programming Guide • March 2007 *resulth = childh; return (PICL_SUCCESS);

Seite 49 - PICL API

Chapter 2 Environmental Monitoring 39 if (picl_get_propval_by_name(nodeh, LO_SHUTDOWN_THRESHOLD, &threshold, sizeof (thresho

Seite 50 - Solaris Driver Interface

40 Netra CP2500 Board Programming Guide • March 2007 return (1); } if (get_child_by_name(platformh, sensor, &childh)

Seite 51 - Sample Application Program

Chapter 2 Environmental Monitoring 41Reading the CPU Temperature andEnvironmental LimitsYou can access the CPU temperature sensor current readings and

Seite 52

42 Netra CP2500 Board Programming Guide • March 2007TABLE 2-5 shows which Solaris commands correspond to the environmentalmonitoring warning that runs

Seite 53

43CHAPTER3User FlashThis chapter describes the user flash driver for the onboard flash PROM and how touse it. The Netra CP2500 is equipped with user f

Seite 54

44 Netra CP2500 Board Programming Guide • March 2007User Flash DriverThe uflash is the device driver for the flash PROM device on the Netra CP2500.Acc

Seite 55 - Environmental Limits

Chapter 3 User Flash 45User Flash Device FilesThe user flash device file is /dev/uflash0.Interface (Header) FileThe user flash header file is located

Seite 56

vi Netra CP2500 Board Programming Guide • March 2007

Seite 57 - User Flash

46 Netra CP2500 Board Programming Guide • March 2007The ioctl supported commands are listed below:Note that these ioctl commands are not supported:Str

Seite 58 - User Flash Driver

Chapter 3 User Flash 47User Flash User Interface StructureThe user flash user interface structure holds user parameters to commands such aserase.Error

Seite 59 - Interface (Header) File

48 Netra CP2500 Board Programming Guide • March 2007 Write Block EraseRead Example ProgramCODE EXAMPLE 3-3 contains the Read Action on the user flas

Seite 60 - PROM Information Structure

Chapter 3 User Flash 49Write Example ProgramCODE EXAMPLE 3-4 contains the Write Action on the user flash device. printf("number of blocks = 0x

Seite 61 - Example Programs

50 Netra CP2500 Board Programming Guide • March 2007int ufd0;uflash_if_t ufif0;char *buf0;char *module;static intuflash_init() { char *buf0 = malloc(

Seite 62 - Read Example Program

Chapter 3 User Flash 51Block Erase Example ProgramCODE EXAMPLE 3-5 contains the Block Erase Action on the user flash device.}main() { int ret;module

Seite 63 - Write Example Program

52 Netra CP2500 Board Programming Guide • March 2007 printf("manfacturer id = 0x%p\n", ufif0.info.mfr_id); printf("device id = 0x

Seite 64

Chapter 3 User Flash 53Sample User Flash Application ProgramYou can use the following program to test the user flash device and driver. Thisprogram al

Seite 65 - Block Erase Example Program

54 Netra CP2500 Board Programming Guide • March 2007 #if 1 #define PROM_SIZE 0x700000 /* 7 MBytes */ #endifstatic char *help[14] = {

Seite 66

Chapter 3 User Flash 55 if ((fd0 = open(devname0, O_RDWR)) < 0) { fprintf(stderr, "couldn’t open device: %s\n", devname0)

Seite 67 - Chapter 3 User Flash 53

viiTablesTABLE 1-1 Watchdog Plug-In Interfaces for Netra CP2500 Board Software 3TABLE 1-2 Properties Under watchdog-controller Node 3TABLE 1-3 Propert

Seite 68

56 Netra CP2500 Board Programming Guide • March 2007 case ’4’: /* lock flash PROM block */ /* on certain PROMs */

Seite 69 - Chapter 3 User Flash 55

Chapter 3 User Flash 57 case ’1’: /* write to user flash PROM */ fprintf(stderr, "Ent

Seite 70

58 Netra CP2500 Board Programming Guide • March 2007 } printf ("\nuser data buffer:\n"); fo

Seite 71 - Chapter 3 User Flash 57

59IndexBboot, Solaris OS, 21Ccommandsprtdiag, 41, 42prtpicl, 4, 35, 41, 42show-sensors,34critical-temperature parameter, 33Ddevice node, 44dip switch,

Seite 72

60 Netra CP2500 Board Programming Guide • March 2007device, 45device files, 45driver, 43header file, 45interface structure, 47node properties, 44Vvoltag

Seite 73

viii Netra CP2500 Board Programming Guide • March 2007

Seite 74

ixCode SamplesCODE EXAMPLE 1-1 System Watchdog Node Management Code Example 5CODE EXAMPLE 2-1 Sample envmond Application Program 37CODE EXAMPLE 3-1 PR

Kommentare zu diesen Handbüchern

Keine Kommentare