2 .\" SPDX-License-Identifier: BSD-2-Clause
4 .\" Copyright (c) 2016 Andriy Gapon <avg@FreeBSD.org>
5 .\" Copyright (c) 2018 Ravi Pokala <rpokala@freebsd.org>
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
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.
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.
34 .Nd report asset information and temperatures for JEDEC DDR3 / DDR4 DIMMs
36 .Bd -ragged -offset indent
37 .Cd "device jedec_dimm"
41 Alternatively, to load the driver as a module at boot time, place the following
44 .Bd -literal -offset indent
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"
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.
68 driver accesses the SPD and TSOD over the
71 The data is reported via a
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.mfg_week
80 the week within the year in which the DIMM was manufactured
81 .It Va dev.jedec_dimm.X.mfg_year
82 the year in which the DIMM was manufactured
83 .It Va dev.jedec_dimm.X.part
84 the manufacturer's part number of the DIMM
85 .It Va dev.jedec_dimm.X.serial
86 the manufacturer's serial number of the DIMM
87 .It Va dev.jedec_dimm.X.slotid
88 a copy of the corresponding hint, if set
89 .It Va dev.jedec_dimm.X.temp
90 if a TSOD is present, the reported temperature
91 .It Va dev.jedec_dimm.X.type
92 the DIMM type (DDR3 or DDR4)
95 These values are configurable for
99 .Bl -tag -width "hint.jedec_dimm.X.slotid"
100 .It Va hint.jedec_dimm.X.at
103 to which the DIMM is connected
104 .It Va hint.jedec_dimm.X.addr
105 the SMBus address of the SPD.
106 JEDEC specifies that the four most-significant bits of the address are the
107 .Dq Device Type Identifier
108 (DTI), and that the DTI of the SPD is 0xa.
109 Since the least-significant bit of an SMBus address is the read/write bit, and
110 is always written as 0, that means the four least-significant bits of the
111 address must be even.
112 .It Va hint.jedec_dimm.X.slotid
113 optional slot identifier.
114 If populated with the DIMM slot name silkscreened on the motherboard, this
115 provides a mapping between the DIMM slot name and the DIMM serial number.
116 That mapping is useful for detailed asset tracking, and makes it easier to
117 physically locate a specific DIMM when doing a replacement.
118 This is useful when assembling multiple identical systems, as might be done by
120 The mapping between bus/address and DIMM slot must first be determined, either
121 through motherboard documentation or trial-and-error.
124 If the DIMMs are on an I2C bus behind an
128 bridge driver can be used to attach the
131 Consider two DDR4 DIMMs with the following hints:
132 .Bd -literal -offset indent
133 hint.jedec_dimm.0.at="smbus0"
134 hint.jedec_dimm.0.addr="0xa0"
135 hint.jedec_dimm.0.slotid="A1"
137 hint.jedec_dimm.6.at="smbus1"
138 hint.jedec_dimm.6.addr="0xa8"
144 .Bd -literal -offset indent
145 dev.jedec_dimm.0.%desc: DDR4 DIMM w/ Atmel TSOD (A1)
146 dev.jedec_dimm.0.%driver: jedec_dimm
147 dev.jedec_dimm.0.%location: addr=0xa0
148 dev.jedec_dimm.0.%parent: smbus0
149 dev.jedec_dimm.0.%pnpinfo:
150 dev.jedec_dimm.0.capacity: 16384
151 dev.jedec_dimm.0.mfg_week: 30
152 dev.jedec_dimm.0.mfg_year: 17
153 dev.jedec_dimm.0.part: 36ASF2G72PZ-2G1A2
154 dev.jedec_dimm.0.serial: 0ea815de
155 dev.jedec_dimm.0.slotid: A1
156 dev.jedec_dimm.0.temp: 32.7C
157 dev.jedec_dimm.0.type: DDR4
159 dev.jedec_dimm.6.%desc: DDR4 DIMM w/ TSE2004av compliant TSOD
160 dev.jedec_dimm.6.%driver: jedec_dimm
161 dev.jedec_dimm.6.%location: addr=0xa8
162 dev.jedec_dimm.6.%parent: smbus1
163 dev.jedec_dimm.6.%pnpinfo:
164 dev.jedec_dimm.6.capacity: 8192
165 dev.jedec_dimm.6.mfg_week: 13
166 dev.jedec_dimm.6.mfg_year: 19
167 dev.jedec_dimm.6.part: VRA9MR8B2H1603
168 dev.jedec_dimm.6.serial: 0c4c46ad
169 dev.jedec_dimm.6.temp: 43.1C
170 dev.jedec_dimm.6.type: DDR4
174 implements a superset of the functionality of the now-deleted
178 can be mechanically converted for use with
180 Two changes are required:
193 hints, replace the TSOD DTI
201 script will perform the necessary changes:
202 .Bd -literal -offset indent
203 sed -i ".old" -e 's/jedec_ts/jedec_dimm/' \\
204 -e '/jedec_dimm/s/addr="0x3/addr="0xa/' /boot/device.hints
215 .%T Standard 21-C, Annex K
221 .%T Standard 21-C, TSE2002av
227 .%T Standard 21-C, Annex L
233 .%T Standard 21-C, TSE2004av
238 driver first appeared in
244 driver and this manual page were written by
245 .An Ravi Pokala Aq Mt rpokala@freebsd.org .
246 They are both based in part on the now-deleted
248 driver and manual page, written by
249 .An Andriy Gapon Aq Mt avg@FreeBSD.org .