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.
32 .Nd report asset information and temperatures for JEDEC DDR3 / DDR4 DIMMs
34 .Bd -ragged -offset indent
35 .Cd "device jedec_dimm"
39 Alternatively, to load the driver as a module at boot time, place the following
42 .Bd -literal -offset indent
46 Addressing information must be manually specified in
47 .Pa /boot/device.hints :
48 .Bd -literal -offset indent
49 .Cd hint.jedec_dimm.0.at="smbus0"
50 .Cd hint.jedec_dimm.0.addr="0xa0"
51 .Cd hint.jedec_dimm.0.slotid="Silkscreen"
56 driver reports asset information (Part Number, Serial Number) encoded in the
57 .Dq Serial Presence Detect
58 (SPD) data on JEDEC DDR3 and DDR4 DIMMs.
59 It also calculates and reports the memory capacity of the DIMM, in megabytes.
60 If the DIMM includes a
61 .Dq Thermal Sensor On DIMM
62 (TSOD), the temperature is also reported.
66 driver accesses the SPD and TSOD over the
69 The data is reported via a
71 interface; all values are read-only:
72 .Bl -tag -width "dev.jedec_dimm.X.capacity"
73 .It Va dev.jedec_dimm.X.%desc
74 a string description of the DIMM, including TSOD and slotid info if present.
75 .It Va dev.jedec_dimm.X.capacity
76 the DIMM's memory capacity, in megabytes
77 .It Va dev.jedec_dimm.X.mfg_week
78 the week within the year in which the DIMM was manufactured
79 .It Va dev.jedec_dimm.X.mfg_year
80 the year in which the DIMM was manufactured
81 .It Va dev.jedec_dimm.X.part
82 the manufacturer's part number of the DIMM
83 .It Va dev.jedec_dimm.X.serial
84 the manufacturer's serial number of the DIMM
85 .It Va dev.jedec_dimm.X.slotid
86 a copy of the corresponding hint, if set
87 .It Va dev.jedec_dimm.X.temp
88 if a TSOD is present, the reported temperature
89 .It Va dev.jedec_dimm.X.type
90 the DIMM type (DDR3 or DDR4)
93 These values are configurable for
97 .Bl -tag -width "hint.jedec_dimm.X.slotid"
98 .It Va hint.jedec_dimm.X.at
101 to which the DIMM is connected
102 .It Va hint.jedec_dimm.X.addr
103 the SMBus address of the SPD.
104 JEDEC specifies that the four most-significant bits of the address are the
105 .Dq Device Type Identifier
106 (DTI), and that the DTI of the SPD is 0xa.
107 Since the least-significant bit of an SMBus address is the read/write bit, and
108 is always written as 0, that means the four least-significant bits of the
109 address must be even.
110 .It Va hint.jedec_dimm.X.slotid
111 optional slot identifier.
112 If populated with the DIMM slot name silkscreened on the motherboard, this
113 provides a mapping between the DIMM slot name and the DIMM serial number.
114 That mapping is useful for detailed asset tracking, and makes it easier to
115 physically locate a specific DIMM when doing a replacement.
116 This is useful when assembling multiple identical systems, as might be done by
118 The mapping between bus/address and DIMM slot must first be determined, either
119 through motherboard documentation or trial-and-error.
122 If the DIMMs are on an I2C bus behind an
126 bridge driver can be used to attach the
129 Consider two DDR4 DIMMs with the following hints:
130 .Bd -literal -offset indent
131 hint.jedec_dimm.0.at="smbus0"
132 hint.jedec_dimm.0.addr="0xa0"
133 hint.jedec_dimm.0.slotid="A1"
135 hint.jedec_dimm.6.at="smbus1"
136 hint.jedec_dimm.6.addr="0xa8"
142 .Bd -literal -offset indent
143 dev.jedec_dimm.0.%desc: DDR4 DIMM w/ Atmel TSOD (A1)
144 dev.jedec_dimm.0.%driver: jedec_dimm
145 dev.jedec_dimm.0.%location: addr=0xa0
146 dev.jedec_dimm.0.%parent: smbus0
147 dev.jedec_dimm.0.%pnpinfo:
148 dev.jedec_dimm.0.capacity: 16384
149 dev.jedec_dimm.0.mfg_week: 30
150 dev.jedec_dimm.0.mfg_year: 17
151 dev.jedec_dimm.0.part: 36ASF2G72PZ-2G1A2
152 dev.jedec_dimm.0.serial: 0ea815de
153 dev.jedec_dimm.0.slotid: A1
154 dev.jedec_dimm.0.temp: 32.7C
155 dev.jedec_dimm.0.type: DDR4
157 dev.jedec_dimm.6.%desc: DDR4 DIMM w/ TSE2004av compliant TSOD
158 dev.jedec_dimm.6.%driver: jedec_dimm
159 dev.jedec_dimm.6.%location: addr=0xa8
160 dev.jedec_dimm.6.%parent: smbus1
161 dev.jedec_dimm.6.%pnpinfo:
162 dev.jedec_dimm.6.capacity: 8192
163 dev.jedec_dimm.6.mfg_week: 13
164 dev.jedec_dimm.6.mfg_year: 19
165 dev.jedec_dimm.6.part: VRA9MR8B2H1603
166 dev.jedec_dimm.6.serial: 0c4c46ad
167 dev.jedec_dimm.6.temp: 43.1C
168 dev.jedec_dimm.6.type: DDR4
172 implements a superset of the functionality of the now-deleted
176 can be mechanically converted for use with
178 Two changes are required:
191 hints, replace the TSOD DTI
199 script will perform the necessary changes:
200 .Bd -literal -offset indent
201 sed -i ".old" -e 's/jedec_ts/jedec_dimm/' \\
202 -e '/jedec_dimm/s/addr="0x3/addr="0xa/' /boot/device.hints
213 .%T Standard 21-C, Annex K
219 .%T Standard 21-C, TSE2002av
225 .%T Standard 21-C, Annex L
231 .%T Standard 21-C, TSE2004av
236 driver first appeared in
242 driver and this manual page were written by
243 .An Ravi Pokala Aq Mt rpokala@freebsd.org .
244 They are both based in part on the now-deleted
246 driver and manual page, written by
247 .An Andriy Gapon Aq Mt avg@FreeBSD.org .