1*2305Sstevel /* 2*2305Sstevel * CDDL HEADER START 3*2305Sstevel * 4*2305Sstevel * The contents of this file are subject to the terms of the 5*2305Sstevel * Common Development and Distribution License (the "License"). 6*2305Sstevel * You may not use this file except in compliance with the License. 7*2305Sstevel * 8*2305Sstevel * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*2305Sstevel * or http://www.opensolaris.org/os/licensing. 10*2305Sstevel * See the License for the specific language governing permissions 11*2305Sstevel * and limitations under the License. 12*2305Sstevel * 13*2305Sstevel * When distributing Covered Code, include this CDDL HEADER in each 14*2305Sstevel * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*2305Sstevel * If applicable, add the following below this CDDL HEADER, with the 16*2305Sstevel * fields enclosed by brackets "[]" replaced with your own identifying 17*2305Sstevel * information: Portions Copyright [yyyy] [name of copyright owner] 18*2305Sstevel * 19*2305Sstevel * CDDL HEADER END 20*2305Sstevel */ 21*2305Sstevel 22*2305Sstevel /* 23*2305Sstevel * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24*2305Sstevel * Use is subject to license terms. 25*2305Sstevel */ 26*2305Sstevel 27*2305Sstevel #ifndef _SYS_RMCLOMV_IMPL_H 28*2305Sstevel #define _SYS_RMCLOMV_IMPL_H 29*2305Sstevel 30*2305Sstevel #pragma ident "%Z%%M% %I% %E% SMI" 31*2305Sstevel 32*2305Sstevel #ifdef __cplusplus 33*2305Sstevel extern "C" { 34*2305Sstevel #endif 35*2305Sstevel 36*2305Sstevel #include <sys/envmon.h> 37*2305Sstevel 38*2305Sstevel /* 39*2305Sstevel * local driver defines and structures 40*2305Sstevel */ 41*2305Sstevel 42*2305Sstevel #define RMCLOMV_DEFAULT_MAX_MBOX_WAIT_TIME 10000 43*2305Sstevel #define RMCLOMV_MIN_LED_STATE 0 44*2305Sstevel #define RMCLOMV_MAX_LED_STATE 2 45*2305Sstevel /* 46*2305Sstevel * These are PSU flag bits that map to voltage-indicators: 47*2305Sstevel * DP_PSU_OUTPUT_STATUS 48*2305Sstevel * DP_PSU_INPUT_STATUS 49*2305Sstevel * DP_PSU_SEC_INPUT_STATUS 50*2305Sstevel * DP_PSU_OUTPUT_VLO_STATUS 51*2305Sstevel * DP_PSU_OUTPUT_VHI_STATUS 52*2305Sstevel */ 53*2305Sstevel #define RMCLOMV_MAX_VI_PER_PSU 5 54*2305Sstevel 55*2305Sstevel /* 56*2305Sstevel * Current indicators: 57*2305Sstevel * DP_PSU_OUTPUT_AHI_STATUS 58*2305Sstevel * DP_PSU_NR_WARNING 59*2305Sstevel */ 60*2305Sstevel #define RMCLOMV_MAX_CI_PER_PSU 2 61*2305Sstevel 62*2305Sstevel /* 63*2305Sstevel * Fan indicators: 64*2305Sstevel * DP_PSU_FAN_FAULT 65*2305Sstevel * DP_PSU_PDCT_FAN 66*2305Sstevel */ 67*2305Sstevel #define RMCLOMV_MAX_FI_PER_PSU 2 68*2305Sstevel 69*2305Sstevel /* 70*2305Sstevel * Temperature indicators: 71*2305Sstevel * DP_PSU_OVERTEMP_FAULT 72*2305Sstevel */ 73*2305Sstevel #define RMCLOMV_MAX_TI_PER_PSU 1 74*2305Sstevel 75*2305Sstevel #define RMCLOMV_NUM_SPECIAL_FRUS 1 76*2305Sstevel #define RMCLOMV_MIN_ALARM_STATE 0 77*2305Sstevel #define RMCLOMV_MAX_ALARM_STATE 1 78*2305Sstevel 79*2305Sstevel /* 80*2305Sstevel * defines for various environmental detectors 81*2305Sstevel */ 82*2305Sstevel #define RMCLOMV_ANY_ENV 0 83*2305Sstevel #define RMCLOMV_TEMP_SENS 1 84*2305Sstevel #define RMCLOMV_FAN_SENS 2 85*2305Sstevel #define RMCLOMV_PSU_IND 3 86*2305Sstevel #define RMCLOMV_LED_IND 4 87*2305Sstevel #define RMCLOMV_VOLT_SENS 5 88*2305Sstevel #define RMCLOMV_HPU_IND 6 89*2305Sstevel #define RMCLOMV_AMP_IND 7 90*2305Sstevel #define RMCLOMV_VOLT_IND 8 91*2305Sstevel #define RMCLOMV_TEMP_IND 9 92*2305Sstevel #define RMCLOMV_FAN_IND 10 93*2305Sstevel #define RMCLOMV_ALARM_IND 11 94*2305Sstevel 95*2305Sstevel typedef struct { 96*2305Sstevel dp_handle_t handle; 97*2305Sstevel uint16_t ind_mask; 98*2305Sstevel envmon_handle_t handle_name; 99*2305Sstevel } rmclomv_cache_entry_t; 100*2305Sstevel 101*2305Sstevel /* 102*2305Sstevel * section_len is used when freeing the structure. 103*2305Sstevel * It includes unused entries whereas num_entries does not. 104*2305Sstevel */ 105*2305Sstevel typedef struct rmclomv_cache_section { 106*2305Sstevel struct rmclomv_cache_section *next_section; 107*2305Sstevel size_t section_len; 108*2305Sstevel uint16_t sensor_type; 109*2305Sstevel uint16_t num_entries; 110*2305Sstevel rmclomv_cache_entry_t entry[1]; 111*2305Sstevel } rmclomv_cache_section_t; 112*2305Sstevel 113*2305Sstevel #ifdef __cplusplus 114*2305Sstevel } 115*2305Sstevel #endif 116*2305Sstevel 117*2305Sstevel #endif /* _SYS_RMCLOMV_IMPL_H */ 118