]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/jedec_dimm.4
Fix the driver name in ads111x.4, and hook the manpage up to the build.
[FreeBSD/FreeBSD.git] / share / man / man4 / jedec_dimm.4
1 .\"
2 .\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 .\"
4 .\" Copyright (c) 2016 Andriy Gapon <avg@FreeBSD.org>
5 .\" Copyright (c) 2018 Ravi Pokala <rpokala@freebsd.org>
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 July 31, 2018
30 .Dt JEDEC_DIMM 4
31 .Os
32 .Sh NAME
33 .Nm jedec_dimm
34 .Nd report asset information and temperatures for JEDEC DDR3 / DDR4 DIMMs
35 .Sh SYNOPSIS
36 .Bd -ragged -offset indent
37 .Cd "device jedec_dimm"
38 .Cd "device smbus"
39 .Ed
40 .Pp
41 Alternatively, to load the driver as a module at boot time, place the following
42 line in
43 .Xr loader.conf 5 :
44 .Bd -literal -offset indent
45 jedec_dimm_load="YES"
46 .Ed
47 .Pp
48 Addressing information must be manually specified in
49 .Pa /boot/device.hints :
50 .Bd -literal -offset indent
51 .Cd hint.jedec_dimm.0.at="smbus0"
52 .Cd hint.jedec_dimm.0.addr="0xa0"
53 .Cd hint.jedec_dimm.0.slotid="Silkscreen"
54 .Ed
55 .Sh DESCRIPTION
56 The
57 .Nm
58 driver reports asset information (Part Number, Serial Number) encoded in the
59 .Dq Serial Presence Detect
60 (SPD) data on JEDEC DDR3 and DDR4 DIMMs.
61 It also calculates and reports the memory capacity of the DIMM, in megabytes.
62 If the DIMM includes a
63 .Dq Thermal Sensor On DIMM
64 (TSOD), the temperature is also reported.
65 .Pp
66 The
67 .Nm
68 driver accesses the SPD and TSOD over the
69 .Xr smbus 4 .
70 .Pp
71 The data is reported via a
72 .Xr sysctl 8
73 interface; all values are read-only:
74 .Bl -tag -width "dev.jedec_dimm.X.capacity"
75 .It Va dev.jedec_dimm.X.%desc
76 a string description of the DIMM, including TSOD and slotid info if present.
77 .It Va dev.jedec_dimm.X.capacity
78 the DIMM's memory capacity, in megabytes
79 .It Va dev.jedec_dimm.X.part
80 the manufacturer's part number of the DIMM
81 .It Va dev.jedec_dimm.X.serial
82 the manufacturer's serial number of the DIMM
83 .It Va dev.jedec_dimm.X.slotid
84 a copy of the corresponding hint, if set
85 .It Va dev.jedec_dimm.X.temp
86 if a TSOD is present, the reported temperature
87 .It Va dev.jedec_dimm.X.type
88 the DIMM type (DDR3 or DDR4)
89 .El
90 .Pp
91 These values are configurable for
92 .Nm
93 via
94 .Xr device.hints 5 :
95 .Bl -tag -width "hint.jedec_dimm.X.slotid"
96 .It Va hint.jedec_dimm.X.at
97 the
98 .Xr smbus 4
99 to which the DIMM is connected
100 .It Va hint.jedec_dimm.X.addr
101 the SMBus address of the SPD.
102 JEDEC specifies that the four most-significant bits of the address are the
103 .Dq Device Type Identifier
104 (DTI), and that the DTI of the SPD is 0xa.
105 Since the least-significant bit of an SMBus address is the read/write bit, and
106 is always written as 0, that means the four least-significant bits of the
107 address must be even.
108 .It Va hint.jedec_dimm.X.slotid
109 optional slot identifier.
110 If populated with the DIMM slot name silkscreened on the motherboard, this
111 provides a mapping between the DIMM slot name and the DIMM serial number.
112 That mapping is useful for detailed asset tracking, and makes it easier to
113 physically locate a specific DIMM when doing a replacement.
114 This is useful when assembling multiple identical systems, as might be done by
115 a system vendor.
116 The mapping between bus/address and DIMM slot must first be determined, either
117 through motherboard documentation or trial-and-error.
118 .El
119 .Pp
120 If the DIMMs are on an I2C bus behind an
121 .Xr iicbus 4
122 controller, then the
123 .Xr iicsmb 4
124 bridge driver can be used to attach the
125 .Xr smbus 4 .
126 .Sh EXAMPLES
127 Consider two DDR4 DIMMs with the following hints:
128 .Bd -literal -offset indent
129 hint.jedec_dimm.0.at="smbus0"
130 hint.jedec_dimm.0.addr="0xa0"
131 hint.jedec_dimm.0.slotid="A1"
132
133 hint.jedec_dimm.6.at="smbus1"
134 hint.jedec_dimm.6.addr="0xa8"
135 .Ed
136 .Pp
137 Their
138 .Xr sysctl 8
139 output (sorted):
140 .Bd -literal -offset indent
141 dev.jedec_dimm.0.%desc: DDR4 DIMM w/ Atmel TSOD (A1)
142 dev.jedec_dimm.0.%driver: jedec_dimm
143 dev.jedec_dimm.0.%location: addr=0xa0
144 dev.jedec_dimm.0.%parent: smbus0
145 dev.jedec_dimm.0.%pnpinfo:
146 dev.jedec_dimm.0.capacity: 16384
147 dev.jedec_dimm.0.part: 36ASF2G72PZ-2G1A2
148 dev.jedec_dimm.0.serial: 0ea815de
149 dev.jedec_dimm.0.slotid: A1
150 dev.jedec_dimm.0.temp: 32.7C
151 dev.jedec_dimm.0.type: DDR4
152
153 dev.jedec_dimm.6.%desc: DDR4 DIMM w/ TSE2004av compliant TSOD
154 dev.jedec_dimm.6.%driver: jedec_dimm
155 dev.jedec_dimm.6.%location: addr=0xa8
156 dev.jedec_dimm.6.%parent: smbus1
157 dev.jedec_dimm.6.%pnpinfo:
158 dev.jedec_dimm.6.capacity: 8192
159 dev.jedec_dimm.6.part: VRA9MR8B2H1603
160 dev.jedec_dimm.6.serial: 0c4c46ad
161 dev.jedec_dimm.6.temp: 43.1C
162 dev.jedec_dimm.6.type: DDR4
163 .Ed
164 .Sh COMPATIBILITY
165 .Nm
166 implements a superset of the functionality of the now-deleted
167 .Xr jedec_ts 4 .
168 Hints for
169 .Xr jedec_ts 4
170 can be mechanically converted for use with
171 .Nm .
172 Two changes are required:
173 .Bl -enum
174 .It
175 In all
176 .Xr jedec_ts 4
177 hints, replace
178 .Dq jedec_ts
179 with
180 .Dq jedec_dimm
181 .It
182 In
183 .Xr jedec_ts 4
184 .Dq addr
185 hints, replace the TSOD DTI
186 .Dq 0x3
187 with the SPD DTI
188 .Dq 0xa
189 .El
190 .Pp
191 The following
192 .Xr sed 1
193 script will perform the necessary changes:
194 .Bd -literal -offset indent
195 sed -i ".old" -e 's/jedec_ts/jedec_dimm/' \\
196     -e '/jedec_dimm/s/addr="0x3/addr="0xa/' /boot/device.hints
197 .Ed
198 .Sh SEE ALSO
199 .Xr iicbus 4 ,
200 .Xr iicsmb 4 ,
201 .Xr smbus 4 ,
202 .Xr sysctl 8
203 .Sh STANDARDS
204 .Rs
205 (DDR3 SPD)
206 .%A JEDEC
207 .%T Standard 21-C, Annex K
208 .Re
209 .Pp
210 .Rs
211 (DDR3 TSOD)
212 .%A JEDEC
213 .%T Standard 21-C, TSE2002av
214 .Re
215 .Pp
216 .Rs
217 (DDR4 SPD)
218 .%A JEDEC
219 .%T Standard 21-C, Annex L
220 .Re
221 .Pp
222 .Rs
223 (DDR4 TSOD)
224 .%A JEDEC
225 .%T Standard 21-C, TSE2004av
226 .Re
227 .Sh HISTORY
228 The
229 .Nm
230 driver first appeared in
231 .Fx 12.0 .
232 .Sh AUTHORS
233 .An -nosplit
234 The
235 .Nm
236 driver and this manual page were written by
237 .An Ravi Pokala Aq Mt rpokala@freebsd.org .
238 They are both based in part on the now-deleted
239 .Xr jedec_ts 4
240 driver and manual page, written by
241 .An Andriy Gapon Aq Mt avg@FreeBSD.org .