From: Guenter Roeck <linux@roeck-us.net>
To: Armin Wolf <W_Armin@gmx.de>
Cc: pali@kernel.org, jdelvare@suse.com, linux-hwmon@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 8/9] hwmon: (dell-smm) Document the WMI SMM interface
Date: Sat, 4 Nov 2023 07:58:29 -0700 [thread overview]
Message-ID: <1bfb887d-57ef-4e3b-9514-b9e402bb4f20@roeck-us.net> (raw)
In-Reply-To: <20231103185716.11007-9-W_Armin@gmx.de>
On Fri, Nov 03, 2023 at 07:57:15PM +0100, Armin Wolf wrote:
> Document the WMI SMM interface so that future developers
> can better understand how it works.
>
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
> ---
> Documentation/hwmon/dell-smm-hwmon.rst | 33 +++++++++++++++++++++++---
> 1 file changed, 30 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/hwmon/dell-smm-hwmon.rst b/Documentation/hwmon/dell-smm-hwmon.rst
> index d8f1d6859b96..fea8cf76088e 100644
> --- a/Documentation/hwmon/dell-smm-hwmon.rst
> +++ b/Documentation/hwmon/dell-smm-hwmon.rst
> @@ -186,8 +186,7 @@ SMM Interface
> The driver uses the SMM interface to send commands to the system BIOS.
> This interface is normally used by Dell's 32-bit diagnostic program or
> on newer notebook models by the buildin BIOS diagnostics.
> -The SMM is triggered by writing to the special ioports ``0xb2`` and ``0x84``,
> -and may cause short hangs when the BIOS code is taking too long to
> +The SMM may cause short hangs when the BIOS code is taking too long to
> execute.
>
> The SMM handler inside the system BIOS looks at the contents of the
> @@ -210,7 +209,35 @@ The SMM handler can signal a failure by either:
>
> - setting the lower sixteen bits of ``eax`` to ``0xffff``
> - not modifying ``eax`` at all
> -- setting the carry flag
> +- setting the carry flag (legacy SMM interface only)
> +
> +Legacy SMM Interface
> +--------------------
> +
> +When using the legacy SMM interface, a SMM is triggered by writing the least significant byte
> +of the command code to the special ioports ``0xb2`` and ``0x84``. This interface is not
> +described inside the ACPI tables and can thus only be detected by issuing a test SMM call.
> +
> +WMI SMM Interface
> +-----------------
> +
> +On modern Dell machines, the SMM calls are done over ACPI WMI:
> +
> +::
> +
> + #pragma namespace("\\\\.\\root\\dcim\\sysman\\diagnostics")
> + [WMI, Provider("Provider_DiagnosticsServices"), Dynamic, Locale("MS\\0x409"), Description("RunDellDiag"), guid("{F1DDEE52-063C-4784-A11E-8A06684B9B01}")]
> + class LegacyDiags {
> + [key, read] string InstanceName;
> + [read] boolean Active;
> +
> + [WmiMethodId(1), Implemented, read, write, Description("Legacy Method ")] void Execute([in, out] uint32 EaxLen, [in, out, WmiSizeIs("EaxLen") : ToInstance] uint8 EaxVal[], [in, out] uint32 EbxLen, [in, out, WmiSizeIs("EbxLen") : ToInstance] uint8 EbxVal[], [in, out] uint32 EcxLen, [in, out, WmiSizeIs("EcxLen") : ToInstance] uint8 EcxVal[], [in, out] uint32 EdxLen, [in, out, WmiSizeIs("EdxLen") : ToInstance] uint8 EdxVal[]);
I don't think this has to violate formatting rules.
Guenter
> + };
> +
> +Some machines support only the WMI SMM interface, while some machines support both interfaces.
> +The driver automatically detects which interfaces are present and will use the WMI SMM interface
> +if the legacy SMM interface is not present. The WMI SMM interface is usually slower than the
> +legacy SMM interface since ACPI methods need to be called in order to trigger a SMM.
>
> SMM command codes
> -----------------
> --
> 2.39.2
>
next prev parent reply other threads:[~2023-11-04 14:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-03 18:57 [PATCH 0/9] hwmon: (dell-smm) Add support for " Armin Wolf
2023-11-03 18:57 ` [PATCH 1/9] hwmon: (dell-smm) Prepare for multiple SMM calling backends Armin Wolf
2023-11-03 18:57 ` [PATCH 2/9] hwmon: (dell-smm) Move blacklist handling to module init Armin Wolf
2023-11-03 18:57 ` [PATCH 3/9] hwmon: (dell-smm) Move whitelist " Armin Wolf
2023-11-03 18:57 ` [PATCH 4/9] hwmon: (dell-smm) Move DMI config " Armin Wolf
2023-11-03 18:57 ` [PATCH 5/9] hwmon: (dell-smm) Move config entries out of i8k_dmi_table Armin Wolf
2023-11-03 18:57 ` [PATCH 6/9] hwmon: (dell-smm) Introduce helper function for data init Armin Wolf
2023-11-03 18:57 ` [PATCH 7/9] hwmon: (dell-smm) Add support for WMI SMM interface Armin Wolf
2023-11-04 14:56 ` Guenter Roeck
2023-11-03 18:57 ` [PATCH 8/9] hwmon: (dell-smm) Document the " Armin Wolf
2023-11-04 14:58 ` Guenter Roeck [this message]
2023-11-03 18:57 ` [PATCH 9/9] hwmon: (dell-smm) Add Optiplex 7000 to fan control whitelist Armin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1bfb887d-57ef-4e3b-9514-b9e402bb4f20@roeck-us.net \
--to=linux@roeck-us.net \
--cc=W_Armin@gmx.de \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pali@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®