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