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