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