summaryrefslogtreecommitdiff
path: root/usr/src/cmd/picl/plugins/inc/picldefs.h
blob: 95efac27f66b2bf45a224b6ce0b0ccddab5e8f57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License (the "License").
 * You may not use this file except in compliance with the License.
 *
 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
 * or http://www.opensolaris.org/os/licensing.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
 * If applicable, add the following below this CDDL HEADER, with the
 * fields enclosed by brackets "[]" replaced with your own identifying
 * information: Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 */

/*
 * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef	_PICLDEFS_H
#define	_PICLDEFS_H

#ifdef	__cplusplus
extern "C" {
#endif

/*
 * PICL Tree paths
 */
#define	PLATFORM_PATH		"/platform"
#define	MEMORY_PATH		"/platform/memory"
#define	FRUTREE_PATH		"/frutree"
#define	PICL_FRUTREE_CHASSIS	"/frutree/chassis"

/*
 * PICL classes
 */
#define	PICL_CLASS_BYTE			"byte"
#define	PICL_CLASS_BLOCK		"block"
#define	PICL_CLASS_DISK			"disk"
#define	PICL_CLASS_CDROM		"cdrom"
#define	PICL_CLASS_FLOPPY		"floppy"
#define	PICL_CLASS_TAPE			"tape"
#define	PICL_CLASS_FABRIC		"fabric"
#define	PICL_CLASS_SAS			"sas"
#define	PICL_CLASS_ATTACHMENT_POINT	"attachment-point"
#define	PICL_CLASS_DISPLAY		"display"
#define	PICL_CLASS_SERIAL		"serial"
#define	PICL_CLASS_PARALLEL		"parallel"
#define	PICL_CLASS_SEEPROM		"seeprom"
#define	PICL_CLASS_KEYBOARD		"keyboard"
#define	PICL_CLASS_MOUSE		"mouse"
#define	PICL_CLASS_MEMORY		"memory"
#define	PICL_CLASS_I2C			"i2c"
#define	PICL_CLASS_USB			"usb"
#define	PICL_CLASS_ISA			"isa"
#define	PICL_CLASS_DMA			"dma"
#define	PICL_CLASS_OBP_DEVICE		"obp-device"
#define	PICL_CLASS_TEMPERATURE_DEVICE	"temperature-device"
#define	PICL_CLASS_TEMPERATURE_SENSOR	"temperature-sensor"
#define	PICL_CLASS_TEMPERATURE_INDICATOR	"temperature-indicator"
#define	PICL_CLASS_VOLTAGE_INDICATOR	"voltage-indicator"
#define	PICL_CLASS_VOLTAGE_SENSOR	"voltage-sensor"
#define	PICL_CLASS_CURRENT_INDICATOR	"current-indicator"
#define	PICL_CLASS_CURRENT_SENSOR	"current-sensor"
#define	PICL_CLASS_LED			"led"
#define	PICL_CLASS_FAN			"fan"
#define	PICL_CLASS_FAN_CONTROL		"fan-control"
#define	PICL_CLASS_KEYSWITCH		"keyswitch"
#define	PICL_CLASS_EBUS			"ebus"
#define	PICL_CLASS_SYSTEM_CONTROLLER	"system-controller"
#define	PICL_CLASS_SERVICE_PROCESSOR	"service-processor"
#define	PICL_CLASS_HARDWARE_MONITOR	"hardware-monitor"
#define	PICL_CLASS_FLASHPROM		"flashprom"
#define	PICL_CLASS_SEEPROM		"seeprom"
#define	PICL_CLASS_FIREWIRE		"firewire"
#define	PICL_CLASS_I86CPUS		"cpus"
#define	PICL_CLASS_CPU			"cpu"
#define	PICL_CLASS_UPA			"upa"
#define	PICL_CLASS_PCI			"pci"
#define	PICL_CLASS_PCIEX		"pciex"
#define	PICL_CLASS_PMU			"pmu"
#define	PICL_CLASS_SOUND		"sound"
#define	PICL_CLASS_SBUS			"sbus"
#define	PICL_CLASS_SCSI			"scsi"
#define	PICL_CLASS_SCSI2		"scsi-2"
#define	PICL_CLASS_GPTWO		"gptwo"
#define	PICL_CLASS_JBUS			"jbus"
#define	PICL_CLASS_MEMORY		"memory"
#define	PICL_CLASS_MEMORY_SEGMENT	"memory-segment"
#define	PICL_CLASS_MEMORY_BANK		"memory-bank"
#define	PICL_CLASS_MEMORY_CONTROLLER	"memory-controller"
#define	PICL_CLASS_MEMORY_MODULE_GROUP	"memory-module-group"
#define	PICL_CLASS_MEMORY_MODULE	"memory-module"
#define	PICL_CLASS_FRU			"fru"
#define	PICL_CLASS_LOCATION		"location"
#define	PICL_CLASS_SECTION		"fru-section"
#define	PICL_CLASS_SEGMENT		"fru-segment"
#define	PICL_CLASS_PORT			"port"
#define	PICL_CLASS_WATCHDOG_CONTROLLER	"watchdog-controller"
#define	PICL_CLASS_WATCHDOG_TIMER	"watchdog-timer"
#define	PICL_CLASS_CHASSIS_SERIAL_NUM	"chassis-serial-number"
#define	PICL_CLASS_MULTIPATH		"multipath"

