xref: /titanic_41/usr/src/cmd/picl/plugins/inc/picldefs.h (revision ebd1706e95186ddae1d4c0d63c47544cf33832ee)
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, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * PICL Tree paths
38  */
39 #define	PLATFORM_PATH		"/platform"
40 #define	MEMORY_PATH		"/platform/memory"
41 #define	FRUTREE_PATH		"/frutree"
42 #define	PICL_FRUTREE_CHASSIS	"/frutree/chassis"
43 
44 /*
45  * PICL classes
46  */
47 #define	PICL_CLASS_BYTE			"byte"
48 #define	PICL_CLASS_BLOCK		"block"
49 #define	PICL_CLASS_DISK			"disk"
50 #define	PICL_CLASS_CDROM		"cdrom"
51 #define	PICL_CLASS_FLOPPY		"floppy"
52 #define	PICL_CLASS_TAPE			"tape"
53 #define	PICL_CLASS_FABRIC		"fabric"
54 #define	PICL_CLASS_ATTACHMENT_POINT	"attachment-point"
55 #define	PICL_CLASS_DISPLAY		"display"
56 #define	PICL_CLASS_SERIAL		"serial"
57 #define	PICL_CLASS_PARALLEL		"parallel"
58 #define	PICL_CLASS_SEEPROM		"seeprom"
59 #define	PICL_CLASS_KEYBOARD		"keyboard"
60 #define	PICL_CLASS_MOUSE		"mouse"
61 #define	PICL_CLASS_MEMORY		"memory"
62 #define	PICL_CLASS_I2C			"i2c"
63 #define	PICL_CLASS_USB			"usb"
64 #define	PICL_CLASS_ISA			"isa"
65 #define	PICL_CLASS_DMA			"dma"
66 #define	PICL_CLASS_OBP_DEVICE		"obp-device"
67 #define	PICL_CLASS_TEMPERATURE_DEVICE	"temperature-device"
68 #define	PICL_CLASS_TEMPERATURE_SENSOR	"temperature-sensor"
69 #define	PICL_CLASS_TEMPERATURE_INDICATOR	"temperature-indicator"
70 #define	PICL_CLASS_VOLTAGE_INDICATOR	"voltage-indicator"
71 #define	PICL_CLASS_VOLTAGE_SENSOR	"voltage-sensor"
72 #define	PICL_CLASS_CURRENT_INDICATOR	"current-indicator"
73 #define	PICL_CLASS_CURRENT_SENSOR	"current-sensor"
74 #define	PICL_CLASS_LED			"led"
75 #define	PICL_CLASS_FAN			"fan"
76 #define	PICL_CLASS_FAN_CONTROL		"fan-control"
77 #define	PICL_CLASS_KEYSWITCH		"keyswitch"
78 #define	PICL_CLASS_EBUS			"ebus"
79 #define	PICL_CLASS_SYSTEM_CONTROLLER	"system-controller"
80 #define	PICL_CLASS_SERVICE_PROCESSOR	"service-processor"
81 #define	PICL_CLASS_HARDWARE_MONITOR	"hardware-monitor"
82 #define	PICL_CLASS_FLASHPROM		"flashprom"
83 #define	PICL_CLASS_SEEPROM		"seeprom"
84 #define	PICL_CLASS_FIREWIRE		"firewire"
85 #define	PICL_CLASS_I86CPUS		"cpus"
86 #define	PICL_CLASS_CPU			"cpu"
87 #define	PICL_CLASS_UPA			"upa"
88 #define	PICL_CLASS_PCI			"pci"
89 #define	PICL_CLASS_PCIEX		"pciex"
90 #define	PICL_CLASS_PMU			"pmu"
91 #define	PICL_CLASS_SOUND		"sound"
92 #define	PICL_CLASS_SBUS			"sbus"
93 #define	PICL_CLASS_SCSI			"scsi"
94 #define	PICL_CLASS_SCSI2		"scsi-2"
95 #define	PICL_CLASS_GPTWO		"gptwo"
96 #define	PICL_CLASS_JBUS			"jbus"
97 #define	PICL_CLASS_MEMORY		"memory"
98 #define	PICL_CLASS_MEMORY_SEGMENT	"memory-segment"
99 #define	PICL_CLASS_MEMORY_BANK		"memory-bank"
100 #define	PICL_CLASS_MEMORY_CONTROLLER	"memory-controller"
101 #define	PICL_CLASS_MEMORY_MODULE_GROUP	"memory-module-group"
102 #define	PICL_CLASS_MEMORY_MODULE	"memory-module"
103 #define	PICL_CLASS_FRU			"fru"
104 #define	PICL_CLASS_LOCATION		"location"
105 #define	PICL_CLASS_SECTION		"fru-section"
106 #define	PICL_CLASS_SEGMENT		"fru-segment"
107 #define	PICL_CLASS_PORT			"port"
108 #define	PICL_CLASS_WATCHDOG_CONTROLLER	"watchdog-controller"
109 #define	PICL_CLASS_WATCHDOG_TIMER	"watchdog-timer"
110 
111 /*
112  * Solaris driver property names
113  */
114 #define	PICL_PROP_INSTANCE		"instance"
115 #define	PICL_PROP_BINDING_NAME		"binding-name"
116 #define	PICL_PROP_BUS_ADDR		"bus-addr"
117 #define	PICL_PROP_DRIVER_NAME		"driver-name"
118 #define	PICL_PROP_DEVFS_PATH		"devfs-path"
119 #define	PICL_PROP_STATUS		"status"
120 
121 /*
122  * PICL property names
123  */
124 #define	PICL_PROP_PLATFORM_NAME			"PlatformName"
125 #define	PICL_PROP_SYSNAME			"OS-Name"
126 #define	PICL_PROP_NODENAME			"HostName"
127 #define	PICL_PROP_MACHINE			"PlatformGroup"
128 #define	PICL_PROP_RELEASE			"OS-Release"
129 #define	PICL_PROP_VERSION			"OS-Version"
130 #define	PICL_PROP_SIZE				"Size"
131 #define	PICL_PROP_ID				"ID"
132 #define	PICL_PROP_STATE				"State"
133 #define	PICL_PROP_PROCESSOR_TYPE		"ProcessorType"
134 #define	PICL_PROP_FPUTYPE			"FPUType"
135 #define	PICL_PROP_STATE_BEGIN			"StateBegin"
136 #define	PICL_PROP_FFB_BOARD_REV			"FFB-Board-Rev"
137 #define	PICL_PROP_FFB_FBRAM_VER			"FFB-FBRAM-Ver"
138 #define	PICL_PROP_FFB_DAC_VER			"FFB-DAC-Ver"
139 #define	PICL_PROP_UNIT_ADDRESS			"UnitAddress"
140 #define	PICL_PROP_SLOT				"Slot"
141 #define	PICL_PROP_DEVICE_ID			"DeviceID"
142 #define	PICL_PROP_TRANSFER_SIZE			"TransferSize"
143 #define	PICL_PROP_BASEADDRESS			"BaseAddress"
144 #define	PICL_PROP_INTERLEAVE_FACTOR		"InterleaveFactor"
145 #define	PICL_PROP_ADDRESSMASK			"AddressMask"
146 #define	PICL_PROP_ADDRESSMATCH			"AddressMatch"
147 #define	PICL_PROP_LABEL				"Label"
148 #define	PICL_PROP_CONTAINER			"Container"
149 #define	PICL_PROP_OFFSET			"Offset"
150 #define	PICL_PROP_LENGTH			"Length"
151 #define	PICL_PROP_PROTECTED			"Protected"
152 #define	PICL_PROP_NUM_SEGMENTS			"#Segments"
153 #define	PICL_PROP_DESCRIPTOR			"Descriptor"
154 #define	PICL_PROP_PACKET_TABLE			"PacketTable"
155 #define	PICL_PROP_NUM_TAGS			"#Packets"
156 #define	PICL_PROP_ADD_SEGMENT			"AddSegment"
157 #define	PICL_PROP_DELETE_PACKET			"DeletePacket"
158 #define	PICL_PROP_ADD_PACKET			"AddPacket"
159 #define	PICL_PROP_DELETE_SEGMENT		"DeleteSegment"
160 #define	PICL_PROP_TAG				"Tag"
161 #define	PICL_PROP_PAYLOAD			"Payload"
162 #define	PICL_PROP_FRUDATA_AVAIL			"FRUDataAvailable"
163 #define	PICL_PROP_DEVICEPATH			"FRUDevicePath"
164 #define	PICL_PROP_FAN_SPEED			"Speed"
165 #define	PICL_PROP_FAN_SPEED_UNIT		"SpeedUnit"
166 #define	PICL_PROP_TEMPERATURE			"Temperature"
167 #define	PICL_PROP_CPU_AMB_TEMP			"AmbientTemperature"
168 #define	PICL_PROP_CPU_DIE_TEMP			"Temperature"
169 #define	PICL_PROP_IS_LOCATOR			"IsLocator"
170 #define	PICL_PROP_LOCATOR_NAME			"LocatorName"
171 #define	PICL_PROP_DEVICES			"Devices"
172 #define	PICL_PROP_ENV				"Environment"
173 #define	PICL_PROP_COLOR				"Color"
174 #define	PICL_PROP_SC_HANDLE			"SC_handle"
175 #define	PICL_PROP_FRU_TYPE			"FRUType"
176 #define	PICL_PROP_SLOT_TYPE			"SlotType"
177 #define	PICL_PROP_OPERATIONAL_STATUS		"OperationalStatus"
178 #define	PICL_PROP_VOLTAGE			"Voltage"
179 #define	PICL_PROP_CURRENT			"Current"
180 #define	PICL_PROP_CLASS				"Class"
181 #define	PICL_PROP_CONDITION			"Condition"
182 #define	PICL_REFPROP_LOC_PARENT			"_location_parent"
183 #define	PICL_REFPROP_FRU_PARENT			"_fru_parent"
184 #define	PICL_REFPROP_PORT_PARENT		"_port_parent"
185 #define	PICL_REFPROP_MEMORY_MODULE_GROUP	"_memory-module-group_"
186 #define	PICL_REFPROP_MEMORY_MODULE		"_memory-module_"
187 #define	PICL_REFPROP_SEEPROM_SRC		"_seeprom_source"
188 #define	PICL_PROP_DEVICE_TYPE			"device_type"
189 #define	PICL_PROP_PROBE_PATH			"PdevProbePath"
190 #define	PICL_PROP_WATCHDOG_ACTION		"WdAction"
191 #define	PICL_PROP_WATCHDOG_TIMEOUT		"WdTimeout"
192 #define	PICL_PROP_WATCHDOG_OPERATION		"WdOp"
193 #define	PICL_PROP_STATUS_TIME			"StatusTime"
194 #define	PICL_PROP_CONDITION			"Condition"
195 #define	PICL_PROP_CONDITION_TIME		"ConditionTime"
196 #define	PICL_PROP_CHASSIS_TYPE			"ChassisType"
197 #define	PICL_PROP_GEO_ADDR			"GeoAddr"
198 #define	PICL_PROP_ADMIN_LOCK			"AdminLock"
199 #define	PICL_PROP_PORT_TYPE			"PortType"
200 
201 #define	PICL_UNITADDR_LEN_MAX		256
202 
203 /*
204  * Various threshold property names
205  */
206 #define	PICL_PROP_LOW_POWER_OFF			"LowPowerOffThreshold"
207 #define	PICL_PROP_LOW_SHUTDOWN			"LowShutdownThreshold"
208 #define	PICL_PROP_LOW_WARNING			"LowWarningThreshold"
209 #define	PICL_PROP_TARGET_TEMPERATURE		"TargetTemperature"
210 #define	PICL_PROP_HIGH_POWER_OFF		"HighPowerOffThreshold"
211 #define	PICL_PROP_HIGH_SHUTDOWN			"HighShutdownThreshold"
212 #define	PICL_PROP_HIGH_WARNING			"HighWarningThreshold"
213 
214 /*
215  * OBP property names
216  */
217 #define	OBP_PROP_UPA_PORTID		"upa-portid"
218 #define	OBP_PROP_PORTID			"portid"
219 #define	OBP_PROP_CPUID			"cpuid"
220 #define	OBP_PROP_SIZE_CELLS		"#size-cells"
221 #define	OBP_PROP_ADDRESS_CELLS		"#address-cells"
222 
223 /*
224  * PICL Event names
225  */
226 #define	PICLEVENT_SYSEVENT_DEVICE_ADDED		"sysevent-device-added"
227 #define	PICLEVENT_SYSEVENT_DEVICE_REMOVED	"sysevent-device-removed"
228 #define	PICLEVENT_DR_AP_STATE_CHANGE		"dr-ap-state-change"
229 #define	PICLEVENT_MC_ADDED			"picl-memory-controller-added"
230 #define	PICLEVENT_MC_REMOVED			"picl-memory-controller-removed"
231 #define	PICLEVENT_STATE_CHANGE			"picl-state-change"
232 #define	PICLEVENT_CONDITION_CHANGE		"picl-condition-change"
233 #define	PICLEVENT_CPU_STATE_CHANGE		"picl-cpu-node-state-change"
234 #define	PICLEVENT_DR_REQ			"dr-req"
235 
236 /*
237  * Contract Private
238  */
239 #define	PICL_FRU_ADDED			"picl-fru-added" /* PSARC/2000/546 */
240 #define	PICL_FRU_REMOVED		"picl-fru-removed" /* PSARC/2000/546 */
241 
242 /*
243  * PICL Event Argument Names
244  */
245 #define	PICLEVENTARG_DEVFS_PATH		"devfs-path"
246 #define	PICLEVENTARG_AP_ID		"ap-id"
247 #define	PICLEVENTARG_HINT		"hint"
248 #define	PICLEVENTARG_NODEHANDLE		"picl-nodehandle"
249 #define	PICLEVENTARG_DR_REQ_TYPE	"req-type"
250 #define	PICLEVENTARG_CPU_EV_TYPE	"cpu-ev-type"
251 #define	PICLEVENTARG_STATE		"State"
252 #define	PICLEVENTARG_LAST_STATE		"LastState"
253 #define	PICLEVENTARG_CONDITION		"Condition"
254 
255 /*
256  * PICL Label Names
257  */
258 #define	PICL_PROPVAL_LABEL_DIE		"Die"
259 #define	PICL_PROPVAL_LABEL_AMBIENT	"Ambient"
260 
261 /*
262  * Contract Private
263  */
264 #define	PICLEVENTARG_FRUHANDLE		"picl-fru-handle" /* PSARC/2000/546 */
265 #define	PICLEVENTARG_PARENTHANDLE	"picl-parent-handle" /* 2000/546 */
266 
267 /*
268  * The following are PICL PRIVATE event argument names
269  */
270 #define	PICLEVENTARG_EVENT_NAME		"piclevent-name"
271 #define	PICLEVENTARG_DATA_TYPE		"piclevent-data-type"
272 
273 /*
274  * The following are values of piclevent-data-type (PRIVATE)
275  */
276 #define	PICLEVENTARG_PICLEVENT_DATA	"piclevent-data"
277 
278 /* These values are used for PICLEVENT_CPU_STATE_CHANGE event */
279 #define	PICLEVENTARGVAL_ONLINE		"Online"
280 #define	PICLEVENTARGVAL_OFFLINE		"Offline"
281 
282 /*
283  * These values are used for PICLEVENT_STATE_CHANGE,
284  * PICLEVENT_CONDITION_CHANGE event
285  */
286 #define	PICLEVENTARGVAL_UNKNOWN		"unknown"
287 #define	PICLEVENTARGVAL_OK		"ok"
288 #define	PICLEVENTARGVAL_FAILING		"failing"
289 #define	PICLEVENTARGVAL_FAILED		"failed"
290 #define	PICLEVENTARGVAL_TESTING		"testing"
291 #define	PICLEVENTARGVAL_UNUSABLE	"unusable"
292 #define	PICLEVENTARGVAL_CONNECTING	"connecting"
293 #define	PICLEVENTARGVAL_DISCONNECTING	"disconnecting"
294 #define	PICLEVENTARGVAL_CONNECTED	"connected"
295 #define	PICLEVENTARGVAL_DISCONNECTED	"disconnected"
296 #define	PICLEVENTARGVAL_EMPTY		"empty"
297 #define	PICLEVENTARGVAL_CONFIGURED	"configured"
298 #define	PICLEVENTARGVAL_UNCONFIGURED	"unconfigured"
299 #define	PICLEVENTARGVAL_CONFIGURING	"configuring"
300 #define	PICLEVENTARGVAL_UNCONFIGURING	"unconfiguring"
301 #define	PICLEVENTARGVAL_UP		"up"
302 #define	PICLEVENTARGVAL_DOWN		"down"
303 
304 /* PSARC 2003/163 */
305 #define	PICLEVENTARGVAL_SENSOR_COND_WARNING	"warning"
306 #define	PICLEVENTARGVAL_SENSOR_COND_SHUTDOWN	"shutdown"
307 
308 /* PSARC 2003/231 */
309 /* watchdog property values */
310 #define	PICL_PROPVAL_WD_OP_ARM		"arm"
311 #define	PICL_PROPVAL_WD_OP_DISARM	"disarm"
312 #define	PICL_PROPVAL_WD_ACTION_NONE	"none"
313 #define	PICL_PROPVAL_WD_ACTION_REBOOT	"reboot"
314 #define	PICL_PROPVAL_WD_ACTION_ALARM	"alarm"
315 #define	PICL_PROPVAL_WD_ACTION_RESET	"reset"
316 #define	PICL_PROPVAL_WD_STATE_ARMED	"armed"
317 #define	PICL_PROPVAL_WD_STATE_DISARMED	"disarmed"
318 #define	PICL_PROPVAL_WD_STATE_EXPIRED	"expired"
319 
320 #ifdef	__cplusplus
321 }
322 #endif
323 
324 #endif	/* _PICLDEFS_H */
325