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 2001 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SYS_SGENV_TAG_H 28 #define _SYS_SGENV_TAG_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 #include <sys/types.h> 37 38 39 /* 40 * We generate #define's for every possible HPU, however the SC only 41 * returns data for some of these HPUs. These are #defined in serengeti.h 42 * as they are common to both Serengeti and LightWeight8 platforms. 43 * However we keep track of the HPUs which return environmental data here 44 * as that info is SGENV specific. 45 * 46 * Below is a list of the HPU's which return environmental data. 47 * 48 * SG_HPU_TYPE_CPU_BOARD 49 * 50 * SG_HPU_TYPE_PCI_IO_BOARD 51 * SG_HPU_TYPE_CPCI_IO_BOARD 52 * SG_HPU_TYPE_CPCI_IO_BOARD_F3800 53 * 54 * SG_HPU_TYPE_REPEATER_BOARD 55 * SG_HPU_TYPE_LOGIC_ANALYZER_BOARD 56 * SG_HPU_TYPE_REPEATER_BOARD_F3800 57 * 58 * SG_HPU_TYPE_SYSTEM_CONTROLLER_BOARD 59 * SG_HPU_TYPE_SYSTEM_CONTROLLER_BOARD_F3800 60 * 61 * SG_HPU_TYPE_A123_POWER_SUPPLY 62 * SG_HPU_TYPE_A138_POWER_SUPPLY 63 * SG_HPU_TYPE_A145_POWER_SUPPLY 64 * SG_HPU_TYPE_A152_POWER_SUPPLY 65 * SG_HPU_TYPE_A153_POWER_SUPPLY 66 * 67 * SG_HPU_TYPE_FAN_TRAY_F6800_IO 68 * SG_HPU_TYPE_FAN_TRAY_F6800_CPU 69 * SG_HPU_TYPE_FAN_TRAY_RACK 70 * SG_HPU_TYPE_FAN_TRAY_F4810 71 * SG_HPU_TYPE_FAN_TRAY_F4800_IO 72 * SG_HPU_TYPE_FAN_TRAY_F4800_CPU 73 * SG_HPU_TYPE_FAN_TRAY_F4800_TOP_IO 74 * SG_HPU_TYPE_FAN_TRAY_F3800 75 * SG_HPU_TYPE_FAN_TRAY_F3800_ID 76 * SG_HPU_TYPE_FAN_TRAY_F4800_BOTTOM_IO 77 * 78 * The following are obsolete and have been superseded by entries in the 79 * list above and should not be used. They are simply present to support 80 * existing clients and will be deleted at some stage in the future. 81 * 82 * SG_HPU_TYPE_SP_CPCI_IO_BOARD 83 * SG_HPU_TYPE_SP_SYSTEM_CONTROLLER_BOARD 84 * SG_HPU_TYPE_L2_REPEATER_BOARD 85 * SG_HPU_TYPE_RACK_FAN_TRAY 86 * SG_HPU_TYPE_SP_FAN_TRAY 87 * SG_HPU_TYPE_MD_TOP_IO_FAN_TRAY 88 * SG_HPU_TYPE_MD_BOTTOM_IO_FAN_TRAY 89 * SG_HPU_TYPE_R12_THREE_FAN_TRAY 90 * SG_HPU_TYPE_K12_IO_ONE_FAN_TRAY 91 * SG_HPU_TYPE_K12_CPU_THREE_FAN_TRAY 92 * SG_HPU_TYPE_R24_IO_FOUR_FAN_TRAY 93 * SG_HPU_TYPE_R24_CPU_SIX_FAN_TRAY 94 */ 95 96 typedef union sensor_id { 97 struct { 98 uint32_t \ 99 hpu_type : 16, 100 hpu_slot : 8, 101 sensor_part : 8, 102 sensor_partnum : 8, 103 sensor_type : 8, 104 sensor_typenum : 8, 105 node_id : 4, 106 _pad : 4; 107 } id; 108 uint64_t tag_id; 109 } sensor_id_t; 110 111 112 /* 113 * Known sensor parts (sensor_part) 114 */ 115 116 #define SG_SENSOR_PART_SBBC 0x1 117 #define SG_SENSOR_PART_SBBC_STR "SBBC" 118 119 #define SG_SENSOR_PART_SDC 0x2 120 #define SG_SENSOR_PART_SDC_STR "SDC" 121 122 #define SG_SENSOR_PART_AR 0x3 123 #define SG_SENSOR_PART_AR_STR "AR" 124 125 #define SG_SENSOR_PART_CBH 0x4 126 #define SG_SENSOR_PART_CBH_STR "CBH" 127 128 #define SG_SENSOR_PART_DX 0x5 129 #define SG_SENSOR_PART_DX_STR "DX" 130 131 #define SG_SENSOR_PART_CHEETAH 0x6 132 #define SG_SENSOR_PART_CHEETAH_STR "Cheetah" 133 134 #define SG_SENSOR_PART_1_5_VDC 0x7 135 #define SG_SENSOR_PART_1_5_VDC_STR "1.5 VDC" 136 137 #define SG_SENSOR_PART_3_3_VDC 0x8 138 #define SG_SENSOR_PART_3_3_VDC_STR "3.3 VDC" 139 140 #define SG_SENSOR_PART_5_VDC 0x9 141 #define SG_SENSOR_PART_5_VDC_STR "5 VDC" 142 143 #define SG_SENSOR_PART_12_VDC 0xA 144 #define SG_SENSOR_PART_12_VDC_STR "12 VDC" 145 146 #define SG_SENSOR_PART_48_VDC 0xB 147 #define SG_SENSOR_PART_48_VDC_STR "48 VDC" 148 149 #define SG_SENSOR_PART_CURRENT 0xC 150 #define SG_SENSOR_PART_CURRENT_STR "Current" 151 152 #define SG_SENSOR_PART_BOARD 0xD 153 #define SG_SENSOR_PART_BOARD_STR "Board" 154 155 #define SG_SENSOR_PART_SCAPP 0xE 156 #define SG_SENSOR_PART_SCAPP_STR "SC-APP" 157 158 #define SG_SENSOR_PART_SCHIZO 0xF 159 #define SG_SENSOR_PART_SCHIZO_STR "Schizo" 160 161 #define SG_SENSOR_PART_FAN 0x10 162 #define SG_SENSOR_PART_FAN_STR "Fan" 163 164 #define SG_SENSOR_PART_INPUT 0x11 165 #define SG_SENSOR_PART_INPUT_STR "Input" 166 167 /* 168 * Known sensor types (sensor_type) 169 * Scaling factors (when applicable) 170 * N.b. Warning zone ranges are scaled, and 171 * the ..._RANGE definitions below are superceded 172 * by the scaled <sd_lo_warn> and <sd_hi_warn> 173 * fields in env_sensor_t. 174 */ 175 176 #define SG_SENSOR_TYPE_CURRENT 0x2 /* Current */ 177 #define SG_SENSOR_TYPE_CURRENT_STR "Current" 178 #define SG_SENSOR_TYPE_CURRENT_UNITS "Amps" 179 #define SG_CURRENT_SCALE 100 180 181 #define SG_SENSOR_TYPE_TEMPERATURE 0x3 /* Temp. */ 182 #define SG_SENSOR_TYPE_TEMPERATURE_STR "Temp." 183 #define SG_SENSOR_TYPE_TEMPERATURE_UNITS "Degrees C" 184 #define SG_TEMPERATURE_SCALE 100 185 #define SG_TEMPERATURE_RANGE 1000 186 187 #define SG_SENSOR_TYPE_COOLING 0x4 /* Cooling */ 188 #define SG_SENSOR_TYPE_COOLING_STR "Cooling" 189 #define SG_SENSOR_TYPE_COOLING_UNITS "" 190 191 #define SG_SENSOR_TYPE_1_5_VDC 0x5 /* 1.5 VDC */ 192 #define SG_SENSOR_TYPE_1_5_VDC_STR "1.5 VDC" 193 #define SG_SENSOR_TYPE_1_5_VDC_UNITS "Volts DC" 194 #define SG_1_5_VDC_SCALE 100 195 #define SG_1_5_VDC_RANGE 0 196 197 #define SG_SENSOR_TYPE_1_8_VDC 0x6 /* 1.8 VDC */ 198 #define SG_SENSOR_TYPE_1_8_VDC_STR "1.8 VDC" 199 #define SG_SENSOR_TYPE_1_8_VDC_UNITS "Volts DC" 200 #define SG_1_8_VDC_SCALE 100 201 #define SG_1_8_VDC_RANGE 0 202 203 #define SG_SENSOR_TYPE_3_3_VDC 0x7 /* 3.3 VDC */ 204 #define SG_SENSOR_TYPE_3_3_VDC_STR "3.3 VDC" 205 #define SG_SENSOR_TYPE_3_3_VDC_UNITS "Volts DC" 206 #define SG_3_3_VDC_SCALE 100 207 #define SG_3_3_VDC_RANGE 0 208 209 #define SG_SENSOR_TYPE_5_VDC 0x8 /* 5 VDC */ 210 #define SG_SENSOR_TYPE_5_VDC_STR "5 VDC" 211 #define SG_SENSOR_TYPE_5_VDC_UNITS "Volts DC" 212 #define SG_5_VDC_SCALE 100 213 #define SG_5_VDC_RANGE 0 214 215 #define SG_SENSOR_TYPE_12_VDC 0x9 /* 12 VDC */ 216 #define SG_SENSOR_TYPE_12_VDC_STR "12 VDC" 217 #define SG_SENSOR_TYPE_12_VDC_UNITS "Volts DC" 218 #define SG_12_VDC_SCALE 100 219 #define SG_12_VDC_RANGE 0 220 221 #define SG_SENSOR_TYPE_48_VDC 0xA /* 48 VDC */ 222 #define SG_SENSOR_TYPE_48_VDC_STR "48 VDC" 223 #define SG_SENSOR_TYPE_48_VDC_UNITS "Volts DC" 224 #define SG_48_VDC_SCALE 100 225 #define SG_48_VDC_RANGE 0 226 227 #define SG_SENSOR_TYPE_ENVDB 0xB /* Env. */ 228 #define SG_SENSOR_TYPE_ENVDB_STR "Env." 229 #define SG_SENSOR_TYPE_ENVDB_UNITS "Gen." 230 231 #define SG_SENSOR_TYPE_2_5_VDC 0xC /* 2.5 VDC */ 232 #define SG_SENSOR_TYPE_2_5_VDC_STR "2.5 VDC" 233 #define SG_SENSOR_TYPE_2_5_VDC_UNITS "Volts DC" 234 #define SG_2_5_VDC_SCALE 100 235 #define SG_2_5_VDC_RANGE 0 236 237 /* 238 * If we have to change the names of any of the #defines in the future, 239 * then we simply will define the old name to point to the new name. 240 * That way the clients do not know about the change and do not need 241 * to change their code. 242 */ 243 #define SG_HPU_TYPE_UNKNOWN (0x0) 244 #define SG_HPU_TYPE_UNKNOWN_STR "Unknown" 245 #define SG_HPU_TYPE_UNKNOWN_ID "UNK" 246 247 /* generic power supply FRUID string */ 248 #define SG_HPU_TYPE_POWER_SUPPLY_ID "PS" 249 250 251 /* 252 * The following are obsolete and have been superseded by entries in the 253 * list above and should not be used. They are simply present to support 254 * existing clients. 255 */ 256 #define SG_HPU_TYPE_SP_SYSTEM_CONTROLLER_BOARD ((1<<8)|2) /* 0x102 */ 257 #define SG_HPU_TYPE_SP_SYSTEM_CONTROLLER_BOARD_STR \ 258 "SP System Controller Board" 259 #define SG_HPU_TYPE_SP_SYSTEM_CONTROLLER_BOARD_ID "SSC" 260 #define SG_HPU_TYPE_SP_SYSTEM_CONTROLLER_BOARD_SHORTNAME "SSC" 261 262 #define SG_HPU_TYPE_L2_REPEATER_BOARD (0x301) 263 #define SG_HPU_TYPE_L2_REPEATER_BOARD_STR "L2 Repeater Board" 264 #define SG_HPU_TYPE_L2_REPEATER_BOARD_ID "RP" 265 #define SG_HPU_TYPE_L2_REPEATER_BOARD_SHORTNAME "RP" 266 267 #define SG_HPU_TYPE_SP_L2_REPEATER_BOARD ((3<<8)|3) /* 0x303 */ 268 #define SG_HPU_TYPE_SP_L2_REPEATER_BOARD_STR \ 269 "SP L2 Repeater Board" 270 #define SG_HPU_TYPE_SP_L2_REPEATER_BOARD_ID "RP" 271 #define SG_HPU_TYPE_SP_L2_REPEATER_BOARD_SHORTNAME "RP" 272 273 #define SG_HPU_TYPE_FAN_TRAY_BAY ((4<<8)|0) /* 0x400 */ 274 #define SG_HPU_TYPE_FAN_TRAY_BAY_STR \ 275 "Fan Tray Bay" 276 #define SG_HPU_TYPE_FAN_TRAY_BAY_ID "FT" 277 278 #define SG_HPU_TYPE_R24_IO_FOUR_FAN_TRAY ((4<<8)|1) /* 0x401 */ 279 #define SG_HPU_TYPE_R24_IO_FOUR_FAN_TRAY_STR \ 280 "R24 IO Four Fan Tray" 281 #define SG_HPU_TYPE_R24_IO_FOUR_FAN_TRAY_ID "FT" 282 #define SG_HPU_TYPE_R24_IO_FOUR_FAN_TRAY_SHORTNAME "FAN" 283 284 #define SG_HPU_TYPE_R24_CPU_SIX_FAN_TRAY ((4<<8)|2) /* 0x402 */ 285 #define SG_HPU_TYPE_R24_CPU_SIX_FAN_TRAY_STR \ 286 "R24 CPU Six Fan Tray" 287 #define SG_HPU_TYPE_R24_CPU_SIX_FAN_TRAY_ID "FT" 288 #define SG_HPU_TYPE_R24_CPU_SIX_FAN_TRAY_SHORTNAME "FAN" 289 290 #define SG_HPU_TYPE_RACK_FAN_TRAY ((4<<8)|3) /* 0x403 */ 291 #define SG_HPU_TYPE_RACK_FAN_TRAY_STR \ 292 "Rack Fan Tray" 293 #define SG_HPU_TYPE_RACK_FAN_TRAY_ID "FT" 294 #define SG_HPU_TYPE_RACK_FAN_TRAY_SHORTNAME "RACKFAN" 295 296 #define SG_HPU_TYPE_R12_THREE_FAN_TRAY ((4<<8)|4) /* 0x404 */ 297 #define SG_HPU_TYPE_R12_THREE_FAN_TRAY_STR \ 298 "R12 Three Fan Tray" 299 #define SG_HPU_TYPE_R12_THREE_FAN_TRAY_ID "FT" 300 #define SG_HPU_TYPE_R12_THREE_FAN_TRAY_SHORTNAME "FAN" 301 302 #define SG_HPU_TYPE_K12_IO_ONE_FAN_TRAY ((4<<8)|5) /* 0x405 */ 303 #define SG_HPU_TYPE_K12_IO_ONE_FAN_TRAY_STR \ 304 "K12 IO One Fan Tray" 305 #define SG_HPU_TYPE_K12_IO_ONE_FAN_TRAY_ID "FT" 306 #define SG_HPU_TYPE_K12_IO_ONE_FAN_TRAY_SHORTNAME "FAN" 307 308 #define SG_HPU_TYPE_K12_CPU_THREE_FAN_TRAY ((4<<8)|6) /* 0x406 */ 309 #define SG_HPU_TYPE_K12_CPU_THREE_FAN_TRAY_STR \ 310 "K12 CPU Three Fan Tray" 311 #define SG_HPU_TYPE_K12_CPU_THREE_FAN_TRAY_ID "FT" 312 #define SG_HPU_TYPE_K12_CPU_THREE_FAN_TRAY_SHORTNAME "FAN" 313 314 #define SG_HPU_TYPE_MD_TOP_IO_FAN_TRAY ((4<<8)|7) /* 0x407 */ 315 #define SG_HPU_TYPE_MD_TOP_IO_FAN_TRAY_STR \ 316 "MD Top I/O Fan Tray" 317 #define SG_HPU_TYPE_MD_TOP_IO_FAN_TRAY_ID "FT" 318 #define SG_HPU_TYPE_MD_TOP_IO_FAN_TRAY_SHORTNAME "FAN" 319 320 #define SG_HPU_TYPE_SP_FAN_TRAY ((4<<8)|8) /* 0x408 */ 321 #define SG_HPU_TYPE_SP_FAN_TRAY_STR \ 322 "SP Fan Tray" 323 #define SG_HPU_TYPE_SP_FAN_TRAY_ID "FT" 324 #define SG_HPU_TYPE_SP_FAN_TRAY_SHORTNAME "FAN" 325 326 #define SG_HPU_TYPE_MD_BOTTOM_IO_FAN_TRAY ((4<<8)|9) /* 0x409 */ 327 #define SG_HPU_TYPE_MD_BOTTOM_IO_FAN_TRAY_STR \ 328 "MD Bottom I/O Fan Tray" 329 #define SG_HPU_TYPE_MD_BOTTOM_IO_FAN_TRAY_ID "FT" 330 #define SG_HPU_TYPE_MD_BOTTOM_IO_FAN_TRAY_SHORTNAME "FAN" 331 332 #define SG_HPU_TYPE_SP_CPCI_IO_BOARD ((5<<8)|3) /* 0x503 */ 333 #define SG_HPU_TYPE_SP_CPCI_IO_BOARD_STR \ 334 "SP CPCI I/O board" 335 #define SG_HPU_TYPE_SP_CPCI_IO_BOARD_ID "IB" 336 337 #ifdef __cplusplus 338 } 339 #endif 340 341 #endif /* _SYS_SGENV_TAG_H */ 342