/*
 * Sun4v platforms do not create /frutree; instead they create
 * the /physical-platform subtree. The following is the list of
 * additional PICL classes that may be present in /physical-platform
 */
#define	PICL_CLASS_ALARM		"alarm"
#define	PICL_CLASS_BACKPLANE		"backplane"
#define	PICL_CLASS_BATTERY		"battery"
#define	PICL_CLASS_CHASSIS		"chassis"
#define	PICL_CLASS_CONTAINER		"container"
#define	PICL_CLASS_MODULE		"module"
#define	PICL_CLASS_OTHER		"other"
#define	PICL_CLASS_POWERSUPPLY		"power-supply"
#define	PICL_CLASS_RPM_INDICATOR	"rpm-indicator"
#define	PICL_CLASS_RPM_SENSOR		"rpm-sensor"
#define	PICL_CLASS_PRESENCE_INDICATOR	"presence-indicator"
#define	PICL_CLASS_INDICATOR		"indicator"
#define	PICL_CLASS_SENSOR		"sensor"
#define	PICL_CLASS_STACK		"stack"
#define	PICL_CLASS_UNKNOWN		"unknown"

/*
 * Solaris driver property names
 */
#define	PICL_PROP_INSTANCE		"instance"
#define	PICL_PROP_BINDING_NAME		"binding-name"
#define	PICL_PROP_BUS_ADDR		"bus-addr"
#define	PICL_PROP_DRIVER_NAME		"driver-name"
#define	PICL_PROP_DEVFS_PATH		"devfs-path"
#define	PICL_PROP_STATUS		"status"

/*
 * PICL property names
 */
