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 (c) 2018, 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	CORE		"core"
46 #define	STRAND		"strand"
47 #define	CHIP_SELECT	"chip-select"
48 #define	CONTROLLER	"controller"
49 #define	CPU		"cpu"
50 #define	CPUBOARD	"cpuboard"
51 #define	DIMM		"dimm"
52 #define	DISK		"disk"
53 #define	DRAM		"dram"
54 #define	DRAMCHANNEL	"dram-channel"
55 #define	FAN		"fan"
56 #define	FANBOARD	"fanboard"
57 #define	FANMODULE	"fanmodule"
58 #define	HBA		"hba"
59 #define	HOSTBRIDGE	"hostbridge"
60 #define	INTERCONNECT	"interconnect"
61 #define	IOBOARD		"ioboard"
62 #define	IPORT		"iport"
63 #define	MEMBOARD	"memboard"
64 #define	MEMORYBUFFER	"memory-buffer"
65 #define	MEMORYCONTROL	"memory-controller"
66 #define	MICROCORE	"micro-core"
67 #define	MOTHERBOARD	"motherboard"
68 #define	NIU		"niu"
69 #define	NIUFN		"niufn"
70 #define	PCI_BUS		"pcibus"
71 #define	PCI_DEVICE	"pcidev"
72 #define	PCI_FUNCTION    "pcifn"
73 #define	PCIEX_BUS	"pciexbus"
74 #define	PCIEX_DEVICE	"pciexdev"
75 #define	PCIEX_FUNCTION  "pciexfn"
76 #define	PCIEX_ROOT	"pciexrc"
77 #define	PCIEX_SWUP	"pciexswu"
78 #define	PCIEX_SWDWN	"pciexswd"
79 #define	PORT		"port"
80 #define	POWERBOARD	"powerboard"
81 #define	POWERMODULE	"powermodule"
82 #define	PSU		"psu"
83 #define	RANK		"rank"
84 #define	RECEPTACLE	"receptacle"
85 #define	RISER		"riser"
86 #define	SASEXPANDER	"sas-expander"
87 #define	SHELF		"shelf"
88 #define	SCSI_DEVICE	"scsi-device"
89 #define	SES_ENCLOSURE	"ses-enclosure"
90 #define	SLOT		"slot"
91 #define	SMP_DEVICE	"smp-device"
92 #define	SP		"sp"
93 #define	SUBCHASSIS	"subchassis"
94 #define	SYSTEMBOARD	"systemboard"
95 #define	TRANSCEIVER	"transceiver"
96 #define	XAUI		"xaui"
97 #define	XFP		"xfp"
98 
99 /*
100  * Allowable hc node property group and property names
101  */
102 #define	TOPO_PGROUP_IO		"io"
103 #define	TOPO_IO_DEVTYPE		"devtype"
104 #define	TOPO_IO_DRIVER		"driver"
105 #define	TOPO_IO_INSTANCE	"instance"
106 #define	TOPO_IO_MODULE		"module"
107 #define	TOPO_IO_DEV		"dev"
108 #define	TOPO_IO_DEVID		"devid"
109 #define	TOPO_IO_DEV_PATH	"devfs-path"
110 #define	TOPO_IO_AP_PATH		"ap-path"
111 #define	TOPO_IO_PHYS_PATH	"phys-path"
112 
113 #define	TOPO_PGROUP_PCI		"pci"
114 #define	TOPO_PCI_VENDID		"vendor-id"
115 #define	TOPO_PCI_VENDNM		"vendor-name"
116 #define	TOPO_PCI_SUBSYSNM	"subsystem-name"
117 #define	TOPO_PCI_DEVID		"device-id"
118 #define	TOPO_PCI_DEVNM		"device-name"
119 #define	TOPO_PCI_EXCAP		"extended-capabilities"
120 #define	TOPO_PCI_BDF		"BDF"
121 #define	TOPO_PCI_CLASS		"class-code"
122 #define	TOPO_PCI_AADDR		"assigned-addresses"
123 
124 #define	TOPO_PGROUP_BINDING	"binding"
125 #define	TOPO_BINDING_OCCUPANT	"occupant-path"
126 #define	TOPO_BINDING_DRIVER	"driver"
127 #define	TOPO_BINDING_DEVCTL	"devctl"
128 #define	TOPO_BINDING_ENCLOSURE	"enclosure"
129 #define	TOPO_BINDING_SLOT	"slot"
130 
131 #define	TOPO_PGROUP_STORAGE	"storage"
132 #define	TOPO_STORAGE_INITIATOR_PORT	"initiator-port"
133 #define	TOPO_STORAGE_INITIATOR_PORT_PM	"initiator-port-pm"
134 #define	TOPO_STORAGE_TARGET_PORT	"target-port"
135 #define	TOPO_STORAGE_TARGET_PORT_L0ID	"target-port-l0id"
136 #define	TOPO_STORAGE_TARGET_PORT_L0IDS	"target-port-l0ids"
137 #define	TOPO_STORAGE_ATTACHED_PORT	"attached-port"
138 #define	TOPO_STORAGE_TARGET_PORT_PM	"target-port-pm"
139 #define	TOPO_STORAGE_ATTACHED_PORT_PM	"attached-port-pm"
140 #define	TOPO_STORAGE_DEVID		"devid"
141 #define	TOPO_STORAGE_LUN64		"lun64"
142 #define	TOPO_STORAGE_DEVICE_TYPE	"inquiry-device-type"
143 #define	TOPO_STORAGE_MANUFACTURER	"manufacturer"
144 #define	TOPO_STORAGE_MODEL		"model"
145 #define	TOPO_STORAGE_FIRMWARE_REV	"firmware-revision"
146 #define	TOPO_STORAGE_SAS_PHY_MASK	"receptacle-pm"
147 #define	TOPO_STORAGE_SAS_CONNECTOR_TYPE	"sas-connector-type"
148 
149 #define	TOPO_PGROUP_SES		"ses"
150 /* Applied  any SES standard related topo node. */
151 #define	TOPO_PROP_NODE_ID	"node-id"
152 #define	TOPO_PROP_TARGET_PATH	"target-path"
153 #define	TOPO_PROP_SES_DEVID	"ses-devid"
154 #define	TOPO_PROP_SES_DEV_PATH	"ses-devfs-path"
155 #define	TOPO_PROP_SES_PHYS_PATH	"ses-phys-path"
156 #define	TOPO_PROP_SES_TARGET_PORT "ses-target-port"
157 
158 #define	TOPO_PGROUP_SMP		"smp"
159 /* host SMP target related info for an expander node. */
160 #define	TOPO_PROP_SMP_DEVID	"smp-devid"
161 #define	TOPO_PROP_SMP_DEV_PATH	"smp-devfs-path"
162 #define	TOPO_PROP_SMP_PHYS_PATH	"smp-phys-path"
163 #define	TOPO_PROP_SMP_TARGET_PORT	"smp-target-port"
164 #define	TOPO_PROP_SAS_ADDR	"sas-address"
165 #define	TOPO_PROP_PHY_COUNT	"phy-count"
166 #define	TOPO_PROP_PATHS		"paths"
167 #define	TOPO_PROP_CHASSIS_TYPE	"chassis-type"
168 #define	TOPO_PROP_SAS_PHY_MASK	"phy-mask"
169 #define	TOPO_PROP_SAS_CONNECTOR_TYPE	"sas-connector-type"
170 
171 #define	TOPO_PGROUP_PORT	"port"
172 #define	TOPO_PROP_PORT_TYPE	"type"
173 #define	TOPO_PROP_PORT_TYPE_SFF	"sff"
174 
175 #define	TOPO_PGROUP_TRANSCEIVER	"transceiver"
176 #define	TOPO_PROP_TRANSCEIVER_TYPE	"type"
177 #define	TOPO_PROP_TRANSCEIVER_USABLE	"usable"
178 
179 #define	TOPO_PGROUP_SFF_TRANSCEIVER	"sff-transceiver"
180 #define	TOPO_PORT_SFF_TRANSCEIVER_VENDOR	"vendor"
181 #define	TOPO_PORT_SFF_TRANSCEIVER_PN	"part-number"
182 #define	TOPO_PORT_SFF_TRANSCEIVER_REV	"revision"
183 #define	TOPO_PORT_SFF_TRANSCEIVER_SN	"serial-number"
184 
185 /*
186  * These properties will exist on nodes enumerated by the ipmi module. They
187  * are consumed by the fac_prov_ipmi module
188  */
189 #define	TOPO_PROP_IPMI_ENTITY_ID	"entity-id"
190 #define	TOPO_PROP_IPMI_ENTITY_INST	"entity-instance"
191 
192 /*
193  * This property can be statically set in a map file and is consumed by the
194  * fac_prov_ipmi module.
195  */
196 #define	TOPO_PROP_IPMI_ENTITY_LIST	"entity-list"
197 
198 #define	TOPO_PGROUP_SLOT		"slot"
199 #define	TOPO_PROP_SLOT_TYPE		"slot-type"
200 
201 #define	TOPO_PGROUP_DIMM_SLOT		"dimm-slot"
202 #define	TOPO_PROP_DIMM_SLOT_FORM	"form-factor"
203 #define	TOPO_DIMM_SLOT_FORM_DIMM	"DIMM"
204 #define	TOPO_DIMM_SLOT_FORM_SODIMM	"SODIMM"
205 #define	TOPO_DIMM_SLOT_FORM_FBDIMM	"FBDIMM"
206 
207 #define	TOPO_PGROUP_DIMM_PROPS		"dimm-properties"
208 #define	TOPO_PROP_DIMM_TYPE
209 #define	TOPO_DIMM_TYPE_UNKNOWN		"UNKNOWN"
210 #define	TOPO_DIMM_TYPE_DDR		"DDR"
211 #define	TOPO_DIMM_TYPE_DDR2		"DDR2"
212 #define	TOPO_DIMM_TYPE_DDR3		"DDR3"
213 #define	TOPO_DIMM_TYPE_DDR4		"DDR4"
214 #define	TOPO_DIMM_TYPE_LPDDR		"LPDDR"
215 #define	TOPO_DIMM_TYPE_LPDDR2		"LPDDR2"
216 #define	TOPO_DIMM_TYPE_LPDDR3		"LPDDR3"
217 #define	TOPO_DIMM_TYPE_LPDDR4		"LPDDR4"
218 
219 #ifdef	__cplusplus
220 }
221 #endif
222 
223 #endif	/* _TOPO_HC_H */
224