1.\" 2.\" SPDX-License-Identifier: BSD-2-Clause 3.\" 4.\" Copyright (c) 2018 Panasas 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25.\" 26.Dd March 2, 2018 27.Dt IMCSMB 4 28.Os 29.Sh NAME 30.Nm imcsmb 31.Nd Intel integrated Memory Controller (iMC) SMBus controller driver 32.Sh SYNOPSIS 33.Cd device pci 34.Cd device smbus 35.Cd device imcsmb 36.Pp 37Alternatively, to load the driver as a module at boot time, place the following 38line in 39.Xr loader.conf 5 : 40.Bd -literal -offset indent 41imcsmb_load="YES" 42.Ed 43.Sh DESCRIPTION 44The 45.Nm 46driver provides 47.Xr smbus 4 48support for the SMBus controller functionality in the integrated Memory 49Controllers (iMCs) embedded in Intel Sandybridge-Xeon, Ivybridge-Xeon, 50Haswell-Xeon, and Broadwell-Xeon CPUs. 51Each CPU implements one or more iMCs, depending on the number of cores; 52each iMC implements two SMBus controllers (iMC-SMBs). 53The iMC-SMBs are used by the iMCs to read configuration information from the 54DIMMs during POST. 55They may also be used, by motherboard firmware or a BMC, to monitor the 56temperature of the DIMMs. 57.Pp 58The iMC-SMBs are 59.Sy not 60general-purpose SMBus controllers. 61By their nature, they are only ever attached to DIMMs, so they implement only 62the SMBus operations need for communicating with DIMMs. 63Specifically: 64.Pp 65.Bl -dash -offset indent -compact 66.It 67READB 68.It 69READW 70.It 71WRITEB 72.It 73WRITEW 74.El 75.Pp 76A more detailed discussion of the hardware and driver architecture can be found 77at the top of 78.Pa sys/dev/imcsmb/imcsmb_pci.c . 79.Sh WARNINGS 80As mentioned above, firmware might use the iMC-SMBs to read DIMM temperatures. 81The public iMC documentation does not describe any sort of coordination 82mechanism to prevent requests from different sources -- such as the motherboard 83firmware, a BMC, or the operating system -- from interfering with each other. 84.Pp 85.Bf Sy 86Therefore, it is highly recommended that developers contact the motherboard 87vendor for any board-specific instructions on how to disable and re-enable DIMM 88temperature monitoring. 89.Ef 90.Pp 91DIMM temperature monitoring should be disabled before returning from 92.Fn imcsmb_pci_request_bus , 93and re-enabled before returning from 94.Fn imcsmb_pci_release_bus . 95The driver includes comments to that effect at the appropriate locations. 96The driver has been tested and shown to work, with only that type of 97modification, on certain motherboards from Intel. 98.Po 99Unfortunately, those modifications were based on material covered under a 100non-disclosure agreement, and therefore are not included in this driver. 101.Pc 102The driver has also been tested and shown to work as-is on various motherboards 103from SuperMicro. 104.Pp 105The 106.Xr smb 4 107driver will connect to the 108.Xr smbus 4 109instances created by 110.Nm . 111However, since the IMC-SMBs are not general-purpose SMBus controllers, using 112.Xr smbmsg 8 113with those 114.Xr smb 4 115devices is not supported. 116.Sh SEE ALSO 117.Xr jedec_dimm 4 , 118.Xr smbus 4 119.Sh HISTORY 120The 121.Nm 122driver first appeared in 123.Fx 12.0 . 124.Sh AUTHORS 125The 126.Nm 127driver was originally written for Panasas by 128.An Joe Kloss . 129It was substantially refactored, and this manual page was written, by 130.An Ravi Pokala Aq Mt rpokala@freebsd.org 131