Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS-6743 need topo maps for the SMCI,SYS-2028U-E1CNRT+ OS-6748 extend disk topo plugin to enumerate nvme devices #226

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions manifest
Original file line number Diff line number Diff line change
Expand Up @@ -10566,6 +10566,9 @@ f usr/platform/i86pc/lib/fm/topo/maps/SSG-2028R-ACR24L-disk-hc-topology.xml 0444
f usr/platform/i86pc/lib/fm/topo/maps/SSG-2028R-ACR24L-hc-topology.xml 0444 root sys
f usr/platform/i86pc/lib/fm/topo/maps/SSG-2028R-ACR24L-slot-hc-topology.xml 0444 root sys
f usr/platform/i86pc/lib/fm/topo/maps/SSG-2028R-ACR24L-usb.usbtopo 0444 root sys
f usr/platform/i86pc/lib/fm/topo/maps/SYS-2028U-E1CNRT+-chassis-hc-topology.xml 0444 root sys
f usr/platform/i86pc/lib/fm/topo/maps/SYS-2028U-E1CNRT+-hc-topology.xml 0444 root sys
f usr/platform/i86pc/lib/fm/topo/maps/SYS-2028U-E1CNRT+-usb.usbtopo 0444 root sys
f usr/platform/i86pc/lib/fm/topo/maps/SSG-2029P-ACR24L-chassis-hc-topology.xml 0444 root sys
f usr/platform/i86pc/lib/fm/topo/maps/SSG-2029P-ACR24L-disk-hc-topology.xml 0444 root sys
f usr/platform/i86pc/lib/fm/topo/maps/SSG-2029P-ACR24L-hc-topology.xml 0444 root sys
Expand Down
1 change: 1 addition & 0 deletions usr/src/lib/fm/topo/libtopo/common/hc.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ static const hcc_t hc_canon[] = {
{ MOTHERBOARD, TOPO_STABILITY_PRIVATE },
{ NIU, TOPO_STABILITY_PRIVATE },
{ NIUFN, TOPO_STABILITY_PRIVATE },
{ NVME, TOPO_STABILITY_PRIVATE },
{ PCI_BUS, TOPO_STABILITY_PRIVATE },
{ PCI_DEVICE, TOPO_STABILITY_PRIVATE },
{ PCI_FUNCTION, TOPO_STABILITY_PRIVATE },
Expand Down
5 changes: 5 additions & 0 deletions usr/src/lib/fm/topo/libtopo/common/topo_hc.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ extern "C" {
#define MOTHERBOARD "motherboard"
#define NIU "niu"
#define NIUFN "niufn"
#define NVME "nvme"
#define PCI_BUS "pcibus"
#define PCI_DEVICE "pcidev"
#define PCI_FUNCTION "pcifn"
Expand Down Expand Up @@ -138,6 +139,7 @@ extern "C" {
#define TOPO_BINDING_ENCLOSURE "enclosure"
#define TOPO_BINDING_SLOT "slot"
#define TOPO_BINDING_PORT "port"
#define TOPO_BINDING_PARENT_DEV "parent-device"

#define TOPO_PGROUP_STORAGE "storage"
#define TOPO_STORAGE_INITIATOR_PORT "initiator-port"
Expand Down Expand Up @@ -290,6 +292,9 @@ extern "C" {
#define TOPO_PROP_UFM_SLOT_MODE "ufm-slot-mode"
#define TOPO_PROP_UFM_SLOT_ACTIVE "ufm-slot-active"

#define TOPO_PGROUP_NVME "nvme-properties"
#define TOPO_PROP_NVME_VER "nvme-version"

#ifdef __cplusplus
}
#endif
Expand Down
8 changes: 4 additions & 4 deletions usr/src/lib/fm/topo/libtopo/common/topo_xml.c
Original file line number Diff line number Diff line change
Expand Up @@ -1346,14 +1346,14 @@ pad_process(topo_mod_t *mp, tf_rdata_t *rd, xmlNodePtr pxn, tnode_t *ptn,
*rpad = new;
}

if (new->tpad_dcnt > 0)
if (dependents_create(mp, rd->rd_finfo, new, pxn, ptn) < 0)
return (-1);

if (new->tpad_pgcnt > 0)
if (pgroups_create(mp, new, ptn) < 0)
return (-1);

if (new->tpad_dcnt > 0)
if (dependents_create(mp, rd->rd_finfo, new, pxn, ptn) < 0)
return (-1);

return (0);
}

Expand Down
3 changes: 2 additions & 1 deletion usr/src/lib/fm/topo/maps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
# Copyright (c) 2018, Joyent, Inc.
# Copyright 2019 Joyent, Inc.
# Copyright 2019 Peter Tribble.
#

Expand Down Expand Up @@ -54,6 +54,7 @@ i386_SUBDIRS = i86pc \
Joyent,Joyent-Compute-Platform-330x \
Joyent,Joyent-Storage-Platform-7001 \
SMCI,SSG-2028R-ACR24L \
SMCI,SYS-2028U-E1CNRT+ \
SMCI,SSG-6049P-E1CR36L \
SMCI,SSG-2029P-ACR24L

Expand Down
29 changes: 29 additions & 0 deletions usr/src/lib/fm/topo/maps/SMCI,SYS-2028U-E1CNRT+/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2019 Joyent, Inc.
#
ARCH = i86pc
CLASS = arch
DTDFILE = topology.dtd.1

TOPOFILE = \
SYS-2028U-E1CNRT+-hc-topology.xml \
SYS-2028U-E1CNRT+-chassis-hc-topology.xml \
SYS-2028U-E1CNRT+-usb.usbtopo

SRCDIR = ../SMCI,SYS-2028U-E1CNRT+

PLATFORM = SYS-2028U-E1CNRT+

include ../Makefile.map

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0"?>
<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
<!--
This file and its contents are supplied under the terms of the
Common Development and Distribution License ("CDDL"), version 1.0.
You may only use this file in accordance with the terms of version
1.0 of the CDDL.

A full copy of the text of the CDDL should have accompanied this
source. A copy of the CDDL is also available via the Internet at
http://www.illumos.org/license/CDDL.

Copyright 2019 Joyent, Inc.
-->

<topology name='chassis' scheme='hc'>
<range name='chassis' min='0' max='0'>
<node instance='0'>
<fac-enum provider='fac_prov_ipmi' />
<!--
chassis locate LED
-->
<facility name='locate' type='indicator' provider='fac_prov_ipmi' >
<propgroup name='facility' version='1' name-stability='Private'
data-stability='Private' >
<propval name='type' type='uint32' value='1' />
<propmethod name='chassis_ident_mode' version='0'
propname='mode' proptype='uint32' mutable='1' />
</propgroup>
</facility>
<propgroup name='ipmi' version='1'
name-stability='Private' data-stability='Private' >
<propval name='entity-list' type='string_array' >
<propitem value='Chassis Intru' />
</propval>
</propgroup>
</node>
</range>
</topology>
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
<?xml version="1.0"?>
<!DOCTYPE topology SYSTEM "/usr/share/lib/xml/dtd/topology.dtd.1">
<!--

This file and its contents are supplied under the terms of the
Common Development and Distribution License ("CDDL"), version 1.0.
You may only use this file in accordance with the terms of version
1.0 of the CDDL.

A full copy of the text of the CDDL should have accompanied this
source. A copy of the CDDL is also available via the Internet at
http://www.illumos.org/license/CDDL.

Copyright 2019 Joyent, Inc.

-->

<topology name='i86pc' scheme='hc'>

<range name='motherboard' min='0' max='0'>
<enum-method name='smbios' version='1' />
<node instance='0' static='true'>
<fac-enum provider='fac_prov_ipmi' />
<propgroup name='protocol' version='1'
name-stability='Private' data-stability='Private' >
<propval name='label' type='string' value='MB' />
</propgroup>
<propgroup name='ipmi' version='1'
name-stability='Private' data-stability='Private' >
<propval name='entity-list' type='string_array' >
<propitem value='CPU1 Temp' />
<propitem value='CPU2 Temp' />
<propitem value='MB_NIC_Temp1' />
<propitem value='MB_NIC_Temp2' />
<propitem value='PCH Temp' />
<propitem value='Peripheral Temp' />
<propitem value='5VSB' />
<propitem value='5VCC' />
<propitem value='3.3VSB' />
<propitem value='3.3VCC' />
<propitem value='1.5V PCH' />
<propitem value='1.2V BMC' />
<propitem value='1.05V PCH' />
<propitem value='12V' />
<propitem value='5VCC' />
<propitem value='5VSB' />
<propitem value='NVMe_SSD Temp' />
<propitem value='VBAT' />
<propitem value='Vcpu1' />
<propitem value='Vcpu2' />
<propitem value='VDIMMAB' />
<propitem value='VDIMMCD' />
<propitem value='VDIMMEF' />
<propitem value='VDIMMGH' />
<propitem value='VmemABVRM' />
<propitem value='VmemCDVRM' />
<propitem value='VmemEFVRM' />
<propitem value='VmemGHVRM' />
</propval>
</propgroup>
</node>

<dependents grouping='children'>
<range name='chip' min='0' max='1'>
<enum-method name='chip' version='1' />
</range>
<range name='hostbridge' min='0' max='254'>
<enum-method name='hostbridge' version='1' />
</range>
<range name='sp' min='0' max='0'>
<enum-method name='ipmi' version='1' />
</range>
<range name='usb-mobo' min='0' max='256'>
<enum-method name='usb' version='1' />
</range>
</dependents>

</range>

<range name='chassis' min='0' max='0'>
<propmap name='SYS-2028U-E1CNRT+-chassis' />

<dependents grouping='children'>

<range name='psu' min='0' max='1'>
<enum-method name='ipmi' version='1' />
</range>
<range name='fan' min='0' max='8'>
<enum-method name='ipmi' version='1' />
</range>
<range name='usb-chassis' min='0' max='256'>
<enum-method name='usb' version='1' />
</range>

</dependents>

</range>

<range name='ses-enclosure' min='0' max='0'>
<enum-method name='ses' version='1' />
<node instance='0' static='true'>
<dependents grouping='children'>
<range name='bay' min='0' max='23'>
<node instance='20' static='true'>
<propgroup name='binding' version='1'
name-stability='Private' data-stability='Private' >
<propval name='driver' type='string' value='nvme' />
<propval name='parent-device' type='string'
value='/pci@0,0/pci8086,6f08@3' />
</propgroup>
<dependents grouping='children'>
<range name='nvme' min='0' max='0'>
<enum-method name='disk' version='1' />
</range>
</dependents>
</node>
<node instance='21' static='true'>
<propgroup name='binding' version='1'
name-stability='Private' data-stability='Private' >
<propval name='driver' type='string' value='nvme' />
<propval name='parent-device' type='string'
value='/pci@0,0/pci8086,6f09@3,1' />
</propgroup>
<dependents grouping='children'>
<range name='nvme' min='0' max='0'>
<enum-method name='disk' version='1' />
</range>
</dependents>
</node>
<node instance='22' static='true'>
<propgroup name='binding' version='1'
name-stability='Private' data-stability='Private' >
<propval name='driver' type='string' value='nvme' />
<propval name='parent-device' type='string'
value='/pci@0,0/pci8086,6f0a@3,2' />
</propgroup>
<dependents grouping='children'>
<range name='nvme' min='0' max='0'>
<enum-method name='disk' version='1' />
</range>
</dependents>
</node>
<node instance='23' static='true'>
<propgroup name='binding' version='1'
name-stability='Private' data-stability='Private' >
<propval name='driver' type='string' value='nvme' />
<propval name='parent-device' type='string'
value='/pci@0,0/pci8086,6f0b@3,3' />
</propgroup>
<dependents grouping='children'>
<range name='nvme' min='0' max='0'>
<enum-method name='disk' version='1' />
</range>
</dependents>
</node>
</range> <!-- bay -->
</dependents>
</node> <!-- ses-enclosure=0 -->
</range> <!-- ses-enclosure -->

</topology>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#

#
# Copyright 2019 Joyent, Inc.
#

#
# This file describes the USB topology for the SuperMicro
# SYS-2028U-E1CNRT+ product. While the system board contains headers for up
# to 5 USB 3.0 ports, this particular plaform only wires up two of them.
# Both ports are accessible from the rear of the chassis.
#
# For more information on the format see topo_usb_file.c.
#

enable-acpi-match
port
label
Rear Upper USB
chassis
external
port-type
0x3
acpi-path
\_SB_.PC00.XHCI.RHUB.HS02
acpi-path
\_SB_.PC00.XHCI.RHUB.SS02
end-port

port
label
Rear Lower USB
chassis
external
port-type
0x3
acpi-path
\_SB_.PC00.XHCI.RHUB.HS01
acpi-path
\_SB_.PC00.XHCI.RHUB.SS01
end-port
4 changes: 2 additions & 2 deletions usr/src/lib/fm/topo/modules/common/disk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# Copyright (c) 2018, Joyent, Inc.
# Copyright 2019 Joyent, Inc.
#

MODULE = disk
CLASS = common

MODULESRCS = disk.c disk_common.c disk_mptsas.c
MODULESRCS = disk.c disk_common.c disk_mptsas.c disk_nvme.c

include ../../Makefile.plugin

Expand Down
Loading