From nobody Thu Jun 11 20:44:17 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gbvlC4HLTz6gZ1x for ; Thu, 11 Jun 2026 20:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gbvlC2ZNrz3hp4 for ; Thu, 11 Jun 2026 20:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781210663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+t0mAXE2bf7oAo+CsmypqCwWkpWQ48B88rAR+0oQ9ng=; b=EWkmRTV9o/ShqMbG8TbuWJNnZwDwwwKbtBctDqU6orWc8FwYvAaQrh1/627YPMg4JCf88P 1D39NjL/eA78AFEcaJOebn6N8Dj7Zf79qy110H2SgQcEIhSp0VyLBaMuegI8/TnMuqpFJe uX+TsrVQIA5B9oL1QEa/lsRh7WtifGQp8T6ciCi4kEw/JrNoyC9i4pvULOPC91OFto0XHD n8DS5x1M6odVJ8rPFbIRs/km6qcbtAx+d+szeX0oZTFJFxL3PhbO6C8AiZwjmpwm3IknVy +rcxsCecy7ppYtHd+O+tmqQUKGrk9oCRszrVMD1OBgX8Ypsx2T6FOOxvq3J7zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1781210663; a=rsa-sha256; cv=none; b=Ty/SBdTm6rT11kg4gjBrmjk1MWjILrAuJJ9tl1c4YiI/tc4iWKvTiORwmYIxapd08CB/zH gJTqjqJ0JOz1PpX8DI51o0MZDfHJdaJ3dd3z0K6ssWK8heh4PcB+XGEILDx8dTHgWS5Dz8 ejbmdy0fioT91N6dX8M/gy6b01vhecQBI37fr9AY5WqvDEyettHv+DC9X5XjwL+4fpGUZx Z0kATIozeJTRCAqRFpOCL0RRlfcVHpliGIKw8vQ9W+VWX2E5d1gJ9GNhsbKka4P81XY6F+ eHm84hIdzw20nI06Me2+owyO+S6SKUEjREqf1A/esSqWbXqYZaU9bA+3DVfWPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1781210663; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+t0mAXE2bf7oAo+CsmypqCwWkpWQ48B88rAR+0oQ9ng=; b=D0kZWV9fikyEzS8/MVpRqOtw9ucE9zYx2IK31yIBIH4FGyb7062FC2oaqP4qt+/IiLbC7W 76Zm5CX9hBrjEJOsjLgD+6Hbn5DypbJHinPzCK48WvjsWUo5KeFX+K9x+IZ/BRAXybua9D t/CDCBogK9UmMRY64TAiM9VqzI599Oe7G4buWn8aQ1f7JswjxviJRprZLyLO5LXC0dgMdP j65GzTfeoa7QcMkJsBpZNIS9O9K5/dJeDFxg0Gq20kl1jxw7iAoHXBVLztz9sOr/Z1T3HS JMzbFO8iww4GH/lNBxXMFmHjFvzryoaaN8UjVZ5iqLL9VjH5MLx7aFd4myo/rQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gbvlC28xqz16WV for ; Thu, 11 Jun 2026 20:44:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2225a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 11 Jun 2026 20:44:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 4733b4dca551 - main - amdsmu(4): Add manpage List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4733b4dca5519920a4effa82a62d319c47ef50af Auto-Submitted: auto-generated Date: Thu, 11 Jun 2026 20:44:17 +0000 Message-Id: <6a2b1e21.2225a.451824cd@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=4733b4dca5519920a4effa82a62d319c47ef50af commit 4733b4dca5519920a4effa82a62d319c47ef50af Author: Aymeric Wibo AuthorDate: 2026-06-11 20:39:37 +0000 Commit: Aymeric Wibo CommitDate: 2026-06-11 20:43:05 +0000 amdsmu(4): Add manpage Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57366 --- share/man/man4/Makefile | 2 + share/man/man4/amdsmu.4 | 184 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 186 insertions(+) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 4b9740e12081..a66d011f7b62 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -50,6 +50,7 @@ MAN= aac.4 \ ${_amdsbwd.4} \ ${_amdsmb.4} \ ${_amdsmn.4} \ + ${_amdsmu.4} \ ${_amdtemp.4} \ ${_bxe.4} \ ${_aout.4} \ @@ -855,6 +856,7 @@ _aibs.4= aibs.4 _amdsbwd.4= amdsbwd.4 _amdsmb.4= amdsmb.4 _amdsmn.4= amdsmn.4 +_amdsmu.4= amdsmu.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 _atopcase.4= atopcase.4 diff --git a/share/man/man4/amdsmu.4 b/share/man/man4/amdsmu.4 new file mode 100644 index 000000000000..bf36b0a6ec34 --- /dev/null +++ b/share/man/man4/amdsmu.4 @@ -0,0 +1,184 @@ +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2026 The FreeBSD Foundation +.\" +.\" This software was developed by Aymeric Wibo +.\" under sponsorship from the FreeBSD Foundation. +.\" +.Dd May 30, 2026 +.Dt AMDSMU 4 +.Os +.Sh NAME +.Nm amdsmu +.Nd device driver for the AMD System Management Unit +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device amdsmu" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr rc.conf 5 : +.Bd -literal -offset indent +kld_list="amdsmu" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the System Management Unit +.Pq SMU +for certain AMD mobile processors. +The SMU is a firmware component responsible for managing system power states, +and in particular for coordinating entry into and exit from the +S0ix suspend-to-idle sleep states. +.Pp +The driver communicates with the SMU over a register-based mailbox interface +to query firmware version information, retrieve power management metrics, +and hint to the SMU when the system is entering or leaving sleep. +The driver registers ACPI suspend and resume event handlers to send the +sleep hint to the SMU and refresh metrics after each sleep cycle. +.Pp +The following AMD processors are supported: +.Pp +.Bl -bullet -compact +.It +Cezanne +.It +Rembrandt +.It +Phoenix +.It +Krackan Point +.El +.Sh SYSCTL VARIABLES +The driver exposes information through the following +.Xr sysctl 8 +variables under the +.Va dev.amdsmu.%d +tree. +.Ss Firmware version +.Bl -tag -width indent +.It Va dev.amdsmu.%d.program +SMU program number. +.It Va dev.amdsmu.%d.version_major +SMU firmware major version number. +.It Va dev.amdsmu.%d.version_minor +SMU firmware minor version number. +.It Va dev.amdsmu.%d.version_revision +SMU firmware revision number. +.El +.Ss Power management metrics +The following variables are located under +.Va dev.amdsmu.%d.metrics +and reflect measurements from the most recent sleep cycle. +Time values are in microseconds. +.Bl -tag -width indent +.It Va dev.amdsmu.%d.metrics.table_version +Version of the SMU metrics table reported by the firmware. +.It Va dev.amdsmu.%d.metrics.hint_count +Number of times the sleep hint has been sent to the SMU. +Incremented each time the system enters suspend-to-idle. +.It Va dev.amdsmu.%d.metrics.s0i3_last_entry_status +Set to 1 if the last S0i3 entry was successful, 0 otherwise. +Useful for diagnosing failed S0i3 transitions. +.It Va dev.amdsmu.%d.metrics.time_last_in_s0i2 +Time spent in S0i2 during the last sleep cycle. +This is not relevant most of the time. +.It Va dev.amdsmu.%d.metrics.time_last_entering_s0i3 +Time spent transitioning into S0i3 during the last sleep cycle. +.It Va dev.amdsmu.%d.metrics.total_time_entering_s0i3 +Total cumulative time spent transitioning into S0i3 across all sleep cycles. +.It Va dev.amdsmu.%d.metrics.time_last_resuming +Time spent resuming from the last sleep cycle. +.It Va dev.amdsmu.%d.metrics.total_time_resuming +Total cumulative time spent resuming from sleep. +.It Va dev.amdsmu.%d.metrics.time_last_in_s0i3 +Time spent in S0i3 during the last sleep cycle. +.It Va dev.amdsmu.%d.metrics.total_time_in_s0i3 +Total cumulative time spent in S0i3 across all sleep cycles. +.It Va dev.amdsmu.%d.metrics.time_last_in_sw_drips +Time the system spent awake +.Pq i.e., not in S0i3 +during the last sleep cycle. +The term "SW DRIPS" is a bit of a misnomer. +.It Va dev.amdsmu.%d.metrics.total_time_in_sw_drips +Total cumulative time the system has spent awake during sleep cycles. +.El +.Ss IP blocks +Each hardware IP block that the SMU tracks is exposed under +.Va dev.amdsmu.%d.ip_blocks. , +where +.Sy +is one of +.Sy DISPLAY , +.Sy CPU , +.Sy GFX , +.Sy VDD , +.Sy ACP , +.Sy VCN , +.Sy ISP , +.Sy NBIO , +.Sy DF , +.Sy LAPIC , +.Sy USB3_0 +through +.Sy USB3_4 , +.Sy USB4_0 , +.Sy USB4_1 , +.Sy MPM , +.Sy JPEG , +.Sy IPU , +.Sy UMSCH , +or +.Sy VPE +(availability depends on the processor model). +Each IP block node contains the following variables: +.Bl -tag -width indent +.It Va dev.amdsmu.%d.ip_blocks..active +Boolean indicating whether this IP block is active +i.e., whether it could potentially constrain S0i3 entry. +.It Va dev.amdsmu.%d.ip_blocks..last_time +Time in microseconds that this IP block spent active +.Pq and thus blocking S0i3 entry +during the last sleep cycle. +If this value equals the value of +.Va dev.amdsmu.%d.metrics.time_last_in_sw_drips , +then this IP block was preventing entry into S0i3 during the last cycle. +.El +.Ss Idlemask +.Bl -tag -width indent +.It Va dev.amdsmu.%d.idlemask +Raw idlemask value read from the SMU. +This is an undocumented register intended to assist AMD in debugging +power management issues. +Its interpretation is hardware-specific and not defined by any public +specification. +.El +.Sh SEE ALSO +.Xr acpi 4 , +.Xr amdsmn 4 , +.Xr amdtemp 4 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 15.0 . +.Sh AUTHORS +.An Aymeric Wibo Aq Mt obiwac@FreeBSD.org +.Pp +Development was sponsored by the +.An FreeBSD Foundation . +.Sh BUGS +The +.Va dev.amdsmu.%d.ip_blocks.USB4_0.last_time +value typically contains garbage and should not be relied upon. +.Pp +USB4 blocking S0i3 entry appears to be reported through the +.Va USB3_0 +through +.Va USB3_4 +IP block metrics rather than through the dedicated USB4 blocks.