From: Armin Wolf <W_Armin@gmx.de>
To: "Pali Rohár" <pali@kernel.org>,
"linux@weissschuh.net" <linux@weissschuh.net>,
"Kurt Borja" <kuurtb@gmail.com>,
akpm@linux-foundation.org, mcgrof@kernel.org,
russ.weight@linux.dev, dakr@kernel.org
Cc: "platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: In-kernel parser for the BMOF format used by WMI-ACPI
Date: Tue, 11 Mar 2025 21:06:16 +0100 [thread overview]
Message-ID: <a18f2f93-c8ee-47af-9446-97e3714fc275@gmx.de> (raw)
Hello,
since around 2017 we are able to partially decode the Binary MOF (BMOF) data used to describe the interfaces of WMI-ACPI
devices found inside modern devices. This initial reverse-engineering was done by Pali Rohár and implementing a BMOF parser
inside the kernel was originally also proposed by him (see https://lore.kernel.org/lkml/201706041809.21573@pali/T/).
As part of my bachelor thesis i finished the reverse-engineering and created yet another utility for parsing BMOF data.
This utility can be found at github (https://github.com/Wer-Wolf/tarkin) and i now intend to use it to finally implement
a BMOF parser inside the kernel.
There exists a growing list of WMI drivers using quirk tables for detecting the presence of specific WMI methods on a given
device. This approach is maintenance-intensive and not exactly user friendly (end users rarely send kernel patches). Because
of this we need this BMOF parser so that we can check which WMI methods are available.
My current idea for this BMOF parser looks like this:
- support for the MS-DOS Doublespace compression algorithm (only decompression) lands in lib/ds/
- WMI driver core moves into drivers/platform/x86/wmi/
- a new component called the WMI repository will hold all BMOF data known to the kernel (necessary to emulate the WMI infrastructure under Windows)
- parsing of BMOF data is only done by the WMI repository which exposes a in-kernel API under include/linux/wmi/repository.h
- BMOF data can be loaded into the WMI repository by the wmi-bmof driver (for firmware-provided BMOF data) or by WMI drivers themself (for WMI devices with firmware-provided BMOF data)
The remaining questions are:
- How to structure the library code inside /lib/ds/?
- Is there any way to check whether the Doublespace compression algorithm is still encumbered by patents?
- Can BMOF files used by WMI drivers be included inside linux-firmware even if they only hold configuration data?
I would be very happy if the relevant maintainers could comment on the above questions.
Thanks,
Armin Wolf
next reply other threads:[~2025-03-11 20:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 20:06 Armin Wolf [this message]
2025-03-11 20:13 ` In-kernel parser for the BMOF format used by WMI-ACPI Pali Rohár
2025-03-11 20:59 ` Armin Wolf
2025-03-11 21:02 ` Pali Rohár
2025-03-12 4:56 ` Kurt Borja
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=a18f2f93-c8ee-47af-9446-97e3714fc275@gmx.de \
--to=w_armin@gmx.de \
--cc=akpm@linux-foundation.org \
--cc=dakr@kernel.org \
--cc=kuurtb@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=mcgrof@kernel.org \
--cc=pali@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=russ.weight@linux.dev \
/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