[PATCH 4/4] ACPI: OSI: Update Documentation on custom _OSI strings

From: Mario Limonciello
Date: Tue Aug 23 2022 - 15:48:24 EST


Originally when there was some custom ASL needed for Linux the guidance
for Linux friendly OEMs was to introduced a new string in APCI tables
and discuss it on the kernel mailing lists. This lead to 3 strings
being introduced. Those strings now have the original problems fixed
in the kernel and have since been removed. The kernel no longer
advertises any custom Linux-* _OSI strings for OEM use.

It was discovered that these removed strings were actually being abused
to detect Linux for unrelated reasons. So drop the encouragement for
new ones to be added.

Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
---
Documentation/firmware-guide/acpi/osi.rst | 25 ++++++++++-------------
1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/Documentation/firmware-guide/acpi/osi.rst b/Documentation/firmware-guide/acpi/osi.rst
index 05869c0045d7..c9d508ba2ec7 100644
--- a/Documentation/firmware-guide/acpi/osi.rst
+++ b/Documentation/firmware-guide/acpi/osi.rst
@@ -41,26 +41,23 @@ But it is likely that they will all eventually be added.
What should an OEM do if they want to support Linux and Windows
using the same BIOS image? Often they need to do something different
for Linux to deal with how Linux is different from Windows.
-Here the BIOS should ask exactly what it wants to know:

+In this case, the OEM should create custom ASL to be executed by the
+Linux kernel and changes to Linux kernel drivers to execute this custom
+ASL. The easiest way to accomplish this is to introduce a device specific
+method (_DSM) that is called from the Linux kernel.
+
+In the past the kernel used to support something like:
_OSI("Linux-OEM-my_interface_name")
where 'OEM' is needed if this is an OEM-specific hook,
and 'my_interface_name' describes the hook, which could be a
quirk, a bug, or a bug-fix.

-In addition, the OEM should send a patch to upstream Linux
-via the linux-acpi@xxxxxxxxxxxxxxx mailing list. When that patch
-is checked into Linux, the OS will answer "YES" when the BIOS
-on the OEM's system uses _OSI to ask if the interface is supported
-by the OS. Linux distributors can back-port that patch for Linux
-pre-installs, and it will be included by all distributions that
-re-base to upstream. If the distribution can not update the kernel binary,
-they can also add an acpi_osi=Linux-OEM-my_interface_name
-cmdline parameter to the boot loader, as needed.
-
-If the string refers to a feature where the upstream kernel
-eventually grows support, a patch should be sent to remove
-the string when that support is added to the kernel.
+However this was discovered to be abused by other BIOS vendors to change
+completely unrelated code on completely unrelated systems. This prompted
+an evaluation of all of it's uses. This uncovered that they aren't needed
+for any of the original reasons. As such, the kernel will not respond to
+any custom Linux-* strings by default.

That was easy. Read on, to find out how to do it wrong.

--
2.34.1