svn commit: r330680 - in stable/10: share/man/man4 sys/amd64/conf sys/conf sys/dev/imcsmb sys/i386/conf sys/modules/i2c/controllers sys/modules/i2c/controllers/imcsmb
Ravi Pokala
rpokala at FreeBSD.org
Fri Mar 9 02:55:31 UTC 2018
Author: rpokala
Date: Fri Mar 9 02:55:27 2018
New Revision: 330680
URL: https://svnweb.freebsd.org/changeset/base/330680
Log:
MFC r330304: imcsmb(4): Intel integrated Memory Controller (iMC) SMBus
controller driver
imcsmb(4) provides smbus(4) support for the SMBus controller functionality
in the integrated Memory Controllers (iMCs) embedded in Intel Sandybridge-
Xeon, Ivybridge-Xeon, Haswell-Xeon, and Broadwell-Xeon CPUs. Each CPU
implements one or more iMCs, depending on the number of cores; each iMC
implements two SMBus controllers (iMC-SMBs).
*** IMPORTANT NOTE ***
Because motherboard firmware or the BMC might try to use the iMC-SMBs for
monitoring DIMM temperatures and/or managing an NVDIMM, the driver might
need to temporarily disable those functions, or take a hardware interlock,
before using the iMC-SMBs. Details on how to do this may vary from board to
board, and the procedure may be proprietary. It is strongly suggested that
anyone wishing to use this driver contact their motherboard vendor, and
modify the driver as described in the manual page and in the driver itself.
(For what it's worth, the driver as-is has been tested on various SuperMicro
motherboards.)
Added:
stable/10/share/man/man4/imcsmb.4
- copied unchanged from r330304, head/share/man/man4/imcsmb.4
stable/10/sys/dev/imcsmb/
- copied from r330304, head/sys/dev/imcsmb/
stable/10/sys/modules/i2c/controllers/imcsmb/
- copied from r330304, head/sys/modules/i2c/controllers/imcsmb/
Modified:
stable/10/share/man/man4/Makefile
stable/10/sys/amd64/conf/NOTES
stable/10/sys/conf/files.amd64
stable/10/sys/conf/files.i386
stable/10/sys/i386/conf/NOTES
stable/10/sys/modules/i2c/controllers/Makefile
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/share/man/man4/Makefile
==============================================================================
--- stable/10/share/man/man4/Makefile Fri Mar 9 02:55:22 2018 (r330679)
+++ stable/10/share/man/man4/Makefile Fri Mar 9 02:55:27 2018 (r330680)
@@ -195,6 +195,7 @@ MAN= aac.4 \
iicbus.4 \
iicsmb.4 \
iir.4 \
+ ${_imcsmb.4} \
inet.4 \
inet6.4 \
intpm.4 \
@@ -786,6 +787,7 @@ _if_vmx.4= if_vmx.4
_if_vtnet.4= if_vtnet.4
_if_vxge.4= if_vxge.4
_if_wpi.4= if_wpi.4
+_imcsmb.4= imcsmb.4
_ipmi.4= ipmi.4
_io.4= io.4
_lindev.4= lindev.4
Copied: stable/10/share/man/man4/imcsmb.4 (from r330304, head/share/man/man4/imcsmb.4)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/10/share/man/man4/imcsmb.4 Fri Mar 9 02:55:27 2018 (r330680, copy of r330304, head/share/man/man4/imcsmb.4)
@@ -0,0 +1,133 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+.\"
+.\" Copyright (c) 2018 Panasas
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.Dd March 2, 2018
+.Dt IMCSMB 4
+.Os
+.Sh NAME
+.Nm imcsmb
+.Nd Intel integrated Memory Controller (iMC) SMBus controller driver
+.Sh SYNOPSIS
+.Cd device pci
+.Cd device smbus
+.Cd device imcsmb
+.Pp
+Alternatively, to load the driver as a module at boot time, place the following
+line in
+.Xr loader.conf 5 :
+.Bd -literal -offset indent
+imcsmb_load="YES"
+.Ed
+.Sh DESCRIPTION
+The
+.Nm
+driver provides
+.Xr smbus 4
+support for the SMBus controller functionality in the integrated Memory
+Controllers (iMCs) embedded in Intel Sandybridge-Xeon, Ivybridge-Xeon,
+Haswell-Xeon, and Broadwell-Xeon CPUs.
+Each CPU implements one or more iMCs, depending on the number of cores;
+each iMC implements two SMBus controllers (iMC-SMBs).
+The iMC-SMBs are used by the iMCs to read configuration information from the
+DIMMs during POST.
+They may also be used, by motherboard firmware or a BMC, to monitor the
+temperature of the DIMMs.
+.Pp
+The iMC-SMBs are
+.Sy not
+general-purpose SMBus controllers.
+By their nature, they are only ever attached to DIMMs, so they implement only
+the SMBus operations need for communicating with DIMMs.
+Specifically:
+.Pp
+.Bl -dash -offset indent -compact
+.It
+READB
+.It
+READW
+.It
+WRITEB
+.It
+WRITEW
+.El
+.Pp
+A more detailed discussion of the hardware and driver architecture can be found
+at the top of
+.Pa sys/dev/imcsmb/imcsmb_pci.c .
+.Sh WARNINGS
+As mentioned above, firmware might use the iMC-SMBs to read DIMM temperatures.
+The public iMC documentation does not describe any sort of coordination
+mechanism to prevent requests from different sources -- such as the motherboard
+firmware, a BMC, or the operating system -- from interfering with each other.
+.Pp
+.Bf Sy
+Therefore, it is highly recommended that developers contact the motherboard
+vendor for any board-specific instructions on how to disable and re-enable DIMM
+temperature monitoring.
+.Ef
+.Pp
+DIMM temperature monitoring should be disabled before returning from
+.Fn imcsmb_pci_request_bus ,
+and re-enabled before returning from
+.Fn imcsmb_pci_release_bus .
+The driver includes comments to that effect at the appropriate locations.
+The driver has been tested and shown to work, with only that type of
+modification, on certain motherboards from Intel.
+.Po
+Unfortunately, those modifications were based on material covered under a
+non-disclosure agreement, and therefore are not included in this driver.
+.Pc
+The driver has also been tested and shown to work as-is on various motherboards
+from SuperMicro.
+.Pp
+The
+.Xr smb 4
+driver will connect to the
+.Xr smbus 4
+instances created by
+.Nm .
+However, since the IMC-SMBs are not general-purpose SMBus controllers, using
+.Xr smbmsg 8
+with those
+.Xr smb 4
+devices is not supported.
+.Sh SEE ALSO
+.Xr jedec_dimm 4 ,
+.Xr smbus 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 12.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was originally written for Panasas by
+.An Joe Kloss .
+It was substantially refactored, and this manual page was written, by
+.An Ravi Pokala Aq Mt rpokala at freebsd.org
Modified: stable/10/sys/amd64/conf/NOTES
==============================================================================
--- stable/10/sys/amd64/conf/NOTES Fri Mar 9 02:55:22 2018 (r330679)
+++ stable/10/sys/amd64/conf/NOTES Fri Mar 9 02:55:27 2018 (r330680)
@@ -444,6 +444,11 @@ device hptiop
device ips
#
+# Intel integrated Memory Controller (iMC) SMBus controller
+# Sandybridge-Xeon, Ivybridge-Xeon, Haswell-Xeon, Broadwell-Xeon
+device imcsmb
+
+#
# Intel C600 (Patsburg) integrated SAS controller
device isci
options ISCI_LOGGING # enable debugging in isci HAL
Modified: stable/10/sys/conf/files.amd64
==============================================================================
--- stable/10/sys/conf/files.amd64 Fri Mar 9 02:55:22 2018 (r330679)
+++ stable/10/sys/conf/files.amd64 Fri Mar 9 02:55:27 2018 (r330680)
@@ -202,6 +202,8 @@ dev/if_ndis/if_ndis.c optional ndis
dev/if_ndis/if_ndis_pccard.c optional ndis pccard
dev/if_ndis/if_ndis_pci.c optional ndis cardbus | ndis pci
dev/if_ndis/if_ndis_usb.c optional ndis usb
+dev/imcsmb/imcsmb.c optional imcsmb
+dev/imcsmb/imcsmb_pci.c optional imcsmb pci
dev/io/iodev.c optional io
dev/ioat/ioat.c optional ioat pci
dev/ioat/ioat_test.c optional ioat pci
Modified: stable/10/sys/conf/files.i386
==============================================================================
--- stable/10/sys/conf/files.i386 Fri Mar 9 02:55:22 2018 (r330679)
+++ stable/10/sys/conf/files.i386 Fri Mar 9 02:55:27 2018 (r330680)
@@ -265,6 +265,8 @@ dev/if_ndis/if_ndis.c optional ndis
dev/if_ndis/if_ndis_pccard.c optional ndis pccard
dev/if_ndis/if_ndis_pci.c optional ndis cardbus | ndis pci
dev/if_ndis/if_ndis_usb.c optional ndis usb
+dev/imcsmb/imcsmb.c optional imcsmb
+dev/imcsmb/imcsmb_pci.c optional imcsmb pci
dev/io/iodev.c optional io
dev/ipmi/ipmi.c optional ipmi
dev/ipmi/ipmi_acpi.c optional ipmi acpi
Modified: stable/10/sys/i386/conf/NOTES
==============================================================================
--- stable/10/sys/i386/conf/NOTES Fri Mar 9 02:55:22 2018 (r330679)
+++ stable/10/sys/i386/conf/NOTES Fri Mar 9 02:55:27 2018 (r330680)
@@ -752,6 +752,11 @@ device hptrr
device hptiop
#
+# Intel integrated Memory Controller (iMC) SMBus controller
+# Sandybridge-Xeon, Ivybridge-Xeon, Haswell-Xeon, Broadwell-Xeon
+device imcsmb
+
+#
# IBM (now Adaptec) ServeRAID controllers
device ips
Modified: stable/10/sys/modules/i2c/controllers/Makefile
==============================================================================
--- stable/10/sys/modules/i2c/controllers/Makefile Fri Mar 9 02:55:22 2018 (r330679)
+++ stable/10/sys/modules/i2c/controllers/Makefile Fri Mar 9 02:55:27 2018 (r330680)
@@ -6,4 +6,8 @@ SUBDIR = lpbb
SUBDIR = alpm amdpm amdsmb ichsmb intpm ismt nfsmb viapm lpbb pcf
.endif
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
+SUBDIR += imcsmb
+.endif
+
.include <bsd.subdir.mk>
More information about the svn-src-all
mailing list