#define	PICL_PROP_PLATFORM_NAME			"PlatformName"
#define	PICL_PROP_SYSNAME			"OS-Name"
#define	PICL_PROP_NODENAME			"HostName"
#define	PICL_PROP_MACHINE			"PlatformGroup"
#define	PICL_PROP_RELEASE			"OS-Release"
#define	PICL_PROP_VERSION			"OS-Version"
#define	PICL_PROP_SIZE				"Size"
#define	PICL_PROP_ID				"ID"
#define	PICL_PROP_STATE				"State"
#define	PICL_PROP_PROCESSOR_TYPE		"ProcessorType"
#define	PICL_PROP_FPUTYPE			"FPUType"
#define	PICL_PROP_STATE_BEGIN			"StateBegin"
#define	PICL_PROP_FFB_BOARD_REV			"FFB-Board-Rev"
#define	PICL_PROP_FFB_FBRAM_VER			"FFB-FBRAM-Ver"
#define	PICL_PROP_FFB_DAC_VER			"FFB-DAC-Ver"
#define	PICL_PROP_UNIT_ADDRESS			"UnitAddress"
#define	PICL_PROP_SLOT				"Slot"
#define	PICL_PROP_DEVICE_ID			"DeviceID"
#define	PICL_PROP_TRANSFER_SIZE			"TransferSize"
#define	PICL_PROP_BASEADDRESS			"BaseAddress"
#define	PICL_PROP_INTERLEAVE_FACTOR		"InterleaveFactor"
#define	PICL_PROP_ADDRESSMASK			"AddressMask"
#define	PICL_PROP_ADDRESSMATCH			"AddressMatch"
#define	PICL_PROP_LABEL				"Label"
#define	PICL_PROP_CONTAINER			"Container"
#define	PICL_PROP_OFFSET			"Offset"
#define	PICL_PROP_LENGTH			"Length"
#define	PICL_PROP_PROTECTED			"Protected"
#define	PICL_PROP_NUM_SEGMENTS			"#Segments"
#define	PICL_PROP_DESCRIPTOR			"Descriptor"
#define	PICL_PROP_PACKET_TABLE			"PacketTable"
#define	PICL_PROP_NUM_TAGS			"#Packets"
#define	PICL_PROP_ADD_SEGMENT			"AddSegment"
#define	PICL_PROP_DELETE_PACKET			"DeletePacket"
#define	PICL_PROP_ADD_PACKET			"AddPacket"
#define	PICL_PROP_DELETE_SEGMENT		"DeleteSegment"
#define	PICL_PROP_TAG				"Tag"
#define	PICL_PROP_PAYLOAD			"Payload"
#define	PICL_PROP_FRUDATA_AVAIL			"FRUDataAvailable"
#define	PICL_PROP_DEVICEPATH			"FRUDevicePath"
#define	PICL_PROP_FAN_SPEED			"Speed"
#define	PICL_PROP_FAN_SPEED_UNIT		"SpeedUnit"
#define	PICL_PROP_TEMPERATURE			"Temperature"
#define	PICL_PROP_CPU_AMB_TEMP			"AmbientTemperature"
#define	PICL_PROP_CPU_DIE_TEMP			"Temperature"
#define	PICL_PROP_IS_LOCATOR			"IsLocator"
#define	PICL_PROP_LOCATOR_NAME			"LocatorName"
#define	PICL_PROP_DEVICES			"Devices"
#define	PICL_PROP_ENV				"Environment"
#define	PICL_PROP_COLOR				"Color"
#define	PICL_PROP_SC_HANDLE			"SC_handle"
#define	PICL_PROP_FRU_TYPE			"FRUType"
#define	PICL_PROP_SLOT_TYPE			"SlotType"
#define	PICL_PROP_OPERATIONAL_STATUS		"OperationalStatus"
#define	PICL_PROP_VOLTAGE			"Voltage"
#define	PICL_PROP_CURRENT			"Current"
#define	PICL_PROP_CLASS				"Class"
#define	PICL_PROP_CONDITION			"Condition"
#define	PICL_REFPROP_LOC_PARENT			"_location_parent"
#define	PICL_REFPROP_FRU_PARENT			"_fru_parent"
#define	PICL_REFPROP_PORT_PARENT		"_port_parent"
#define	PICL_REFPROP_MEMORY_MODULE_GROUP	"_memory-module-group_"
#define	PICL_REFPROP_MEMORY_MODULE		"_memory-module_"
#define	PICL_REFPROP_SEEPROM_SRC		"_seeprom_source"
#define	PICL_PROP_DEVICE_TYPE			"device_type"
#define	PICL_PROP_PROBE_PATH			"PdevProbePath"
#define	PICL_PROP_WATCHDOG_ACTION		"WdAction"
#define	PICL_PROP_WATCHDOG_TIMEOUT		"WdTimeout"
#define	PICL_PROP_WATCHDOG_OPERATION		"WdOp"
#define	PICL_PROP_STATUS_TIME			"StatusTime"
#define	PICL_PROP_CONDITION			"Condition"
#define	PICL_PROP_CONDITION_TIME		"ConditionTime"
#define	PICL_PROP_CHASSIS_TYPE			"ChassisType"
#define	PICL_PROP_GEO_ADDR			"GeoAddr"
#define	PICL_PROP_ADMIN_LOCK			"AdminLock"
#define	PICL_PROP_PORT_TYPE			"PortType"
#define	PICL_PROP_SERIAL_NUMBER			"SerialNumber"

