xref: /illumos-gate/usr/src/lib/fm/topo/libtopo/common/topo_hc.h (revision 74e12c43fe52f2c30f36e65a4d0fb0e8dfd7068a)
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 (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
24  * Copyright 2020 Joyent, Inc.
25  */
26 
27 #ifndef _TOPO_HC_H
28 #define	_TOPO_HC_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /*
35  * Allowable hardware component names for hc FMRIs
36  */
37 #define	BANK		"bank"
38 #define	BAY		"bay"
39 #define	BLADE		"blade"
40 #define	BRANCH		"branch"
41 #define	CMP		"CMP"
42 #define	CENTERPLANE	"centerplane"
43 #define	CHASSIS		"chassis"
44 #define	CHIP		"chip"
45 #define	CHIPSET		"chipset"
46 #define	CORE		"core"
47 #define	STRAND		"strand"
48 #define	CHIP_SELECT	"chip-select"
49 #define	CONTROLLER	"controller"
50 #define	CPU		"cpu"
51 #define	CPUBOARD	"cpuboard"
52 #define	DIMM		"dimm"
53 #define	DISK		"disk"
54 #define	DRAM		"dram"
55 #define	DRAMCHANNEL	"dram-channel"
56 #define	FAN		"fan"
57 #define	FANBOARD	"fanboard"
58 #define	FANMODULE	"fanmodule"
59 #define	HBA		"hba"
60 #define	HOSTBRIDGE	"hostbridge"
61 #define	INTERCONNECT	"interconnect"
62 #define	IOBOARD		"ioboard"
63 #define	IPORT		"iport"
64 #define	MEMBOARD	"memboard"
65 #define	MEMORYBUFFER	"memory-buffer"
66 #define	MEMORYCONTROL	"memory-controller"
67 #define	MICROCORE	"micro-core"
68 #define	MOTHERBOARD	"motherboard"
69 #define	NIU		"niu"
70 #define	NIUFN		"niufn"
71 #define	NVME		"nvme"
72 #define	PCI_BUS		"pcibus"
73 #define	PCI_DEVICE	"pcidev"
74 #define	PCI_FUNCTION    "pcifn"
75 #define	PCIEX_BUS	"pciexbus"
76 #define	PCIEX_DEVICE	"pciexdev"
77 #define	PCIEX_FUNCTION  "pciexfn"
78 #define	PCIEX_ROOT	"pciexrc"
79 #define	PCIEX_SWUP	"pciexswu"
80 #define	PCIEX_SWDWN	"pciexswd"
81 #define	PORT		"port"
82 #define	POWERBOARD	"powerboard"
83 #define	POWERMODULE	"powermodule"
84 #define	PSU		"psu"
85 #define	RANK		"rank"
86 #define	RECEPTACLE	"receptacle"
87 #define	RISER		"riser"
88 #define	SASEXPANDER	"sas-expander"
89 #define	SHELF		"shelf"
90 #define	SCSI_DEVICE	"scsi-device"
91 #define	SES_ENCLOSURE	"ses-enclosure"
92 #define	SLOT		"slot"
93 #define	SMP_DEVICE	"smp-device"
94 #define	SP		"sp"
95 #define	SUBCHASSIS	"subchassis"
96 #define	SYSTEMBOARD	"systemboard"
97 #define	TRANSCEIVER	"transceiver"
98 #define	UFM		"ufm"
99 #define	USB_DEVICE	"usb-device"
100 #define	XAUI		"xaui"
101 #define	XFP		"xfp"
102 
103 /*
104  * Allowable hc node property group and property names
105  */
106 #define	TOPO_PGROUP_IO		"io"
107 #define	TOPO_IO_DEVTYPE		"devtype"
108 #define	TOPO_IO_DRIVER		"driver"
109 #define	TOPO_IO_INSTANCE	"instance"
110 #define	TOPO_IO_MODULE		"module"
111 #define	TOPO_IO_DEV		"dev"
112 #define	TOPO_IO_DEVID		"devid"
113 #define	TOPO_IO_DEV_PATH	"devfs-path"
114 #define	TOPO_IO_AP_PATH		"ap-path"
115 #define	TOPO_IO_PHYS_PATH	"phys-path"
116 
117 #define	TOPO_PGROUP_PCI		"pci"
118 #define	TOPO_PCI_VENDID		"vendor-id"
119 #define	TOPO_PCI_VENDNM		"vendor-name"
120 #define	TOPO_PCI_SUBSYSNM	"subsystem-name"
121 #define	TOPO_PCI_DEVID		"device-id"
122 #define	TOPO_PCI_DEVNM		"device-name"
123 #define	TOPO_PCI_EXCAP		"extended-capabilities"
124 #define	TOPO_PCI_BDF		"BDF"
125 #define	TOPO_PCI_CLASS		"class-code"
126 #define	TOPO_PCI_AADDR		"assigned-addresses"
127 
128 #define	TOPO_PCI_MAX_WIDTH	"link-maximum-width"
129 #define	TOPO_PCI_CUR_WIDTH	"link-current-width"
130 #define	TOPO_PCI_MAX_SPEED	"link-maximum-speed"
131 #define	TOPO_PCI_CUR_SPEED	"link-current-speed"
132 #define	TOPO_PCI_SUP_SPEED	"link-supported-speeds"
133 #define	TOPO_PCI_ADMIN_SPEED	"link-admin-target-speed"
134 
135 #define	TOPO_PGROUP_BINDING	"binding"
136 #define	TOPO_BINDING_OCCUPANT	"occupant-path"
137 #define	TOPO_BINDING_DRIVER	"driver"
138 #define	TOPO_BINDING_DEVCTL	"devctl"
139 #define	TOPO_BINDING_ENCLOSURE	"enclosure"
140 #define	TOPO_BINDING_SLOT	"slot"
141 #define	TOPO_BINDING_PORT	"port"
142 #define	TOPO_BINDING_PARENT_DEV	"parent-device"
143 
144 #define	TOPO_PGROUP_STORAGE	"storage"
145 #define	TOPO_STORAGE_INITIATOR_PORT	"initiator-port"
146 #define	TOPO_STORAGE_INITIATOR_PORT_PM	"initiator-port-pm"
147 #define	TOPO_STORAGE_TARGET_PORT	"target-port"
148 #define	TOPO_STORAGE_TARGET_PORT_L0ID	"target-port-l0id"
149 #define	TOPO_STORAGE_TARGET_PORT_L0IDS	"target-port-l0ids"
150 #define	TOPO_STORAGE_ATTACHED_PORT	"attached-port"
151 #define	TOPO_STORAGE_TARGET_PORT_PM	"target-port-pm"
152 #define	TOPO_STORAGE_ATTACHED_PORT_PM	"attached-port-pm"
153 #define	TOPO_STORAGE_DEVID		"devid"
154 #define	TOPO_STORAGE_LUN64		"lun64"
155 #define	TOPO_STORAGE_DEVICE_TYPE	"inquiry-device-type"
156 #define	TOPO_STORAGE_MANUFACTURER	"manufacturer"
157 #define	TOPO_STORAGE_MODEL		"model"
158 #define	TOPO_STORAGE_FIRMWARE_REV	"firmware-revision"
159 #define	TOPO_STORAGE_SAS_PHY_MASK	"receptacle-pm"
160 #define	TOPO_STORAGE_SAS_CONNECTOR_TYPE	"sas-connector-type"
161 
162 #define	TOPO_PGROUP_SES		"ses"
163 /* Applied  any SES standard related topo node. */
164 #define	TOPO_PROP_NODE_ID	"node-id"
165 #define	TOPO_PROP_TARGET_PATH	"target-path"
166 #define	TOPO_PROP_SES_DEVID	"ses-devid"
167 #define	TOPO_PROP_SES_DEV_PATH	"ses-devfs-path"
168 #define	TOPO_PROP_SES_PHYS_PATH	"ses-phys-path"
169 #define	TOPO_PROP_SES_TARGET_PORT "ses-target-port"
170 
171 #define	TOPO_PGROUP_SMP		"smp"
172 /* host SMP target related info for an expander node. */
173 #define	TOPO_PROP_SMP_DEVID	"smp-devid"
174 #define	TOPO_PROP_SMP_DEV_PATH	"smp-devfs-path"
175 #define	TOPO_PROP_SMP_PHYS_PATH	"smp-phys-path"
176 #define	TOPO_PROP_SMP_TARGET_PORT	"smp-target-port"
177 #define	TOPO_PROP_SAS_ADDR	"sas-address"
178 #define	TOPO_PROP_PHY_COUNT	"phy-count"
179 #define	TOPO_PROP_PATHS		"paths"
180 #define	TOPO_PROP_CHASSIS_TYPE	"chassis-type"
181 #define	TOPO_PROP_SAS_PHY_MASK	"phy-mask"
182 #define	TOPO_PROP_SAS_CONNECTOR_TYPE	"sas-connector-type"
183 
184 #define	TOPO_PGROUP_PORT	"port"
185 #define	TOPO_PROP_PORT_TYPE	"type"
186 #define	TOPO_PROP_PORT_TYPE_SFF	"sff"
187 #define	TOPO_PROP_PORT_TYPE_USB	"usb"
188 #define	TOPO_PROP_PORT_TYPE_UNKNOWN	"unknown"
189 
190 #define	TOPO_PGROUP_TRANSCEIVER	"transceiver"
191 #define	TOPO_PROP_TRANSCEIVER_TYPE	"type"
192 #define	TOPO_PROP_TRANSCEIVER_USABLE	"usable"
193 
194 #define	TOPO_PGROUP_SFF_TRANSCEIVER	"sff-transceiver"
195 #define	TOPO_PORT_SFF_TRANSCEIVER_VENDOR	"vendor"
196 #define	TOPO_PORT_SFF_TRANSCEIVER_PN	"part-number"
197 #define	TOPO_PORT_SFF_TRANSCEIVER_REV	"revision"
198 #define	TOPO_PORT_SFF_TRANSCEIVER_SN	"serial-number"
199 
200 #define	TOPO_PGROUP_USB_PORT	"usb-port"
201 #define	TOPO_PROP_USB_PORT_LPORTS	"logical-ports"
202 #define	TOPO_PROP_USB_PORT_VERSIONS	"usb-versions"
203 #define	TOPO_PROP_USB_PORT_TYPE		"port-type"
204 #define	TOPO_PROP_USB_PORT_ATTRIBUTES	"port-attributes"
205 #define	TOPO_PROP_USB_PORT_A_VISIBLE	"user-visible"
206 #define	TOPO_PROP_USB_PORT_A_CONNECTED	"port-connected"
207 #define	TOPO_PROP_USB_PORT_A_DISCONNECTED	"port-disconnected"
208 #define	TOPO_PROP_USB_PORT_A_EXTERNAL	"external-port"
209 #define	TOPO_PROP_USB_PORT_A_INTERNAL	"internal-port"
210 #define	TOPO_PROP_USB_PORT_NATTRS	5
211 
212 #define	TOPO_PGROUP_USB_PROPS	"usb-properties"
213 #define	TOPO_PGROUP_USB_PROPS_VID	"usb-vendor-id"
214 #define	TOPO_PGROUP_USB_PROPS_PID	"usb-product-id"
215 #define	TOPO_PGROUP_USB_PROPS_REV	"usb-revision-id"
216 #define	TOPO_PGROUP_USB_PROPS_VNAME	"usb-vendor-name"
217 #define	TOPO_PGROUP_USB_PROPS_PNAME	"usb-product-name"
218 #define	TOPO_PGROUP_USB_PROPS_SN	"usb-serialno"
219 #define	TOPO_PGROUP_USB_PROPS_VERSION	"usb-version"
220 #define	TOPO_PGROUP_USB_PROPS_SPEED	"usb-speed"
221 #define	TOPO_PGROUP_USB_PROPS_PORT	"usb-port"
222 #define	TOPO_PGROUP_USB_PROPS_SUPPORTED_SPEEDS	"usb-supported-speeds"
223 #define	TOPO_PGROUP_USB_PROPS_MIN_SPEED	"usb-minimum-speed"
224 
225 
226 /*
227  * These properties will exist on nodes enumerated by the ipmi module. They
228  * are consumed by the fac_prov_ipmi module
229  */
230 #define	TOPO_PROP_IPMI_ENTITY_ID	"entity-id"
231 #define	TOPO_PROP_IPMI_ENTITY_INST	"entity-instance"
232 
233 /*
234  * This property can be statically set in a map file and is consumed by the
235  * fac_prov_ipmi module.
236  */
237 #define	TOPO_PROP_IPMI_ENTITY_LIST	"entity-list"
238 
239 #define	TOPO_PGROUP_SLOT		"slot"
240 #define	TOPO_PROP_SLOT_TYPE		"slot-type"
241 
242 #define	TOPO_PGROUP_DIMM_SLOT		"dimm-slot"
243 #define	TOPO_PROP_DIMM_SLOT_FORM	"form-factor"
244 #define	TOPO_DIMM_SLOT_FORM_DIMM	"DIMM"
245 #define	TOPO_DIMM_SLOT_FORM_SODIMM	"SODIMM"
246 #define	TOPO_DIMM_SLOT_FORM_FBDIMM	"FBDIMM"
247 
248 #define	TOPO_PGROUP_DIMM_PROPS		"dimm-properties"
249 #define	TOPO_PROP_DIMM_TYPE
250 #define	TOPO_DIMM_TYPE_UNKNOWN		"UNKNOWN"
251 #define	TOPO_DIMM_TYPE_DDR		"DDR"
252 #define	TOPO_DIMM_TYPE_DDR2		"DDR2"
253 #define	TOPO_DIMM_TYPE_DDR3		"DDR3"
254 #define	TOPO_DIMM_TYPE_DDR4		"DDR4"
255 #define	TOPO_DIMM_TYPE_LPDDR		"LPDDR"
256 #define	TOPO_DIMM_TYPE_LPDDR2		"LPDDR2"
257 #define	TOPO_DIMM_TYPE_LPDDR3		"LPDDR3"
258 #define	TOPO_DIMM_TYPE_LPDDR4		"LPDDR4"
259 
260 #define	TOPO_PGROUP_MOTHERBOARD		"motherboard-properties"
261 #define	TOPO_PROP_MB_MANUFACTURER	"manufacturer"
262 #define	TOPO_PROP_MB_PRODUCT		"product-id"
263 #define	TOPO_PROP_MB_ASSET		"asset-tag"
264 #define	TOPO_PROP_MB_FIRMWARE_VENDOR	"firmware-vendor"
265 #define	TOPO_PROP_MB_FIRMWARE_RELDATE	"firmware-release-date"
266 
267 #define	TOPO_PGROUP_UFM			"ufm-properties"
268 #define	TOPO_PROP_UFM_DESCR		"ufm-description"
269 
270 #define	TOPO_PGROUP_UFM_SLOT		"ufm-slot-properties"
271 #define	TOPO_PROP_UFM_SLOT_VERSION	"ufm-slot-version"
272 #define	TOPO_PROP_UFM_SLOT_MODE		"ufm-slot-mode"
273 #define	TOPO_PROP_UFM_SLOT_ACTIVE	"ufm-slot-active"
274 
275 #define	TOPO_PGROUP_DATALINK		"datalink"
276 #define	TOPO_PGROUP_DATALINK_PMAC	"primary-mac-address"
277 #define	TOPO_PGROUP_DATALINK_LINK_SPEED		"link-speed"
278 #define	TOPO_PGROUP_DATALINK_LINK_STATUS	"link-status"
279 #define	TOPO_PGROUP_DATALINK_LINK_STATUS_UP	"up"
280 #define	TOPO_PGROUP_DATALINK_LINK_STATUS_DOWN	"down"
281 #define	TOPO_PGROUP_DATALINK_LINK_STATUS_UNKNOWN	"unknown"
282 #define	TOPO_PGROUP_DATALINK_LINK_DUPLEX	"link-duplex"
283 #define	TOPO_PGROUP_DATALINK_LINK_DUPLEX_FULL	"full"
284 #define	TOPO_PGROUP_DATALINK_LINK_DUPLEX_HALF	"half"
285 #define	TOPO_PGROUP_DATALINK_LINK_DUPLEX_UNKNOWN	"unknown"
286 #define	TOPO_PGROUP_DATALINK_LINK_NAME		"link-name"
287 
288 #define	TOPO_PGROUP_NVME		"nvme-properties"
289 #define	TOPO_PROP_NVME_VER		"nvme-version"
290 
291 #ifdef	__cplusplus
292 }
293 #endif
294 
295 #endif	/* _TOPO_HC_H */
296