xref: /illumos-gate/usr/src/cmd/picl/plugins/inc/picldefs.h (revision 5422785d352a2bb398daceab3d1898a8aa64d006)
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 
133 /*
134  * Solaris driver property names
135  */
136 #define	PICL_PROP_INSTANCE		"instance"
137 #define	PICL_PROP_BINDING_NAME		"binding-name"
138 #define	PICL_PROP_BUS_ADDR		"bus-addr"
139 #define	PICL_PROP_DRIVER_NAME		"driver-name"
140 #define	PICL_PROP_DEVFS_PATH		"devfs-path"
141 #define	PICL_PROP_STATUS		"status"
142 
143 /*
144  * PICL property names
145  */
146 #define	PICL_PROP_PLATFORM_NAME			"PlatformName"
147 #define	PICL_PROP_SYSNAME			"OS-Name"
148 #define	PICL_PROP_NODENAME			"HostName"
149 #define	PICL_PROP_MACHINE			"PlatformGroup"
150 #define	PICL_PROP_RELEASE			"OS-Release"
151 #define	PICL_PROP_VERSION			"OS-Version"
152 #define	PICL_PROP_SIZE				"Size"
153 #define	PICL_PROP_ID				"ID"
154 #define	PICL_PROP_STATE				"State"
155 #define	PICL_PROP_PROCESSOR_TYPE		"ProcessorType"
156 #define	PICL_PROP_FPUTYPE			"FPUType"
157 #define	PICL_PROP_STATE_BEGIN			"StateBegin"
158 #define	PICL_PROP_FFB_BOARD_REV			"FFB-Board-Rev"
159 #define	PICL_PROP_FFB_FBRAM_VER			"FFB-FBRAM-Ver"
160 #define	PICL_PROP_FFB_DAC_VER			"FFB-DAC-Ver"
161 #define	PICL_PROP_UNIT_ADDRESS			"UnitAddress"
162 #define	PICL_PROP_SLOT				"Slot"
163 #define	PICL_PROP_DEVICE_ID			"DeviceID"
164 #define	PICL_PROP_TRANSFER_SIZE			"TransferSize"
165 #define	PICL_PROP_BASEADDRESS			"BaseAddress"
166 #define	PICL_PROP_INTERLEAVE_FACTOR		"InterleaveFactor"
167 #define	PICL_PROP_ADDRESSMASK			"AddressMask"
168 #define	PICL_PROP_ADDRESSMATCH			"AddressMatch"
169 #define	PICL_PROP_LABEL				"Label"
170 #define	PICL_PROP_CONTAINER			"Container"
171 #define	PICL_PROP_OFFSET			"Offset"
172 #define	PICL_PROP_LENGTH			"Length"
173 #define	PICL_PROP_PROTECTED			"Protected"
174 #define	PICL_PROP_NUM_SEGMENTS			"#Segments"
175 #define	PICL_PROP_DESCRIPTOR			"Descriptor"
176 #define	PICL_PROP_PACKET_TABLE			"PacketTable"
177 #define	PICL_PROP_NUM_TAGS			"#Packets"
178 #define	PICL_PROP_ADD_SEGMENT			"AddSegment"
179 #define	PICL_PROP_DELETE_PACKET			"DeletePacket"
180 #define	PICL_PROP_ADD_PACKET			"AddPacket"
181 #define	PICL_PROP_DELETE_SEGMENT		"DeleteSegment"
182 #define	PICL_PROP_TAG				"Tag"
183 #define	PICL_PROP_PAYLOAD			"Payload"
184 #define	PICL_PROP_FRUDATA_AVAIL			"FRUDataAvailable"
185 #define	PICL_PROP_DEVICEPATH			"FRUDevicePath"
186 #define	PICL_PROP_FAN_SPEED			"Speed"
187 #define	PICL_PROP_FAN_SPEED_UNIT		"SpeedUnit"
188 #define	PICL_PROP_TEMPERATURE			"Temperature"
189 #define	PICL_PROP_CPU_AMB_TEMP			"AmbientTemperature"
190 #define	PICL_PROP_CPU_DIE_TEMP			"Temperature"
191 #define	PICL_PROP_IS_LOCATOR			"IsLocator"
192 #define	PICL_PROP_LOCATOR_NAME			"LocatorName"
193 #define	PICL_PROP_DEVICES			"Devices"
194 #define	PICL_PROP_ENV				"Environment"
195 #define	PICL_PROP_COLOR				"Color"
196 #define	PICL_PROP_SC_HANDLE			"SC_handle"
197 #define	PICL_PROP_FRU_TYPE			"FRUType"
198 #define	PICL_PROP_SLOT_TYPE			"SlotType"
199 #define	PICL_PROP_OPERATIONAL_STATUS		"OperationalStatus"
200 #define	PICL_PROP_VOLTAGE			"Voltage"
201 #define	PICL_PROP_CURRENT			"Current"
202 #define	PICL_PROP_CLASS				"Class"
203 #define	PICL_PROP_CONDITION			"Condition"
204 #define	PICL_REFPROP_LOC_PARENT			"_location_parent"
205 #define	PICL_REFPROP_FRU_PARENT			"_fru_parent"
206 #define	PICL_REFPROP_PORT_PARENT		"_port_parent"
207 #define	PICL_REFPROP_MEMORY_MODULE_GROUP	"_memory-module-group_"
208 #define	PICL_REFPROP_MEMORY_MODULE		"_memory-module_"
209 #define	PICL_REFPROP_SEEPROM_SRC		"_seeprom_source"
210 #define	PICL_PROP_DEVICE_TYPE			"device_type"
211 #define	PICL_PROP_PROBE_PATH			"PdevProbePath"
212 #define	PICL_PROP_WATCHDOG_ACTION		"WdAction"
213 #define	PICL_PROP_WATCHDOG_TIMEOUT		"WdTimeout"
214 #define	PICL_PROP_WATCHDOG_OPERATION		"WdOp"
215 #define	PICL_PROP_STATUS_TIME			"StatusTime"
216 #define	PICL_PROP_CONDITION			"Condition"
217 #define	PICL_PROP_CONDITION_TIME		"ConditionTime"
218 #define	PICL_PROP_CHASSIS_TYPE			"ChassisType"
219 #define	PICL_PROP_GEO_ADDR			"GeoAddr"
220 #define	PICL_PROP_ADMIN_LOCK			"AdminLock"
221 #define	PICL_PROP_PORT_TYPE			"PortType"
222 #define	PICL_PROP_SERIAL_NUMBER			"SerialNumber"
223 
224 #define	PICL_UNITADDR_LEN_MAX		256
225 
226 /*
227  * Additional PICL properties for Sun4v platforms
228  */
229 #define	PICL_PROP_BATTERY_STATUS		"BatteryStatus"
230 #define	PICL_PROP_EXPECTED			"Expected"
231 #define	PICL_PROP_FW_REVISION			"FW-version"
232 #define	PICL_PROP_HW_REVISION			"HW-version"
233 #define	PICL_PROP_IS_REPLACEABLE		"Replaceable"
234 #define	PICL_PROP_IS_HOT_SWAPPABLE		"HotSwappable"
235 #define	PICL_PROP_IS_FRU			"FRU"
236 #define	PICL_PROP_PHYS_DESCRIPTION		"Description"
237 #define	PICL_PROP_SPEED				"Speed"
238 #define	PICL_PROP_MFG_NAME			"MfgName"
239 #define	PICL_PROP_MODEL_NAME			"ModelName"
240 #define	PICL_PROP_SENSOR_VALUE			"SensorValue"
241 #define	PICL_PROP_BASE_UNITS			"BaseUnits"
242 #define	PICL_PROP_EXPONENT			"Exponent"
243 #define	PICL_PROP_RATE_UNITS			"RateUnits"
244 
245 /*
246  * Various threshold property names
247  */
248 #define	PICL_PROP_LOW_POWER_OFF			"LowPowerOffThreshold"
249 #define	PICL_PROP_LOW_SHUTDOWN			"LowShutdownThreshold"
250 #define	PICL_PROP_LOW_WARNING			"LowWarningThreshold"
251 #define	PICL_PROP_TARGET_TEMPERATURE		"TargetTemperature"
252 #define	PICL_PROP_HIGH_POWER_OFF		"HighPowerOffThreshold"
253 #define	PICL_PROP_HIGH_SHUTDOWN			"HighShutdownThreshold"
254 #define	PICL_PROP_HIGH_WARNING			"HighWarningThreshold"
255 
256 /*
257  * OBP property names
258  */
259 #define	OBP_PROP_UPA_PORTID		"upa-portid"
260 #define	OBP_PROP_PORTID			"portid"
261 #define	OBP_PROP_CPUID			"cpuid"
262 #define	OBP_PROP_SIZE_CELLS		"#size-cells"
263 #define	OBP_PROP_ADDRESS_CELLS		"#address-cells"
264 
265 /*
266  * PICL Event names
267  */
268 #define	PICLEVENT_SYSEVENT_DEVICE_ADDED		"sysevent-device-added"
269 #define	PICLEVENT_SYSEVENT_DEVICE_REMOVED	"sysevent-device-removed"
270 #define	PICLEVENT_DR_AP_STATE_CHANGE		"dr-ap-state-change"
271 #define	PICLEVENT_MC_ADDED			"picl-memory-controller-added"
272 #define	PICLEVENT_MC_REMOVED			"picl-memory-controller-removed"
273 #define	PICLEVENT_STATE_CHANGE			"picl-state-change"
274 #define	PICLEVENT_CONDITION_CHANGE		"picl-condition-change"
275 #define	PICLEVENT_CPU_STATE_CHANGE		"picl-cpu-node-state-change"
276 #define	PICLEVENT_DR_REQ			"dr-req"
277 
278 /*
279  * Contract Private
280  */
281 #define	PICL_FRU_ADDED			"picl-fru-added" /* PSARC/2000/546 */
282 #define	PICL_FRU_REMOVED		"picl-fru-removed" /* PSARC/2000/546 */
283 
284 /*
285  * PICL Event Argument Names
286  */
287 #define	PICLEVENTARG_DEVFS_PATH		"devfs-path"
288 #define	PICLEVENTARG_AP_ID		"ap-id"
289 #define	PICLEVENTARG_HINT		"hint"
290 #define	PICLEVENTARG_NODEHANDLE		"picl-nodehandle"
291 #define	PICLEVENTARG_DR_REQ_TYPE	"req-type"
292 #define	PICLEVENTARG_CPU_EV_TYPE	"cpu-ev-type"
293 #define	PICLEVENTARG_STATE		"State"
294 #define	PICLEVENTARG_LAST_STATE		"LastState"
295 #define	PICLEVENTARG_CONDITION		"Condition"
296 
297 /*
298  * PICL Label Names
299  */
300 #define	PICL_PROPVAL_LABEL_DIE		"Die"
301 #define	PICL_PROPVAL_LABEL_AMBIENT	"Ambient"
302 
303 /*
304  * Contract Private
305  */
306 #define	PICLEVENTARG_FRUHANDLE		"picl-fru-handle" /* PSARC/2000/546 */
307 #define	PICLEVENTARG_PARENTHANDLE	"picl-parent-handle" /* 2000/546 */
308 
309 /*
310  * The following are PICL PRIVATE event argument names
311  */
312 #define	PICLEVENTARG_EVENT_NAME		"piclevent-name"
313 #define	PICLEVENTARG_DATA_TYPE		"piclevent-data-type"
314 
315 /*
316  * The following are values of piclevent-data-type (PRIVATE)
317  */
318 #define	PICLEVENTARG_PICLEVENT_DATA	"piclevent-data"
319 
320 /* These values are used for PICLEVENT_CPU_STATE_CHANGE event */
321 #define	PICLEVENTARGVAL_ONLINE		"Online"
322 #define	PICLEVENTARGVAL_OFFLINE		"Offline"
323 
324 /*
325  * These values are used for PICLEVENT_STATE_CHANGE,
326  * PICLEVENT_CONDITION_CHANGE event
327  */
328 #define	PICLEVENTARGVAL_UNKNOWN		"unknown"
329 #define	PICLEVENTARGVAL_OK		"ok"
330 #define	PICLEVENTARGVAL_FAILING		"failing"
331 #define	PICLEVENTARGVAL_FAILED		"failed"
332 #define	PICLEVENTARGVAL_TESTING		"testing"
333 #define	PICLEVENTARGVAL_UNUSABLE	"unusable"
334 #define	PICLEVENTARGVAL_CONNECTING	"connecting"
335 #define	PICLEVENTARGVAL_DISCONNECTING	"disconnecting"
336 #define	PICLEVENTARGVAL_CONNECTED	"connected"
337 #define	PICLEVENTARGVAL_DISCONNECTED	"disconnected"
338 #define	PICLEVENTARGVAL_EMPTY		"empty"
339 #define	PICLEVENTARGVAL_CONFIGURED	"configured"
340 #define	PICLEVENTARGVAL_UNCONFIGURED	"unconfigured"
341 #define	PICLEVENTARGVAL_CONFIGURING	"configuring"
342 #define	PICLEVENTARGVAL_UNCONFIGURING	"unconfiguring"
343 #define	PICLEVENTARGVAL_UP		"up"
344 #define	PICLEVENTARGVAL_DOWN		"down"
345 
346 /* PSARC 2003/163 */
347 #define	PICLEVENTARGVAL_SENSOR_COND_WARNING	"warning"
348 #define	PICLEVENTARGVAL_SENSOR_COND_SHUTDOWN	"shutdown"
349 
350 /* PSARC 2003/231 */
351 /* watchdog property values */
352 #define	PICL_PROPVAL_WD_OP_ARM		"arm"
353 #define	PICL_PROPVAL_WD_OP_DISARM	"disarm"
354 #define	PICL_PROPVAL_WD_ACTION_NONE	"none"
355 #define	PICL_PROPVAL_WD_ACTION_REBOOT	"reboot"
356 #define	PICL_PROPVAL_WD_ACTION_ALARM	"alarm"
357 #define	PICL_PROPVAL_WD_ACTION_RESET	"reset"
358 #define	PICL_PROPVAL_WD_STATE_ARMED	"armed"
359 #define	PICL_PROPVAL_WD_STATE_DISARMED	"disarmed"
360 #define	PICL_PROPVAL_WD_STATE_EXPIRED	"expired"
361 
362 #ifdef	__cplusplus
363 }
364 #endif
365 
366 #endif	/* _PICLDEFS_H */
367