#define	PICL_UNITADDR_LEN_MAX		256

/*
 * Additional PICL properties for Sun4v platforms
 */
#define	PICL_PROP_BATTERY_STATUS		"BatteryStatus"
#define	PICL_PROP_EXPECTED			"Expected"
#define	PICL_PROP_FW_REVISION			"FW-version"
#define	PICL_PROP_HW_REVISION			"HW-version"
#define	PICL_PROP_IS_REPLACEABLE		"Replaceable"
#define	PICL_PROP_IS_HOT_SWAPPABLE		"HotSwappable"
#define	PICL_PROP_IS_FRU			"FRU"
#define	PICL_PROP_PHYS_DESCRIPTION		"Description"
#define	PICL_PROP_SPEED				"Speed"
#define	PICL_PROP_MFG_NAME			"MfgName"
#define	PICL_PROP_MODEL_NAME			"ModelName"
#define	PICL_PROP_SENSOR_VALUE			"SensorValue"
#define	PICL_PROP_BASE_UNITS			"BaseUnits"
#define	PICL_PROP_EXPONENT			"Exponent"
#define	PICL_PROP_RATE_UNITS			"RateUnits"

/*
 * Various threshold property names
 */
#define	PICL_PROP_LOW_POWER_OFF			"LowPowerOffThreshold"
#define	PICL_PROP_LOW_SHUTDOWN			"LowShutdownThreshold"
#define	PICL_PROP_LOW_WARNING			"LowWarningThreshold"
#define	PICL_PROP_TARGET_TEMPERATURE		"TargetTemperature"
#define	PICL_PROP_HIGH_POWER_OFF		"HighPowerOffThreshold"
#define	PICL_PROP_HIGH_SHUTDOWN			"HighShutdownThreshold"
#define	PICL_PROP_HIGH_WARNING			"HighWarningThreshold"

/*
 * OBP property names
 */
#define	OBP_PROP_UPA_PORTID		"upa-portid"
#define	OBP_PROP_PORTID			"portid"
#define	OBP_PROP_CPUID			"cpuid"
#define	OBP_PROP_SIZE_CELLS		"#size-cells"
#define	OBP_PROP_ADDRESS_CELLS		"#address-cells"

/*
 * PICL Event names
 */
#define	PICLEVENT_SYSEVENT_DEVICE_ADDED		"sysevent-device-added"
#define	PICLEVENT_SYSEVENT_DEVICE_REMOVED	"sysevent-device-removed"
#define	PICLEVENT_DR_AP_STATE_CHANGE		"dr-ap-state-change"
#define	PICLEVENT_MC_ADDED			"picl-memory-controller-added"
#define	PICLEVENT_MC_REMOVED			"picl-memory-controller-removed"
#define	PICLEVENT_STATE_CHANGE			"picl-state-change"
#define	PICLEVENT_CONDITION_CHANGE		"picl-condition-change"
#define	PICLEVENT_CPU_STATE_CHANGE		"picl-cpu-node-state-change"
#define	PICLEVENT_DR_REQ			"dr-req"

/*
 * Contract Private
 */
#define	PICL_FRU_ADDED			"picl-fru-added" /* PSARC/2000/546 */
#define	PICL_FRU_REMOVED		"picl-fru-removed" /* PSARC/2000/546 */

/*
 * PICL Event Argument Names
 */
