Sun-microsystems Netra CP2500 Uživatelský manuál

Procházejte online nebo si stáhněte Uživatelský manuál pro Hardware Sun-microsystems Netra CP2500. Sun Microsystems Netra CP2500 User Manual Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 74
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 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
Zobrazit stránku 0
1 2 3 4 5 6 ... 73 74

Shrnutí obsahu

Strany 1 - Programming Guide

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

Strany 2

x Netra CP2500 Board Programming Guide • March 2007

Strany 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

Strany 4

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

Strany 5

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

Strany 6

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

Strany 7

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

Strany 8

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

Strany 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

Strany 10

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

Strany 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

Strany 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

Strany 13 - Related Documentation

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

Strany 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

Strany 15 - Watchdog Timer

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

Strany 16 - PICL Plug-In Module

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

Strany 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

Strany 18

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

Strany 19 - Watchdog Node Management Code

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

Strany 20

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

Strany 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

Strany 22

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

Strany 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

Strany 24

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

Strany 25 - Chapter 1 Watchdog Timer 11

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

Strany 26

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

Strany 27 - Chapter 1 Watchdog Timer 13

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

Strany 28

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

Strany 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

Strany 30

22 Netra CP2500 Board Programming Guide • March 2007

Strany 31 - Chapter 1 Watchdog Timer 17

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

Strany 32

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

Strany 33 - Chapter 1 Watchdog Timer 19

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

Strany 34

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

Strany 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

Strany 36

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

Strany 37 - Environmental Monitoring

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

Strany 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

Strany 39

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

Strany 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

Strany 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

Strany 42 - Functions

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

Strany 43

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

Strany 44

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

Strany 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

Strany 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

Strany 47 - Monitoring

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

Strany 48 - Programming

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

Strany 49 - PICL API

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

Strany 50 - Solaris Driver Interface

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

Strany 51 - Sample Application Program

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

Strany 52

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

Strany 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

Strany 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

Strany 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

Strany 56

vi Netra CP2500 Board Programming Guide • March 2007

Strany 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

Strany 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

Strany 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

Strany 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

Strany 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(

Strany 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

Strany 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

Strany 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

Strany 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] = {

Strany 66

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

Strany 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

Strany 68

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

Strany 69 - Chapter 3 User Flash 55

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

Strany 70

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

Strany 71 - Chapter 3 User Flash 57

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

Strany 72

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

Strany 73

viii Netra CP2500 Board Programming Guide • March 2007

Strany 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

Komentáře k této Příručce

Žádné komentáře