xref: /freebsd/share/man/man4/amdsmu.4 (revision 2072f71f810a2b163ea2010a86b7ab1afdb31330)
1.\" SPDX-License-Identifier: BSD-2-Clause
2.\"
3.\" Copyright (c) 2026 The FreeBSD Foundation
4.\"
5.\" This software was developed by Aymeric Wibo <obiwac@freebsd.org>
6.\" under sponsorship from the FreeBSD Foundation.
7.\"
8.Dd September 13, 2026
9.Dt AMDSMU 4
10.Os
11.Sh NAME
12.Nm amdsmu
13.Nd device driver for the AMD System Management Unit
14.Sh SYNOPSIS
15.Cd device amdsmu
16.Sh DESCRIPTION
17The
18.Nm
19driver provides support for the System Management Unit
20.Pq SMU
21for certain AMD mobile processors.
22The SMU is a firmware component responsible for managing system power states,
23and in particular for coordinating entry into and exit from the
24S0ix suspend-to-idle sleep states.
25.Pp
26The driver communicates with the SMU over a register-based mailbox interface
27to query firmware version information, retrieve power management metrics,
28and hint to the SMU when the system is entering or leaving sleep.
29The driver registers ACPI suspend and resume event handlers to send the
30sleep hint to the SMU and refresh metrics after each sleep cycle.
31.Sh HARDWARE
32The
33.Nm
34driver supports the
35System Management Unit in the following AMD mobile processors:
36.Pp
37.Bl -bullet -compact
38.It
39Cezanne
40.It
41Rembrandt
42.It
43Phoenix
44.It
45Krackan Point
46.El
47.Sh SYSCTL VARIABLES
48The driver exposes information through the following
49.Xr sysctl 8
50variables under the
51.Va dev.amdsmu.%d
52tree.
53.Ss Firmware version
54.Bl -tag -width indent
55.It Va dev.amdsmu.%d.program
56SMU program number.
57.It Va dev.amdsmu.%d.version_major
58SMU firmware major version number.
59.It Va dev.amdsmu.%d.version_minor
60SMU firmware minor version number.
61.It Va dev.amdsmu.%d.version_revision
62SMU firmware revision number.
63.El
64.Ss Power management metrics
65The following variables are located under
66.Va dev.amdsmu.%d.metrics
67and reflect measurements from the most recent sleep cycle.
68Time values are in microseconds.
69.Bl -tag -width indent
70.It Va dev.amdsmu.%d.metrics.table_version
71Version of the SMU metrics table reported by the firmware.
72.It Va dev.amdsmu.%d.metrics.hint_count
73Number of times the sleep hint has been sent to the SMU.
74Incremented each time the system enters suspend-to-idle.
75.It Va dev.amdsmu.%d.metrics.s0i3_last_entry_status
76Set to 1 if the last S0i3 entry was successful, 0 otherwise.
77Useful for diagnosing failed S0i3 transitions.
78.It Va dev.amdsmu.%d.metrics.time_last_in_s0i2
79Time spent in S0i2 during the last sleep cycle.
80This is not relevant most of the time.
81.It Va dev.amdsmu.%d.metrics.time_last_entering_s0i3
82Time spent transitioning into S0i3 during the last sleep cycle.
83.It Va dev.amdsmu.%d.metrics.total_time_entering_s0i3
84Total cumulative time spent transitioning into S0i3 across all sleep cycles.
85.It Va dev.amdsmu.%d.metrics.time_last_resuming
86Time spent resuming from the last sleep cycle.
87.It Va dev.amdsmu.%d.metrics.total_time_resuming
88Total cumulative time spent resuming from sleep.
89.It Va dev.amdsmu.%d.metrics.time_last_in_s0i3
90Time spent in S0i3 during the last sleep cycle.
91.It Va dev.amdsmu.%d.metrics.total_time_in_s0i3
92Total cumulative time spent in S0i3 across all sleep cycles.
93.It Va dev.amdsmu.%d.metrics.time_last_in_sw_drips
94Time the system spent awake
95.Pq i.e., not in S0i3
96during the last sleep cycle.
97The term "SW DRIPS" is a bit of a misnomer.
98.It Va dev.amdsmu.%d.metrics.total_time_in_sw_drips
99Total cumulative time the system has spent awake during sleep cycles.
100.El
101.Ss IP blocks
102Each hardware IP block that the SMU tracks is exposed under
103.Va dev.amdsmu.%d.ip_blocks.<name> ,
104where
105.Sy <name>
106is one of
107.Sy DISPLAY ,
108.Sy CPU ,
109.Sy GFX ,
110.Sy VDD ,
111.Sy ACP ,
112.Sy VCN ,
113.Sy ISP ,
114.Sy NBIO ,
115.Sy DF ,
116.Sy LAPIC ,
117.Sy USB3_0
118through
119.Sy USB3_4 ,
120.Sy USB4_0 ,
121.Sy USB4_1 ,
122.Sy MPM ,
123.Sy JPEG ,
124.Sy IPU ,
125.Sy UMSCH ,
126or
127.Sy VPE
128(availability depends on the processor model).
129Each IP block node contains the following variables:
130.Bl -tag -width indent
131.It Va dev.amdsmu.%d.ip_blocks.<name>.active
132Boolean indicating whether this IP block is active
133i.e., whether it could potentially constrain S0i3 entry.
134.It Va dev.amdsmu.%d.ip_blocks.<name>.last_time
135Time in microseconds that this IP block spent active
136.Pq and thus blocking S0i3 entry
137during the last sleep cycle.
138If this value equals the value of
139.Va dev.amdsmu.%d.metrics.time_last_in_sw_drips ,
140then this IP block was preventing entry into S0i3 during the last cycle.
141.El
142.Ss Idlemask
143.Bl -tag -width indent
144.It Va dev.amdsmu.%d.idlemask
145Raw idlemask value read from the SMU.
146This is an undocumented register intended to assist AMD in debugging
147power management issues.
148Its interpretation is hardware-specific and not defined by any public
149specification.
150.El
151.Sh SEE ALSO
152.Xr acpi 4 ,
153.Xr amdsmn 4 ,
154.Xr amdtemp 4 ,
155.Xr sysctl 8
156.Sh HISTORY
157The
158.Nm
159driver first appeared in
160.Fx 15.0 .
161.Sh AUTHORS
162.An Aymeric Wibo Aq Mt obiwac@FreeBSD.org
163.Pp
164Development was sponsored by the
165.An -nosplit
166.An FreeBSD Foundation .
167.Sh BUGS
168The
169.Va dev.amdsmu.%d.ip_blocks.USB4_0.last_time
170value typically contains garbage and should not be relied upon.
171.Pp
172USB4 blocking S0i3 entry appears to be reported by the
173.Va USB3_0
174through
175.Va USB3_4
176IP block metrics rather than through the dedicated USB4 blocks.
177