#define	PICLEVENTARG_DEVFS_PATH		"devfs-path"
#define	PICLEVENTARG_AP_ID		"ap-id"
#define	PICLEVENTARG_HINT		"hint"
#define	PICLEVENTARG_NODEHANDLE		"picl-nodehandle"
#define	PICLEVENTARG_DR_REQ_TYPE	"req-type"
#define	PICLEVENTARG_CPU_EV_TYPE	"cpu-ev-type"
#define	PICLEVENTARG_STATE		"State"
#define	PICLEVENTARG_LAST_STATE		"LastState"
#define	PICLEVENTARG_CONDITION		"Condition"

/*
 * PICL Label Names
 */
#define	PICL_PROPVAL_LABEL_DIE		"Die"
#define	PICL_PROPVAL_LABEL_AMBIENT	"Ambient"

/*
 * Contract Private
 */
#define	PICLEVENTARG_FRUHANDLE		"picl-fru-handle" /* PSARC/2000/546 */
#define	PICLEVENTARG_PARENTHANDLE	"picl-parent-handle" /* 2000/546 */

/*
 * The following are PICL PRIVATE event argument names
 */
#define	PICLEVENTARG_EVENT_NAME		"piclevent-name"
#define	PICLEVENTARG_DATA_TYPE		"piclevent-data-type"

/*
 * The following are values of piclevent-data-type (PRIVATE)
 */
#define	PICLEVENTARG_PICLEVENT_DATA	"piclevent-data"

/* These values are used for PICLEVENT_CPU_STATE_CHANGE event */
#define	PICLEVENTARGVAL_ONLINE		"Online"
#define	PICLEVENTARGVAL_OFFLINE		"Offline"

/*
 * These values are used for PICLEVENT_STATE_CHANGE,
 * PICLEVENT_CONDITION_CHANGE event
 */
#define	PICLEVENTARGVAL_UNKNOWN		"unknown"
#define	PICLEVENTARGVAL_OK		"ok"
#define	PICLEVENTARGVAL_FAILING		"failing"
#define	PICLEVENTARGVAL_FAILED		"failed"
#define	PICLEVENTARGVAL_TESTING		"testing"
#define	PICLEVENTARGVAL_UNUSABLE	"unusable"
#define	PICLEVENTARGVAL_CONNECTING	"connecting"
#define	PICLEVENTARGVAL_DISCONNECTING	"disconnecting"
#define	PICLEVENTARGVAL_CONNECTED	"connected"
#define	PICLEVENTARGVAL_DISCONNECTED	"disconnected"
#define	PICLEVENTARGVAL_EMPTY		"empty"
#define	PICLEVENTARGVAL_CONFIGURED	"configured"
#define	PICLEVENTARGVAL_UNCONFIGURED	"unconfigured"
#define	PICLEVENTARGVAL_CONFIGURING	"configuring"
#define	PICLEVENTARGVAL_UNCONFIGURING	"unconfiguring"
#define	PICLEVENTARGVAL_UP		"up"
#define	PICLEVENTARGVAL_DOWN		"down"

/* PSARC 2003/163 */
#define	PICLEVENTARGVAL_SENSOR_COND_WARNING	"warning"
#define	PICLEVENTARGVAL_SENSOR_COND_SHUTDOWN	"shutdown"

/* PSARC 2003/231 */
/* watchdog property values */
#define	PICL_PROPVAL_WD_OP_ARM		"arm"
#define	PICL_PROPVAL_WD_OP_DISARM	"disarm"
#define	PICL_PROPVAL_WD_ACTION_NONE	"none"
#define	PICL_PROPVAL_WD_ACTION_REBOOT	"reboot"
#define	PICL_PROPVAL_WD_ACTION_ALARM	"alarm"
#define	PICL_PROPVAL_WD_ACTION_RESET	"reset"
#define	PICL_PROPVAL_WD_STATE_ARMED	"armed"
#define	PICL_PROPVAL_WD_STATE_DISARMED	"disarmed"
#define	PICL_PROPVAL_WD_STATE_EXPIRED	"expired"

#ifdef	__cplusplus
}
#endif

#endif	/* _PICLDEFS_H */