From nobody Fri Jun 13 01:21:47 2025 X-Original-To: dev-commits-src-main@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 4bJM7J4NmKz5ykDC; Fri, 13 Jun 2025 01:21:48 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bJM7H6GB0z3Kmn; Fri, 13 Jun 2025 01:21:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749777707; 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=RgJ+SzQw9Ay3FZgC8PZeJX8pX9B2Dj4gGs0Xvn1TWEc=; b=HaDItsBdIrffbRSqTvUzikGQXzbEUp2Q+SllblgwSQkZhMxKZXRl3MaZS/YcvmTbgqWXFZ wwYL5gVt4OTge9WYOtRfZDEwejoJlYreVNjmyJxfxhj0KWHYStPLvN3CqbHyFg+WcWA+xU w2jihN/jKvZ77iN2bNrsR0SnBRStoi+tqtXMJPUzCbZVSZ97GIVeipT7foI01u0fLAKhf+ 9hpToJsa5ZBLo10TQaJZer0Fva+prYRWTr5QYdFT/rjm8yl0LUooBIoaNBBqeHfLrg4bDq iPq4bWUb8OYIOcaELg/LtbjHv5VzhXsCrUkTACxgAxc5VnHtR1U7El9Xjpp/iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1749777707; 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=RgJ+SzQw9Ay3FZgC8PZeJX8pX9B2Dj4gGs0Xvn1TWEc=; b=aO+l0l9enOGtiL7pvkMGoIaXYiLxBLm/W6WmXibqk3ojXJlydBd8x0n4suLePe1LlgCbV0 dAHfX8Y7rrcBU0t41iWGvBzCyyr/wMKiIwh9ZPZWwvsKOVCAiiPqTmPGX+1TW7BT6Ql+7Q 6cyKDOiNB9VHPK7vFMPor1PfFIcWa62mAgO8k3KhpRbfGP3qK0kwZKIK8S/2CnSGLw8TsR pH4G07uwRF+IqWzuoEBetOp3BRJdKuYrIylnr4s9JCxRe+M84gVKMtX1+o0aI3tDaaftKN s77ocQIgGOVPkV4gPzHyNVwqC9lII9rS9xVhp2qUq4lQJ/TXY3FXa0OGGUeflQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1749777707; a=rsa-sha256; cv=none; b=mnRzcpqokpo1+duYBjvCKAfu0kWZ9OfNWzvu3+etlR63xWF4a5nXmSXFs+3f7zm1MYD0mH XAuXL1kNXKS+nNirJWlaAGEXpzC4ercYWCm3Jt6z9NlTRZacIfkLd7GINAcUvJ1QrNYBGv PtAn6a9JTd/9bRvBKtSQOpJtO02QJ1Pby8lrtXeLSV7hQFHrk0FhR5NS423lI/05Io1PVH Vuu63xvMQd9lkwXe0TWX/9t13mJ/uEEAf/0d5urOOzq1YI7SgA83Q63Fha2I5S26fFE/Rh Gn4Pj1vEtOnJyRpHWf9XZWjwNgwB5HZBgKrHLE7Y0A/0ZflNlocLZjH3DR5NlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bJM7H5t1HzdVG; Fri, 13 Jun 2025 01:21:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 55D1LltF086597; Fri, 13 Jun 2025 01:21:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 55D1LlDb086594; Fri, 13 Jun 2025 01:21:47 GMT (envelope-from git) Date: Fri, 13 Jun 2025 01:21:47 GMT Message-Id: <202506130121.55D1LlDb086594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 954ac4049852 - main - acpi_wmi.4: fall cleaning List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 954ac4049852cc1cf6d6074d9247b67f02b84b12 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=954ac4049852cc1cf6d6074d9247b67f02b84b12 commit 954ac4049852cc1cf6d6074d9247b67f02b84b12 Author: Alexander Ziaee AuthorDate: 2024-10-17 05:24:50 +0000 Commit: Warner Losh CommitDate: 2025-06-13 01:21:44 +0000 acpi_wmi.4: fall cleaning + add descriptions to existing examples + github repo url in sysctls => port named in example using it + reword MOF description for consistency with external docs + restore standard link, move to STANDARDS + grammar and markup nits + tag SPDX MFC after: 3 days Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1477 Closes: https://github.com/freebsd/freebsd-src/pull/1477 --- share/man/man4/acpi_wmi.4 | 61 ++++++++++++++++++++++++++++------------------- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/share/man/man4/acpi_wmi.4 b/share/man/man4/acpi_wmi.4 index 9ad14ed7892a..e5c5517ba4ac 100644 --- a/share/man/man4/acpi_wmi.4 +++ b/share/man/man4/acpi_wmi.4 @@ -1,3 +1,6 @@ +.\"- +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2009 Michael Gmelin .\" All rights reserved. .\" @@ -22,47 +25,45 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 5, 2019 +.Dd June 12, 2025 .Dt ACPI_WMI 4 .Os .Sh NAME .Nm acpi_wmi -.Nd "ACPI to WMI mapping driver" +.Nd ACPI to WMI mapping driver .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: -.Bd -ragged -offset indent -.Cd "device acpi_wmi" -.Ed +.Pp +.Dl Cd "device acpi_wmi" .Pp Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : -.Bd -literal -offset indent -acpi_wmi_load="YES" -.Ed +.Pp +.Dl acpi_wmi_load="YES" .Sh DESCRIPTION The .Nm driver provides an interface for vendor specific WMI implementations -(e.g. HP and Acer laptops). -It creates /dev/wmistat%d, which can be read to get -information about GUIDs found in the system. +.Pq e.g. HP and Acer laptops . +It creates +.Pa /dev/wmistat%d , +which can be read to get information about GUIDs found in the system. .Sh FILES .Bl -tag -width /dev/wmistat%d -compact .It Pa /dev/wmistat%d -WMI status device. +WMI status devices. .El .Sh SYSCTLS The following sysctl node is currently implemented: -.Bl -tag +.Bl -tag -width "dev.acpi_wmi.%d.bmof" .It Va dev.acpi_wmi.%d.bmof -Managed Object Format (MOF) blob. -You can obtain human readable output by bmf2mof in bmfdec tool. -(https://github.com/pali/bmfdec) +binary Managed Object Format (MOF) buffer .El .Sh EXAMPLES +Read GUIDs from the first WMI interface found in the system: .Bd -literal # cat /dev/wmistat0 GUID INST EXPE METH STR EVENT OID @@ -78,7 +79,14 @@ GUID INST EXPE METH STR EVENT OID {8232DE3D-663D-4327-A8F4-E293ADB9BF05} 0 NO NO NO NO BG {8F1F6436-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BH {8F1F6435-9F42-42C8-BADC-0E9424F20C9A} 0 NO NO NO NO BI -# sysctl -b dev.acpi_wmi.0.bmof |bmf2mof +.Ed +.Pp +Read first WMI interface description with +.Sy bmf2mof +from +.Pa ports/converters/bmfdec : +.Bd -literal +# sysctl -b dev.acpi_wmi.0.bmof | bmf2mof [abstract] class Lenovo_BIOSElement { }; @@ -91,10 +99,15 @@ class Lenovo_BiosSetting : Lenovo_BiosElement { [WmiDataId(1), Description("BIOS setting")] String CurrentSetting; }; ... - .Ed .Sh SEE ALSO .Xr acpi 4 +.Sh STANDARDS +.Rs +.%T Windows Instrumentation: WMI and ACPI +.%I Microsoft Corporation +.%U https://github.com/microsoft/Windows-driver-samples/tree/main/wmi/wmiacpi +.Re .Sh HISTORY The .Nm @@ -107,13 +120,13 @@ The driver was written by .An Michael Gmelin Aq Mt freebsd@grem.de . .Pp -Work has been inspired by the Linux acpi-wmi driver written by Carlos Corbacho. -.Pp -See http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx for -the specification of ACPI-WMI. +Work inspired by the Linux +.Sy acpi-wmi +driver written by Carlos Corbacho. .Pp -MOF part has been inspired by the Linux wmi-bmof driver -written by Andy Lutomirski. +MOF handling inspired by the Linux +.Sy wmi-bmof +driver written by Andy Lutomirski. .Pp This manual page was written by .An Michael Gmelin Aq Mt freebsd@grem.de .