xref: /netbsd-src/share/man/man4/man4.x86/imcsmb.4 (revision 16da680a0805e83e9542e6c1e5f6652bf615a7db)
1.\" $NetBSD: imcsmb.4,v 1.10 2020/11/14 20:04:46 wiz Exp $
2.\"
3.\" Copyright (c) 2018 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Paul Goyette
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
31.\"
32.\" Copyright (c) 2018 Panasas
33.\" All rights reserved.
34.\"
35.\" Redistribution and use in source and binary forms, with or without
36.\" modification, are permitted provided that the following conditions
37.\" are met:
38.\" 1. Redistributions of source code must retain the above copyright
39.\"    notice, this list of conditions and the following disclaimer.
40.\" 2. Redistributions in binary form must reproduce the above copyright
41.\"    notice, this list of conditions and the following disclaimer in the
42.\"    documentation and/or other materials provided with the distribution.
43.\"
44.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
45.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
46.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
47.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
48.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
49.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
50.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
51.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
52.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
53.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
54.\"
55.\" $FreeBSD$
56.\"
57.Dd April 16, 2020
58.Dt IMCSMB 4 x86
59.Os
60.Sh NAME
61.Nm imcsmb
62.Nd Intel integrated Memory Controller (iMC) SMBus controller driver
63.Sh SYNOPSIS
64.Cd "imc* at pci? dev ? func ?"
65.Cd "imcsmb* at imc?"
66.Cd "iic* at i2cbus?"
67.Pp
68Alternatively, to load the driver as a module at boot time, place the following
69line in
70.Xr boot.cfg 5 :
71.Pp
72.Dl load=imcsmb
73.Pp
74or add the following line to your /etc/modules file:
75.Pp
76.Dl imcsmb
77.Sh DESCRIPTION
78The
79.Nm
80driver provides
81.Xr iic 4
82support for the SMBus controller functionality in the integrated Memory
83Controllers (iMCs) embedded in Intel Sandybridge-Xeon, Ivybridge-Xeon,
84Haswell-Xeon, and Broadwell-Xeon CPUs.
85Each CPU implements one or more iMCs, depending on the number of cores; each
86iMC implements two SMBus controllers (iMC-SMBs).
87The iMC-SMBs are used by the iMCs to read configuration information from the
88DIMMs during POST.
89They may also be used, by motherboard firmware or a BMC, to monitor the
90temperature of the DIMMs.
91.Pp
92The iMC-SMBs are
93.Sy not
94general-purpose SMBus controllers.
95By their nature, they are only ever attached to DIMMs, so they implement only
96the SMBus operations needed for communicating with DIMMs.
97Specifically:
98.Pp
99.Bl -dash -offset indent -compact
100.It
101READB
102.It
103READW
104.It
105WRITEB
106.It
107WRITEW
108.El
109.Pp
110A more detailed discussion of the hardware and driver architecture can be found
111at the top of
112.Pa sys/dev/imcsmb/imc.c .
113.Sh WARNINGS
114As mentioned above, firmware might use the iMC-SMBs to read DIMM temperatures.
115The public iMC documentation does not describe any sort of coordination
116mechanism to prevent requests from different sources \(em such as the motherboard
117firmware, a BMC, or the operating system \(em from interfering with each other.
118.Pp
119.Bf Sy
120Therefore, it is highly recommended that developers contact the motherboard
121vendor for any board-specific instructions on how to disable and re-enable DIMM
122temperature monitoring.
123.Ef
124.Pp
125DIMM temperature monitoring should be disabled before returning from
126.Fn imcsmb_pci_request_bus ,
127and re-enabled before returning from
128.Fn imcsmb_pci_release_bus .
129The driver includes comments to that effect at the appropriate locations.
130The driver has been tested and shown to work, with only that type of
131modification, on certain motherboards from Intel.
132(Unfortunately, those modifications were based on material covered under a
133non-disclosure agreement, and therefore are not included in this driver.)
134The driver has also been tested and shown to work as-is on various motherboards
135from SuperMicro and ASUS.
136.Pp
137Because of the above, the
138.Nm
139driver is not included in the default
140.Dv GENERIC
141kernel.
142In order to use the
143.Nm
144driver, you must compile a custom kernel, or load the driver using
145.Xr modload 8 .
146.Pp
147The
148.Xr iic 4
149driver will connect to the i2cbus instances created by
150.Nm .
151.Sh SEE ALSO
152.Xr iic 4
153.Sh HISTORY
154The
155.Nm
156driver first appeared in
157.Fx 12.0 .
158It was later ported to
159.Nx 9.0 .
160.Sh AUTHORS
161.An -nosplit
162The
163.Nm
164driver was originally written for Panasas by
165.An Joe Kloss .
166It was substantially refactored, and this manual page was written, by
167.An Ravi Pokala Aq Mt rpokala@freebsd.org .
168It was adapted to
169.Nx
170by
171.An Paul Goyette Aq Mt pgoyette@NetBSD.org .
172