From nobody Sun Feb 22 04:30:36 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 4fJWHw1nqfz6SwGb for ; Sun, 22 Feb 2026 04:30:36 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fJWHw192hz3dp3 for ; Sun, 22 Feb 2026 04:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771734636; 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=TShi4LRSAKDz94A9LFYTPjKCYD2Q5E3jazapqfmRXlA=; b=db9qKGA3jlVqgiDx3dLx6TDwizeDlPrmqJM3hofKs15rS0yuGJHFPITQaiatC4Be0jcCK+ 7uj8NrHQZ+NVlBZU7HbyUYyVzyK6dvMDJ0VzFgRBmqKq8C54o26VU8yLRVvMUkOwqJ1cGY hvJJzpnA66payIP0uKqI3BUyUWscECjyjPZLkkdHN9buGwzx4FcwpOL3ZcLfqjjU9tFu1S mv2FA68HGue6pjcflzFKpJSk8W9UZscZP/vc5WJMmZAr5EqUSX9e5vSP+fe1TYmUjWyb1e GF7WVwfVuY2CvysbaBrYwX8zwnM7tQDZ1iqsiD8a6mLQm/scpvQVoo4xocOvDQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771734636; a=rsa-sha256; cv=none; b=Ow3jOr+WtHIuuSHHFmWUPyx2g3enL/1hH3cffrTB7hiZ+kr+sb428MXXFxUw11lvpatqiX XjbIJpcyXomkCsXNvHUwvIvf3io2Yoc/qiwMIRJGqksYUngtJHHmyWBsvo4VhALPL9kOLs 0znlNam6fMPNYGbkwDij9SMKPRra150K1YLF/1psPfLSUHn8l2W3VMKxh7mAl5h+t3Zx9z 7Z7qmf3VXFOIskOiYDgUQ4xUZUT/xQeDky/Y6EHtPcR8B+0gOEQGP7bteuCWaWvMoudtrp ErEFIJddubuorLzD+/07wi66jExxsFk04ROlJjNSZ5BKJXq2fg4uKu2gnIj16w== 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=1771734636; 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=TShi4LRSAKDz94A9LFYTPjKCYD2Q5E3jazapqfmRXlA=; b=wbQ6I73ruXyJzEKIKSSbjM3RBzZvEr87q6fA/uu22sfGceyxRkUjctihzuzO9PD6JFFEuS IGzb5OZ5HA++KQhl8PSsVvSLsinp7tgZwnqG0UNJDzuac2lUh0qGgXcd+tFkEyCvglYpSg cyDua+xmlpfJlOBqiL0slyfXa/ZEvA6x2gMs66REsnWhRyHQY8PqWHpVRYPNmzVWeurljD bn7FGuTIESBllAbDO+NZ7mksWfUB400ops0RhLHeFQKvhKRlVde3kh3aULZypRh2ebmmg0 GrYw1CB76/4y1FI8bf14hSqC/lLCfEFUp15mtn0Ut+ntvazykpKXHYQTJVrShQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fJWHw0S9RzCb7 for ; Sun, 22 Feb 2026 04:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2747c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 22 Feb 2026 04:30:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Enji Cooper Subject: git: ab3eaa6ea29d - stable/14 - Add ASMC_DEBUG make option 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ngie X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ab3eaa6ea29d846d3beb7dd90dbe0c7e0cea26c4 Auto-Submitted: auto-generated Date: Sun, 22 Feb 2026 04:30:36 +0000 Message-Id: <699a866c.2747c.72ccd08f@gitrepo.freebsd.org> The branch stable/14 has been updated by ngie: URL: https://cgit.FreeBSD.org/src/commit/?id=ab3eaa6ea29d846d3beb7dd90dbe0c7e0cea26c4 commit ab3eaa6ea29d846d3beb7dd90dbe0c7e0cea26c4 Author: Enji Cooper AuthorDate: 2026-01-04 08:27:57 +0000 Commit: Enji Cooper CommitDate: 2026-02-22 04:29:53 +0000 Add ASMC_DEBUG make option This allows folks to enable debug statements in asmc(4) using kernel configs via the `options ASMC_DEBUG` directive. While here, remove a duplicate `device vt_efifb` directive in `NOTES` as it's already handled in the `GENERIC` config MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54511 (cherry picked from commit f224591746bdaf14ad5f63de4738a3146cc2f55f) --- sys/amd64/conf/NOTES | 7 ++++--- sys/conf/options.amd64 | 3 +++ sys/dev/asmc/asmc.c | 21 +++++++++++---------- sys/modules/asmc/Makefile | 2 +- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/sys/amd64/conf/NOTES b/sys/amd64/conf/NOTES index 08d096cd800e..55f631675bbe 100644 --- a/sys/amd64/conf/NOTES +++ b/sys/amd64/conf/NOTES @@ -43,9 +43,6 @@ cpu HAMMER # aka K8, aka Opteron & Athlon64 # Optional devices: # -# vt(4) drivers. -device vt_efifb # EFI framebuffer - # 3Dfx Voodoo Graphics, Voodoo II /dev/3dfx CDEV support. This will create # the /dev/3dfx0 device to work with glide implementations. This should get # linked to /dev/3dfx and /dev/voodoo. Note that this is not the same as @@ -110,6 +107,10 @@ device ioat # Intel I/OAT DMA engine # EFI Runtime Services support options EFIRT +# Apple System Management Controller (SMC) +device asmc +options ASMC_DEBUG # Enable asmc(4)-specific debug logic. + # # Intel QuickAssist driver with OpenCrypto support # diff --git a/sys/conf/options.amd64 b/sys/conf/options.amd64 index 8402c89640f7..c7c1f4da2a4a 100644 --- a/sys/conf/options.amd64 +++ b/sys/conf/options.amd64 @@ -65,3 +65,6 @@ NO_LEGACY_PCIB opt_cpu.h # Compatibility with Linux MP table bugs. MPTABLE_LINUX_BUG_COMPAT + +# Enable asmc(4)-specific debug logic. +ASMC_DEBUG opt_asmc.h diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index c0fb342709a1..114f4130d8ce 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -34,7 +34,8 @@ * Inspired by the Linux applesmc driver. */ -#include +#include "opt_asmc.h" + #include #include #include @@ -84,7 +85,7 @@ static void asmc_sms_calibrate(device_t dev); static int asmc_sms_intrfast(void *arg); static void asmc_sms_printintr(device_t dev, uint8_t); static void asmc_sms_task(void *arg, int pending); -#ifdef DEBUG +#ifdef ASMC_DEBUG void asmc_dumpall(device_t); static int asmc_key_dump(device_t, int); #endif @@ -505,7 +506,7 @@ static driver_t asmc_driver = { */ #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("ASMC") -#ifdef DEBUG +#ifdef ASMC_DEBUG #define ASMC_DPRINTF(str) device_printf(dev, str) #else #define ASMC_DPRINTF(str) @@ -818,7 +819,7 @@ asmc_resume(device_t dev) return (0); } -#ifdef DEBUG +#ifdef ASMC_DEBUG void asmc_dumpall(device_t dev) { struct asmc_softc *sc = device_get_softc(dev); @@ -929,7 +930,7 @@ nosms: sc->sc_nkeys = 0; } -#ifdef DEBUG +#ifdef ASMC_DEBUG asmc_dumpall(dev); #endif @@ -964,19 +965,19 @@ asmc_wait_ack(device_t dev, uint8_t val, int amount) static int asmc_wait(device_t dev, uint8_t val) { -#ifdef DEBUG +#ifdef ASMC_DEBUG struct asmc_softc *sc; #endif if (asmc_wait_ack(dev, val, 1000) == 0) return (0); -#ifdef DEBUG +#ifdef ASMC_DEBUG sc = device_get_softc(dev); #endif val = val & ASMC_STATUS_MASK; -#ifdef DEBUG +#ifdef ASMC_DEBUG device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, val, ASMC_CMDPORT_READ(sc)); #endif @@ -999,7 +1000,7 @@ asmc_command(device_t dev, uint8_t command) { } } -#ifdef DEBUG +#ifdef ASMC_DEBUG device_printf(dev, "%s failed: 0x%x, 0x%x\n", __func__, command, ASMC_CMDPORT_READ(sc)); #endif @@ -1045,7 +1046,7 @@ out: return (error); } -#ifdef DEBUG +#ifdef ASMC_DEBUG static int asmc_key_dump(device_t dev, int number) { diff --git a/sys/modules/asmc/Makefile b/sys/modules/asmc/Makefile index 70d8ed845900..978b9a1c2113 100644 --- a/sys/modules/asmc/Makefile +++ b/sys/modules/asmc/Makefile @@ -2,6 +2,6 @@ .PATH: ${SRCTOP}/sys/dev/asmc KMOD= asmc -SRCS= asmc.c opt_acpi.h acpi_if.h bus_if.h device_if.h +SRCS= asmc.c opt_acpi.h opt_asmc.h acpi_if.h bus_if.h device_if.h .include