10eb822a1Scindi /*
20eb822a1Scindi  * CDDL HEADER START
30eb822a1Scindi  *
40eb822a1Scindi  * The contents of this file are subject to the terms of the
50eb822a1Scindi  * Common Development and Distribution License (the "License").
60eb822a1Scindi  * You may not use this file except in compliance with the License.
70eb822a1Scindi  *
80eb822a1Scindi  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90eb822a1Scindi  * or http://www.opensolaris.org/os/licensing.
100eb822a1Scindi  * See the License for the specific language governing permissions
110eb822a1Scindi  * and limitations under the License.
120eb822a1Scindi  *
130eb822a1Scindi  * When distributing Covered Code, include this CDDL HEADER in each
140eb822a1Scindi  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150eb822a1Scindi  * If applicable, add the following below this CDDL HEADER, with the
160eb822a1Scindi  * fields enclosed by brackets "[]" replaced with your own identifying
170eb822a1Scindi  * information: Portions Copyright [yyyy] [name of copyright owner]
180eb822a1Scindi  *
190eb822a1Scindi  * CDDL HEADER END
200eb822a1Scindi  */
210eb822a1Scindi 
220eb822a1Scindi /*
2344ed9dbbSStephen Hanson  * Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
2473797b86SRob Johnston  * Copyright (c) 2018, Joyent, Inc.
250eb822a1Scindi  */
260eb822a1Scindi 
270eb822a1Scindi #ifndef _TOPO_HC_H
280eb822a1Scindi #define	_TOPO_HC_H
290eb822a1Scindi 
300eb822a1Scindi #ifdef	__cplusplus
310eb822a1Scindi extern "C" {
320eb822a1Scindi #endif
330eb822a1Scindi 
340eb822a1Scindi /*
350eb822a1Scindi  * Allowable hardware component names for hc FMRIs
360eb822a1Scindi  */
37908f1e13Ssd #define	BANK		"bank"
38184cd04cScth #define	BAY		"bay"
39908f1e13Ssd #define	BLADE		"blade"
4014ea4bb7Ssd #define	BRANCH		"branch"
410eb822a1Scindi #define	CMP		"CMP"
420eb822a1Scindi #define	CENTERPLANE	"centerplane"
430eb822a1Scindi #define	CHASSIS		"chassis"
440eb822a1Scindi #define	CHIP		"chip"
45908f1e13Ssd #define	CORE		"core"
46e3d60c9bSAdrian Frost #define	STRAND		"strand"
47e3d60c9bSAdrian Frost #define	CHIP_SELECT	"chip-select"
48940d71d2Seschrock #define	CONTROLLER	"controller"
490eb822a1Scindi #define	CPU		"cpu"
5013faa912Ssd #define	CPUBOARD	"cpuboard"
510eb822a1Scindi #define	DIMM		"dimm"
520eb822a1Scindi #define	DISK		"disk"
53908f1e13Ssd #define	DRAM		"dram"
540eb822a1Scindi #define	DRAMCHANNEL	"dram-channel"
552eeaed14Srobj #define	FAN		"fan"
56ded93414SHyon Kim #define	FANBOARD	"fanboard"
572eeaed14Srobj #define	FANMODULE	"fanmodule"
58fc333478STom Pothier #define	HBA		"hba"
590eb822a1Scindi #define	HOSTBRIDGE	"hostbridge"
600eb822a1Scindi #define	INTERCONNECT	"interconnect"
610eb822a1Scindi #define	IOBOARD		"ioboard"
62ac88567aSHyon Kim #define	IPORT		"iport"
6313faa912Ssd #define	MEMBOARD	"memboard"
64908f1e13Ssd #define	MEMORYBUFFER	"memory-buffer"
650eb822a1Scindi #define	MEMORYCONTROL	"memory-controller"
66908f1e13Ssd #define	MICROCORE	"micro-core"
670eb822a1Scindi #define	MOTHERBOARD	"motherboard"
6814ea4bb7Ssd #define	NIU		"niu"
6914ea4bb7Ssd #define	NIUFN		"niufn"
700eb822a1Scindi #define	PCI_BUS		"pcibus"
710eb822a1Scindi #define	PCI_DEVICE	"pcidev"
720eb822a1Scindi #define	PCI_FUNCTION    "pcifn"
730eb822a1Scindi #define	PCIEX_BUS	"pciexbus"
740eb822a1Scindi #define	PCIEX_DEVICE	"pciexdev"
750eb822a1Scindi #define	PCIEX_FUNCTION  "pciexfn"
760eb822a1Scindi #define	PCIEX_ROOT	"pciexrc"
770eb822a1Scindi #define	PCIEX_SWUP	"pciexswu"
780eb822a1Scindi #define	PCIEX_SWDWN	"pciexswd"
7945d3dd98SRobert Mustacchi #define	PORT		"port"
80ded93414SHyon Kim #define	POWERBOARD	"powerboard"
812eeaed14Srobj #define	POWERMODULE	"powermodule"
822eeaed14Srobj #define	PSU		"psu"
830eb822a1Scindi #define	RANK		"rank"
84ac88567aSHyon Kim #define	RECEPTACLE	"receptacle"
85908f1e13Ssd #define	RISER		"riser"
86ac88567aSHyon Kim #define	SASEXPANDER	"sas-expander"
87908f1e13Ssd #define	SHELF		"shelf"
88ac88567aSHyon Kim #define	SCSI_DEVICE	"scsi-device"
89940d71d2Seschrock #define	SES_ENCLOSURE	"ses-enclosure"
90*6d65bee7SRob Johnston #define	SLOT		"slot"
91ac88567aSHyon Kim #define	SMP_DEVICE	"smp-device"
924df55fdeSJanie Lu #define	SP		"sp"
9353dbcc59SSundeep Panicker #define	SUBCHASSIS	"subchassis"
940eb822a1Scindi #define	SYSTEMBOARD	"systemboard"
9545d3dd98SRobert Mustacchi #define	TRANSCEIVER	"transceiver"
9614ea4bb7Ssd #define	XAUI		"xaui"
9714ea4bb7Ssd #define	XFP		"xfp"
980eb822a1Scindi 
990eb822a1Scindi /*
1000eb822a1Scindi  * Allowable hc node property group and property names
1010eb822a1Scindi  */
1020eb822a1Scindi #define	TOPO_PGROUP_IO		"io"
1030eb822a1Scindi #define	TOPO_IO_DEVTYPE		"devtype"
1040eb822a1Scindi #define	TOPO_IO_DRIVER		"driver"
10573797b86SRob Johnston #define	TOPO_IO_INSTANCE	"instance"
1069dd0f810Scindi #define	TOPO_IO_MODULE		"module"
1070eb822a1Scindi #define	TOPO_IO_DEV		"dev"
108602ca9eaScth #define	TOPO_IO_DEVID		"devid"
1090eb822a1Scindi #define	TOPO_IO_DEV_PATH	"devfs-path"
1100eb822a1Scindi #define	TOPO_IO_AP_PATH		"ap-path"
111602ca9eaScth #define	TOPO_IO_PHYS_PATH	"phys-path"
1120eb822a1Scindi 
1130eb822a1Scindi #define	TOPO_PGROUP_PCI		"pci"
1140eb822a1Scindi #define	TOPO_PCI_VENDID		"vendor-id"
11566d05358SRob Johnston #define	TOPO_PCI_VENDNM		"vendor-name"
11666d05358SRob Johnston #define	TOPO_PCI_SUBSYSNM	"subsystem-name"
1170eb822a1Scindi #define	TOPO_PCI_DEVID		"device-id"
11866d05358SRob Johnston #define	TOPO_PCI_DEVNM		"device-name"
1190eb822a1Scindi #define	TOPO_PCI_EXCAP		"extended-capabilities"
1200eb822a1Scindi #define	TOPO_PCI_BDF		"BDF"
1210eb822a1Scindi #define	TOPO_PCI_CLASS		"class-code"
122eae2e508Skrishnae #define	TOPO_PCI_AADDR		"assigned-addresses"
1230eb822a1Scindi 
124ac88567aSHyon Kim #define	TOPO_PGROUP_BINDING	"binding"
125ac88567aSHyon Kim #define	TOPO_BINDING_OCCUPANT	"occupant-path"
126aed5247fSJoshua M. Clulow #define	TOPO_BINDING_DRIVER	"driver"
127aed5247fSJoshua M. Clulow #define	TOPO_BINDING_DEVCTL	"devctl"
128aed5247fSJoshua M. Clulow #define	TOPO_BINDING_ENCLOSURE	"enclosure"
129aed5247fSJoshua M. Clulow #define	TOPO_BINDING_SLOT	"slot"
130ac88567aSHyon Kim 
13144ed9dbbSStephen Hanson #define	TOPO_PGROUP_STORAGE	"storage"
132ac88567aSHyon Kim #define	TOPO_STORAGE_INITIATOR_PORT	"initiator-port"
133ac88567aSHyon Kim #define	TOPO_STORAGE_INITIATOR_PORT_PM	"initiator-port-pm"
134ac88567aSHyon Kim #define	TOPO_STORAGE_TARGET_PORT	"target-port"
13544ed9dbbSStephen Hanson #define	TOPO_STORAGE_TARGET_PORT_L0ID	"target-port-l0id"
13644ed9dbbSStephen Hanson #define	TOPO_STORAGE_TARGET_PORT_L0IDS	"target-port-l0ids"
137ac88567aSHyon Kim #define	TOPO_STORAGE_ATTACHED_PORT	"attached-port"
138ac88567aSHyon Kim #define	TOPO_STORAGE_TARGET_PORT_PM	"target-port-pm"
139ac88567aSHyon Kim #define	TOPO_STORAGE_ATTACHED_PORT_PM	"attached-port-pm"
140ac88567aSHyon Kim #define	TOPO_STORAGE_DEVID		"devid"
141ac88567aSHyon Kim #define	TOPO_STORAGE_LUN64		"lun64"
142ac88567aSHyon Kim #define	TOPO_STORAGE_DEVICE_TYPE	"inquiry-device-type"
143ac88567aSHyon Kim #define	TOPO_STORAGE_MANUFACTURER	"manufacturer"
144ac88567aSHyon Kim #define	TOPO_STORAGE_MODEL		"model"
145ac88567aSHyon Kim #define	TOPO_STORAGE_FIRMWARE_REV	"firmware-revision"
146ac88567aSHyon Kim #define	TOPO_STORAGE_SAS_PHY_MASK	"receptacle-pm"
147ac88567aSHyon Kim #define	TOPO_STORAGE_SAS_CONNECTOR_TYPE	"sas-connector-type"
14803f9f63dSTom Pothier 
149e58a33b6SStephen Hanson #define	TOPO_PGROUP_SES		"ses"
150e58a33b6SStephen Hanson /* Applied  any SES standard related topo node. */
151e58a33b6SStephen Hanson #define	TOPO_PROP_NODE_ID	"node-id"
152e58a33b6SStephen Hanson #define	TOPO_PROP_TARGET_PATH	"target-path"
153e58a33b6SStephen Hanson #define	TOPO_PROP_SES_DEVID	"ses-devid"
154e58a33b6SStephen Hanson #define	TOPO_PROP_SES_DEV_PATH	"ses-devfs-path"
155e58a33b6SStephen Hanson #define	TOPO_PROP_SES_PHYS_PATH	"ses-phys-path"
156e58a33b6SStephen Hanson #define	TOPO_PROP_SES_TARGET_PORT "ses-target-port"
157e58a33b6SStephen Hanson 
158e58a33b6SStephen Hanson #define	TOPO_PGROUP_SMP		"smp"
159e58a33b6SStephen Hanson /* host SMP target related info for an expander node. */
160e58a33b6SStephen Hanson #define	TOPO_PROP_SMP_DEVID	"smp-devid"
161e58a33b6SStephen Hanson #define	TOPO_PROP_SMP_DEV_PATH	"smp-devfs-path"
162e58a33b6SStephen Hanson #define	TOPO_PROP_SMP_PHYS_PATH	"smp-phys-path"
163e58a33b6SStephen Hanson #define	TOPO_PROP_SMP_TARGET_PORT	"smp-target-port"
164e58a33b6SStephen Hanson #define	TOPO_PROP_SAS_ADDR	"sas-address"
165e58a33b6SStephen Hanson #define	TOPO_PROP_PHY_COUNT	"phy-count"
166e58a33b6SStephen Hanson #define	TOPO_PROP_PATHS		"paths"
167e58a33b6SStephen Hanson #define	TOPO_PROP_CHASSIS_TYPE	"chassis-type"
168e58a33b6SStephen Hanson #define	TOPO_PROP_SAS_PHY_MASK	"phy-mask"
169e58a33b6SStephen Hanson #define	TOPO_PROP_SAS_CONNECTOR_TYPE	"sas-connector-type"
170e58a33b6SStephen Hanson 
17145d3dd98SRobert Mustacchi #define	TOPO_PGROUP_PORT	"port"
17245d3dd98SRobert Mustacchi #define	TOPO_PROP_PORT_TYPE	"type"
17345d3dd98SRobert Mustacchi #define	TOPO_PROP_PORT_TYPE_SFF	"sff"
17445d3dd98SRobert Mustacchi 
17545d3dd98SRobert Mustacchi #define	TOPO_PGROUP_TRANSCEIVER	"transceiver"
17645d3dd98SRobert Mustacchi #define	TOPO_PROP_TRANSCEIVER_TYPE	"type"
17745d3dd98SRobert Mustacchi #define	TOPO_PROP_TRANSCEIVER_USABLE	"usable"
17845d3dd98SRobert Mustacchi 
17945d3dd98SRobert Mustacchi #define	TOPO_PGROUP_SFF_TRANSCEIVER	"sff-transceiver"
18045d3dd98SRobert Mustacchi #define	TOPO_PORT_SFF_TRANSCEIVER_VENDOR	"vendor"
18145d3dd98SRobert Mustacchi #define	TOPO_PORT_SFF_TRANSCEIVER_PN	"part-number"
18245d3dd98SRobert Mustacchi #define	TOPO_PORT_SFF_TRANSCEIVER_REV	"revision"
18345d3dd98SRobert Mustacchi #define	TOPO_PORT_SFF_TRANSCEIVER_SN	"serial-number"
18445d3dd98SRobert Mustacchi 
1858f022dd6SRob Johnston /*
1868f022dd6SRob Johnston  * These properties will exist on nodes enumerated by the ipmi module. They
1878f022dd6SRob Johnston  * are consumed by the fac_prov_ipmi module
1888f022dd6SRob Johnston  */
1898f022dd6SRob Johnston #define	TOPO_PROP_IPMI_ENTITY_ID	"entity-id"
1908f022dd6SRob Johnston #define	TOPO_PROP_IPMI_ENTITY_INST	"entity-instance"
1918f022dd6SRob Johnston 
1928f022dd6SRob Johnston /*
1938f022dd6SRob Johnston  * This property can be statically set in a map file and is consumed by the
1948f022dd6SRob Johnston  * fac_prov_ipmi module.
1958f022dd6SRob Johnston  */
1968f022dd6SRob Johnston #define	TOPO_PROP_IPMI_ENTITY_LIST	"entity-list"
1978f022dd6SRob Johnston 
198*6d65bee7SRob Johnston #define	TOPO_PGROUP_SLOT		"slot"
199*6d65bee7SRob Johnston #define	TOPO_PROP_SLOT_TYPE		"slot-type"
200*6d65bee7SRob Johnston 
201*6d65bee7SRob Johnston #define	TOPO_PGROUP_DIMM_SLOT		"dimm-slot"
202*6d65bee7SRob Johnston #define	TOPO_PROP_DIMM_SLOT_FORM	"form-factor"
203*6d65bee7SRob Johnston #define	TOPO_DIMM_SLOT_FORM_DIMM	"DIMM"
204*6d65bee7SRob Johnston #define	TOPO_DIMM_SLOT_FORM_SODIMM	"SODIMM"
205*6d65bee7SRob Johnston #define	TOPO_DIMM_SLOT_FORM_FBDIMM	"FBDIMM"
206*6d65bee7SRob Johnston 
207*6d65bee7SRob Johnston #define	TOPO_PGROUP_DIMM_PROPS		"dimm-properties"
208*6d65bee7SRob Johnston #define	TOPO_PROP_DIMM_TYPE
209*6d65bee7SRob Johnston #define	TOPO_DIMM_TYPE_UNKNOWN		"UNKNOWN"
210*6d65bee7SRob Johnston #define	TOPO_DIMM_TYPE_DDR		"DDR"
211*6d65bee7SRob Johnston #define	TOPO_DIMM_TYPE_DDR2		"DDR2"
212*6d65bee7SRob Johnston #define	TOPO_DIMM_TYPE_DDR3		"DDR3"
213*6d65bee7SRob Johnston #define	TOPO_DIMM_TYPE_DDR4		"DDR4"
214*6d65bee7SRob Johnston #define	TOPO_DIMM_TYPE_LPDDR		"LPDDR"
215*6d65bee7SRob Johnston #define	TOPO_DIMM_TYPE_LPDDR2		"LPDDR2"
216*6d65bee7SRob Johnston #define	TOPO_DIMM_TYPE_LPDDR3		"LPDDR3"
217*6d65bee7SRob Johnston #define	TOPO_DIMM_TYPE_LPDDR4		"LPDDR4"
218*6d65bee7SRob Johnston 
2190eb822a1Scindi #ifdef	__cplusplus
2200eb822a1Scindi }
2210eb822a1Scindi #endif
2220eb822a1Scindi 
2230eb822a1Scindi #endif	/* _TOPO_HC_H */
224