xref: /titanic_50/usr/src/cmd/picl/plugins/inc/picldefs.h (revision a1196271e1d6e6ce9cc40c8b94f5b659935e82bc)
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 2009 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_PICLDEFS_H
28 #define	_PICLDEFS_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /*
35  * PICL Tree paths
36  */
37 #define	PLATFORM_PATH		"/platform"
38 #define	MEMORY_PATH		"/platform/memory"
39 #define	FRUTREE_PATH		"/frutree"
40 #define	PICL_FRUTREE_CHASSIS	"/frutree/chassis"
41 
42 /*
43  * PICL classes
44  */
45 #define	PICL_CLASS_BYTE			"byte"
46 #define	PICL_CLASS_BLOCK		"block"
47 #define	PICL_CLASS_DISK			"disk"
48 #define	PICL_CLASS_CDROM		"cdrom"
49 #define	PICL_CLASS_FLOPPY		"floppy"
50 #define	PICL_CLASS_TAPE			"tape"
51 #define	PICL_CLASS_FABRIC		"fabric"
52 #define	PICL_CLASS_SAS			"sas"
53 #define	PICL_CLASS_ATTACHMENT_POINT	"attachment-point"
54 #define	PICL_CLASS_DISPLAY		"display"
55 #define	PICL_CLASS_SERIAL		"serial"
56 #define	PICL_CLASS_PARALLEL		"parallel"
57 #define	PICL_CLASS_SEEPROM		"seeprom"
58 #define	PICL_CLASS_KEYBOARD		"keyboard"
59 #define	PICL_CLASS_MOUSE		"mouse"
60 #define	PICL_CLASS_MEMORY		"memory"
61 #define	PICL_CLASS_I2C			"i2c"
62 #define	PICL_CLASS_USB			"usb"
63 #define	PICL_CLASS_ISA			"isa"
64 #define	PICL_CLASS_DMA			"dma"
65 #define	PICL_CLASS_OBP_DEVICE		"obp-device"
66 #define	PICL_CLASS_TEMPERATURE_DEVICE	"temperature-device"
67 #define	PICL_CLASS_TEMPERATURE_SENSOR	"temperature-sensor"
68 #define	PICL_CLASS_TEMPERATURE_INDICATOR	"temperature-indicator"
69 #define	PICL_CLASS_VOLTAGE_INDICATOR	"voltage-indicator"
70 #define	PICL_CLASS_VOLTAGE_SENSOR	"voltage-sensor"
71 #define	PICL_CLASS_CURRENT_INDICATOR	"current-indicator"
72 #define	PICL_CLASS_CURRENT_SENSOR	"current-sensor"
73 #define	PICL_CLASS_LED			"led"
74 #define	PICL_CLASS_FAN			"fan"
75 #define	PICL_CLASS_FAN_CONTROL		"fan-control"
76 #define	PICL_CLASS_KEYSWITCH		"keyswitch"
77 #define	PICL_CLASS_EBUS			"ebus"
78 #define	PICL_CLASS_SYSTEM_CONTROLLER	"system-controller"
79 #define	PICL_CLASS_SERVICE_PROCESSOR	"service-processor"
80 #define	PICL_CLASS_HARDWARE_MONITOR	"hardware-monitor"
81 #define	PICL_CLASS_FLASHPROM		"flashprom"
82 #define	PICL_CLASS_SEEPROM		"seeprom"
83 #define	PICL_CLASS_FIREWIRE		"firewire"
84 #define	PICL_CLASS_I86CPUS		"cpus"
85 #define	PICL_CLASS_CPU			"cpu"
86 #define	PICL_CLASS_UPA			"upa"
87 #define	PICL_CLASS_PCI			"pci"
88 #define	PICL_CLASS_PCIEX		"pciex"
89 #define	PICL_CLASS_PMU			"pmu"
90 #define	PICL_CLASS_SOUND		"sound"
91 #define	PICL_CLASS_SBUS			"sbus"
92 #define	PICL_CLASS_SCSI			"scsi"
93 #define	PICL_CLASS_SCSI2		"scsi-2"
94 #define	PICL_CLASS_GPTWO		"gptwo"
95 #define	PICL_CLASS_JBUS			"jbus"
96 #define	PICL_CLASS_MEMORY		"memory"
97 #define	PICL_CLASS_MEMORY_SEGMENT	"memory-segment"
98 #define	PICL_CLASS_MEMORY_BANK		"memory-bank"
99 #define	PICL_CLASS_MEMORY_CONTROLLER	"memory-controller"
100 #define	PICL_CLASS_MEMORY_MODULE_GROUP	"memory-module-group"
101 #define	PICL_CLASS_MEMORY_MODULE	"memory-module"
102 #define	PICL_CLASS_FRU			"fru"
103 #define	PICL_CLASS_LOCATION		"location"
104 #define	PICL_CLASS_SECTION		"fru-section"
105 #define	PICL_CLASS_SEGMENT		"fru-segment"
106 #define	PICL_CLASS_PORT			"port"
107 #define	PICL_CLASS_WATCHDOG_CONTROLLER	"watchdog-controller"
108 #define	PICL_CLASS_WATCHDOG_TIMER	"watchdog-timer"
109 #define	PICL_CLASS_CHASSIS_SERIAL_NUM	"chassis-serial-number"
110 #define	PICL_CLASS_MULTIPATH		"multipath"
111 
112 /*
113  * Sun4v platforms do not create /frutree; instead they create
114  * the /physical-platform subtree. The following is the list of
115  * additional PICL classes that may be present in /physical-platform
116  */
117 #define	PICL_CLASS_ALARM		"alarm"
118 #define	PICL_CLASS_BACKPLANE		"backplane"
119 #define	PICL_CLASS_BATTERY		"battery"
120 #define	PICL_CLASS_CHASSIS		"chassis"
121 #define	PICL_CLASS_CONTAINER		"container"
122 #define	PICL_CLASS_MODULE		"module"
123 #define	PICL_CLASS_OTHER		"other"
124 #define	PICL_CLASS_POWERSUPPLY		"power-supply"
125 #define	PICL_CLASS_RPM_INDICATOR	"rpm-indicator"
126 #define	PICL_CLASS_RPM_SENSOR		"rpm-sensor"
127 #define	PICL_CLASS_PRESENCE_INDICATOR	"presence-indicator"
128 #define	PICL_CLASS_INDICATOR		"indicator"
129 #define	PICL_CLASS_SENSOR		"sensor"
130 #define	PICL_CLASS_STACK		"stack"
131 #define	PICL_CLASS_UNKNOWN		"unknown"
132 #define	PICL_CLASS_HUMIDITY_SENSOR	"humidity-sensor"
133 #define	PICL_CLASS_HUMIDITY_INDICATOR	"humidity-indicator"
134 
135 /*
136  * Solaris driver property names
137  */
138 #define	PICL_PROP_INSTANCE		"instance"
139 #define	PICL_PROP_BINDING_NAME		"binding-name"
140 #define	PICL_PROP_BUS_ADDR		"bus-addr"
141 #define	PICL_PROP_DRIVER_NAME		"driver-name"
142 #define	PICL_PROP_DEVFS_PATH		"devfs-path"
143 #define	PICL_PROP_STATUS		"status"
144 
145 /*
146  * PICL property names
147  */
148 #define	PICL_PROP_PLATFORM_NAME			"PlatformName"
149 #define	PICL_PROP_SYSNAME			"OS-Name"
150 #define	PICL_PROP_NODENAME			"HostName"
151 #define	PICL_PROP_MACHINE			"PlatformGroup"
152 #define	PICL_PROP_RELEASE			"OS-Release"
153 #define	PICL_PROP_VERSION			"OS-Version"
154 #define	PICL_PROP_SIZE				"Size"
155 #define	PICL_PROP_ID				"ID"
156 #define	PICL_PROP_STATE				"State"
157 #define	PICL_PROP_PROCESSOR_TYPE		"ProcessorType"
158 #define	PICL_PROP_FPUTYPE			"FPUType"
159 #define	PICL_PROP_STATE_BEGIN			"StateBegin"
160 #define	PICL_PROP_FFB_BOARD_REV			"FFB-Board-Rev"
161 #define	PICL_PROP_FFB_FBRAM_VER			"FFB-FBRAM-Ver"
162 #define	PICL_PROP_FFB_DAC_VER			"FFB-DAC-Ver"
163 #define	PICL_PROP_UNIT_ADDRESS			"UnitAddress"
164 #define	PICL_PROP_SLOT				"Slot"
165 #define	PICL_PROP_DEVICE_ID			"DeviceID"
166 #define	PICL_PROP_TRANSFER_SIZE			"TransferSize"
167 #define	PICL_PROP_BASEADDRESS			"BaseAddress"
168 #define	PICL_PROP_INTERLEAVE_FACTOR		"InterleaveFactor"
169 #define	PICL_PROP_ADDRESSMASK			"AddressMask"
170 #define	PICL_PROP_ADDRESSMATCH			"AddressMatch"
171 #define	PICL_PROP_LABEL				"Label"
172 #define	PICL_PROP_CONTAINER			"Container"
173 #define	PICL_PROP_OFFSET			"Offset"
174 #define	PICL_PROP_LENGTH			"Length"
175 #define	PICL_PROP_PROTECTED			"Protected"
176 #define	PICL_PROP_NUM_SEGMENTS			"#Segments"
177 #define	PICL_PROP_DESCRIPTOR			"Descriptor"
178 #define	PICL_PROP_PACKET_TABLE			"PacketTable"
179 #define	PICL_PROP_NUM_TAGS			"#Packets"
180 #define	PICL_PROP_ADD_SEGMENT			"AddSegment"
181 #define	PICL_PROP_DELETE_PACKET			"DeletePacket"
182 #define	PICL_PROP_ADD_PACKET			"AddPacket"
183 #define	PICL_PROP_DELETE_SEGMENT		"DeleteSegment"
184 #define	PICL_PROP_TAG				"Tag"
185 #define	PICL_PROP_PAYLOAD			"Payload"
186 #define	PICL_PROP_FRUDATA_AVAIL			"FRUDataAvailable"
187 #define	PICL_PROP_DEVICEPATH			"FRUDevicePath"
188 #define	PICL_PROP_FAN_SPEED			"Speed"
189 #define	PICL_PROP_FAN_SPEED_UNIT		"SpeedUnit"
190 #define	PICL_PROP_TEMPERATURE			"Temperature"
191 #define	PICL_PROP_CPU_AMB_TEMP			"AmbientTemperature"
192 #define	PICL_PROP_CPU_DIE_TEMP			"Temperature"
193 #define	PICL_PROP_IS_LOCATOR			"IsLocator"
194 #define	PICL_PROP_LOCATOR_NAME			"LocatorName"
195 #define	PICL_PROP_DEVICES			"Devices"
196 #define	PICL_PROP_ENV				"Environment"
197 #define	PICL_PROP_COLOR				"Color"
198 #define	PICL_PROP_SC_HANDLE			"SC_handle"
199 #define	PICL_PROP_FRU_TYPE			"FRUType"
200 #define	PICL_PROP_SLOT_TYPE			"SlotType"
201 #define	PICL_PROP_OPERATIONAL_STATUS		"OperationalStatus"
202 #define	PICL_PROP_VOLTAGE			"Voltage"
203 #define	PICL_PROP_CURRENT			"Current"
204 #define	PICL_PROP_CLASS				"Class"
205 #define	PICL_PROP_CONDITION			"Condition"
206 #define	PICL_REFPROP_LOC_PARENT			"_location_parent"
207 #define	PICL_REFPROP_FRU_PARENT			"_fru_parent"
208 #define	PICL_REFPROP_PORT_PARENT		"_port_parent"
209 #define	PICL_REFPROP_MEMORY_MODULE_GROUP	"_memory-module-group_"
210 #define	PICL_REFPROP_MEMORY_MODULE		"_memory-module_"
211 #define	PICL_REFPROP_SEEPROM_SRC		"_seeprom_source"
212 #define	PICL_PROP_DEVICE_TYPE			"device_type"
213 #define	PICL_PROP_PROBE_PATH			"PdevProbePath"
214 #define	PICL_PROP_WATCHDOG_ACTION		"WdAction"
215 #define	PICL_PROP_WATCHDOG_TIMEOUT		"WdTimeout"
216 #define	PICL_PROP_WATCHDOG_OPERATION		"WdOp"
217 #define	PICL_PROP_STATUS_TIME			"StatusTime"
218 #define	PICL_PROP_CONDITION			"Condition"
219 #define	PICL_PROP_CONDITION_TIME		"ConditionTime"
220 #define	PICL_PROP_CHASSIS_TYPE			"ChassisType"
221 #define	PICL_PROP_GEO_ADDR			"GeoAddr"
222 #define	PICL_PROP_ADMIN_LOCK			"AdminLock"
223 #define	PICL_PROP_PORT_TYPE			"PortType"
224 #define	PICL_PROP_SERIAL_NUMBER			"SerialNumber"
225 
226 #define	PICL_UNITADDR_LEN_MAX		256
227 
228 /*
229  * Additional PICL properties for Sun4v platforms
230  */
231 #define	PICL_PROP_BATTERY_STATUS		"BatteryStatus"
232 #define	PICL_PROP_EXPECTED			"Expected"
233 #define	PICL_PROP_FW_REVISION			"FW-version"
234 #define	PICL_PROP_HW_REVISION			"HW-version"
235 #define	PICL_PROP_IS_REPLACEABLE		"Replaceable"
236 #define	PICL_PROP_IS_HOT_SWAPPABLE		"HotSwappable"
237 #define	PICL_PROP_IS_FRU			"FRU"
238 #define	PICL_PROP_PHYS_DESCRIPTION		"Description"
239 #define	PICL_PROP_SPEED				"Speed"
240 #define	PICL_PROP_MFG_NAME			"MfgName"
241 #define	PICL_PROP_MODEL_NAME			"ModelName"
242 #define	PICL_PROP_SENSOR_VALUE			"SensorValue"
243 #define	PICL_PROP_BASE_UNITS			"BaseUnits"
244 #define	PICL_PROP_EXPONENT			"Exponent"
245 #define	PICL_PROP_RATE_UNITS			"RateUnits"
246 #define	PICL_PROP_HUMIDITY			"Humidity"
247 
248 /*
249  * Various threshold property names
250  */
251 #define	PICL_PROP_LOW_POWER_OFF			"LowPowerOffThreshold"
252 #define	PICL_PROP_LOW_SHUTDOWN			"LowShutdownThreshold"
253 #define	PICL_PROP_LOW_WARNING			"LowWarningThreshold"
254 #define	PICL_PROP_TARGET_TEMPERATURE		"TargetTemperature"
255 #define	PICL_PROP_HIGH_POWER_OFF		"HighPowerOffThreshold"
256 #define	PICL_PROP_HIGH_SHUTDOWN			"HighShutdownThreshold"
257 #define	PICL_PROP_HIGH_WARNING			"HighWarningThreshold"
258 
259 /*
260  * OBP property names
261  */
262 #define	OBP_PROP_UPA_PORTID		"upa-portid"
263 #define	OBP_PROP_PORTID			"portid"
264 #define	OBP_PROP_CPUID			"cpuid"
265 #define	OBP_PROP_SIZE_CELLS		"#size-cells"
266 #define	OBP_PROP_ADDRESS_CELLS		"#address-cells"
267 
268 /*
269  * PICL Event names
270  */
271 #define	PICLEVENT_SYSEVENT_DEVICE_ADDED		"sysevent-device-added"
272 #define	PICLEVENT_SYSEVENT_DEVICE_REMOVED	"sysevent-device-removed"
273 #define	PICLEVENT_DR_AP_STATE_CHANGE		"dr-ap-state-change"
274 #define	PICLEVENT_MC_ADDED			"picl-memory-controller-added"
275 #define	PICLEVENT_MC_REMOVED			"picl-memory-controller-removed"
276 #define	PICLEVENT_STATE_CHANGE			"picl-state-change"
277 #define	PICLEVENT_CONDITION_CHANGE		"picl-condition-change"
278 #define	PICLEVENT_CPU_STATE_CHANGE		"picl-cpu-node-state-change"
279 #define	PICLEVENT_DR_REQ			"dr-req"
280 
281 /*
282  * Contract Private
283  */
284 #define	PICL_FRU_ADDED			"picl-fru-added" /* PSARC/2000/546 */
285 #define	PICL_FRU_REMOVED		"picl-fru-removed" /* PSARC/2000/546 */
286 
287 /*
288  * PICL Event Argument Names
289  */
290 #define	PICLEVENTARG_DEVFS_PATH		"devfs-path"
291 #define	PICLEVENTARG_AP_ID		"ap-id"
292 #define	PICLEVENTARG_HINT		"hint"
293 #define	PICLEVENTARG_NODEHANDLE		"picl-nodehandle"
294 #define	PICLEVENTARG_DR_REQ_TYPE	"req-type"
295 #define	PICLEVENTARG_CPU_EV_TYPE	"cpu-ev-type"
296 #define	PICLEVENTARG_STATE		"State"
297 #define	PICLEVENTARG_LAST_STATE		"LastState"
298 #define	PICLEVENTARG_CONDITION		"Condition"
299 
300 /*
301  * PICL Label Names
302  */
303 #define	PICL_PROPVAL_LABEL_DIE		"Die"
304 #define	PICL_PROPVAL_LABEL_AMBIENT	"Ambient"
305 
306 /*
307  * Contract Private
308  */
309 #define	PICLEVENTARG_FRUHANDLE		"picl-fru-handle" /* PSARC/2000/546 */
310 #define	PICLEVENTARG_PARENTHANDLE	"picl-parent-handle" /* 2000/546 */
311 
312 /*
313  * The following are PICL PRIVATE event argument names
314  */
315 #define	PICLEVENTARG_EVENT_NAME		"piclevent-name"
316 #define	PICLEVENTARG_DATA_TYPE		"piclevent-data-type"
317 
318 /*
319  * The following are values of piclevent-data-type (PRIVATE)
320  */
321 #define	PICLEVENTARG_PICLEVENT_DATA	"piclevent-data"
322 
323 /* These values are used for PICLEVENT_CPU_STATE_CHANGE event */
324 #define	PICLEVENTARGVAL_ONLINE		"Online"
325 #define	PICLEVENTARGVAL_OFFLINE		"Offline"
326 
327 /*
328  * These values are used for PICLEVENT_STATE_CHANGE,
329  * PICLEVENT_CONDITION_CHANGE event
330  */
331 #define	PICLEVENTARGVAL_UNKNOWN		"unknown"
332 #define	PICLEVENTARGVAL_OK		"ok"
333 #define	PICLEVENTARGVAL_FAILING		"failing"
334 #define	PICLEVENTARGVAL_FAILED		"failed"
335 #define	PICLEVENTARGVAL_TESTING		"testing"
336 #define	PICLEVENTARGVAL_UNUSABLE	"unusable"
337 #define	PICLEVENTARGVAL_CONNECTING	"connecting"
338 #define	PICLEVENTARGVAL_DISCONNECTING	"disconnecting"
339 #define	PICLEVENTARGVAL_CONNECTED	"connected"
340 #define	PICLEVENTARGVAL_DISCONNECTED	"disconnected"
341 #define	PICLEVENTARGVAL_EMPTY		"empty"
342 #define	PICLEVENTARGVAL_CONFIGURED	"configured"
343 #define	PICLEVENTARGVAL_UNCONFIGURED	"unconfigured"
344 #define	PICLEVENTARGVAL_CONFIGURING	"configuring"
345 #define	PICLEVENTARGVAL_UNCONFIGURING	"unconfiguring"
346 #define	PICLEVENTARGVAL_UP		"up"
347 #define	PICLEVENTARGVAL_DOWN		"down"
348 
349 /* PSARC 2003/163 */
350 #define	PICLEVENTARGVAL_SENSOR_COND_WARNING	"warning"
351 #define	PICLEVENTARGVAL_SENSOR_COND_SHUTDOWN	"shutdown"
352 
353 /* PSARC 2003/231 */
354 /* watchdog property values */
355 #define	PICL_PROPVAL_WD_OP_ARM		"arm"
356 #define	PICL_PROPVAL_WD_OP_DISARM	"disarm"
357 #define	PICL_PROPVAL_WD_ACTION_NONE	"none"
358 #define	PICL_PROPVAL_WD_ACTION_REBOOT	"reboot"
359 #define	PICL_PROPVAL_WD_ACTION_ALARM	"alarm"
360 #define	PICL_PROPVAL_WD_ACTION_RESET	"reset"
361 #define	PICL_PROPVAL_WD_STATE_ARMED	"armed"
362 #define	PICL_PROPVAL_WD_STATE_DISARMED	"disarmed"
363 #define	PICL_PROPVAL_WD_STATE_EXPIRED	"expired"
364 
365 #ifdef	__cplusplus
366 }
367 #endif
368 
369 #endif	/* _PICLDEFS_H */
370