Skip to content
Permalink
Browse files
Introduce support for Systems Management Driver over WMI for Dell Sys…
…tems

The Dell WMI Systems Management Driver provides a sysfs
interface for systems management to enable BIOS configuration
capability on certain Dell Systems.

This driver allows user to configure Dell systems with a
uniform common interface. To facilitate this, the patch
introduces a generic way for driver to be able to create
configurable BIOS Attributes available in Setup (F2) screen.

Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: mark gross <mgross@linux.intel.com>

Co-developed-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Co-developed-by: Prasanth KSR <prasanth.ksr@dell.com>
Signed-off-by: Prasanth KSR <prasanth.ksr@dell.com>
Signed-off-by: Divya Bharathi <divya_bharathi@dell.com>
  • Loading branch information
Divya Bharathi authored and intel-lab-lkp committed Sep 17, 2020
1 parent bcf8768 commit 4809f4528720c1aa027b717b66960848bdae7b58
Show file tree
Hide file tree
Showing 12 changed files with 2,027 additions and 0 deletions.
@@ -0,0 +1,175 @@
What: /sys/devices/platform/dell-wmi-sysman/attributes/
Date: December 2020
KernelVersion: 5.10
Contact: Divya Bharathi <Divya.Bharathi@Dell.com>,
Mario Limonciello <mario.limonciello@dell.com>,
Prasanth KSR <prasanth.ksr@dell.com>
Description:
The Dell WMI Systems Management Driver provides a sysfs interface
for systems management software to enable BIOS configuration
capability on certain Dell systems. This directory exposes
interfaces for interacting with BIOS attributes.

Attributes can accept a set of pre-defined valid values (enumeration)
or a range of numerical values (integer) or a string.

current_value: A file that can be read to obtain the current
value of the <attr>

This file can also be written to in order to update
the value of a <attr>

default_value: A file that can be read to obtain the default
value of the <attr>

display_name: A file that can be read to obtain a user friendly
description of the at <attr>

display_name_language_code: A file that can be read to obtain
the IETF language tag corresponding to the "display_name" of the <attr>

modifier: A file that can be read to obtain attribute-level
dependency rule. It says an attribute X will become read-only or
suppressed, if/if-not attribute Y is configured.

modifier rules can be in following format,
[ReadOnlyIf:<attribute>=<value>]
[ReadOnlyIfNot:<attribute>=<value>]
[SuppressIf:<attribute>=<value>]
[SuppressIfNot:<attribute>=<value>]

For example,
AutoOnFri/modifier has value,
[SuppressIfNot:AutoOn=SelectDays]
This means AutoOnFri will be supressed in BIOS setup if AutoOn
attribute is not "SelectDays" and its value will not be effective
through sysfs until this rule is met.

"enumeration"-type specific properties:

possible_values: A file that can be read to obtain the possible
values of the <attr>. Values are separated using semi-colon.

value_modifier: A file that can be read to obtain value-level
dependency. This file is similar to modifier but here, an attribute's
current value will be forcefully changed based dependent attributes
value.

value_modifier rules can be in following format,
<value>[ForceIf:<attribute>=<value>]
<value>[ForceIfNot:<attribute>=<value>]

For example,
LegacyOrom/value_modifier has value,
Disabled[ForceIf:SecureBoot=Enabled]
This means LegacyOrom's current value will be forced to "Disabled"
in BIOS setup if SecureBoot is Enabled and its value will not be
effective through sysfs until this rule is met.

"integer"-type specific properties:

min_value: A file that can be read to obtain the lower
bound value of the <attr>

max_value: A file that can be read to obtain the upper
bound value of the <attr>

scalar_increment: A file that can be read to obtain the
resolution of the incremental value this attribute accepts.

"string"-type specific properties:

max_length: A file that can be read to obtain the maximum
length value of the <attr>

min_length: A file that can be read to obtain the minimum
length value of the <attr>

What: /sys/devices/platform/dell-wmi-sysman/passwords/
Date: December 2020
KernelVersion: 5.10
Contact: Divya Bharathi <Divya.Bharathi@Dell.com>,
Mario Limonciello <mario.limonciello@dell.com>,
Prasanth KSR <prasanth.ksr@dell.com>

A BIOS Admin password and System Password can be set, reset or
cleared using these attributes. An "Admin" password is used for
preventing modification to the BIOS settings. A "System" password is
required to boot a machine.

is_password_set: A file that can be read
to obtain flag to see if a password is set on <attr>

max_password_length: A file that can be read to obtain the
maximum length of the Password

min_password_length: A file that can be read to obtain the
minimum length of the Password

current_password: A write only value used for privileged access
such as setting attributes when a system or admin password is set
or resetting to a new password

new_password: A write only value that when used in tandem with
current_password will reset a system or admin password.

Note, password management is session specific. If Admin/System
password is set, same password must be writen into current_password
file (requied for pasword-validation) and must be cleared once the
session is over. For example,
echo "password" > current_password
echo "disabled" > TouchScreen/current_value
echo "" > current_password


What: /sys/devices/platform/dell-wmi-sysman/attributes/reset_bios
Date: December 2020
KernelVersion: 5.10
Contact: Divya Bharathi <Divya.Bharathi@Dell.com>,
Mario Limonciello <mario.limonciello@dell.com>,
Prasanth KSR <prasanth.ksr@dell.com>
Description:
This attribute can be used to reset the BIOS Configuration.
Specifically, it tells which type of reset BIOS configuration is being
requested on the host.

Reading from it returns a list of supported options encoded as:

'builtinsafe' (Built in safe configuration profile)
'lastknowngood' (Last known good saved configuration profile)
'factory' (Default factory settings configuration profile)
'custom' (Custom saved configuration profile)

The currently selected option is printed in square brackets as
shown below:

# echo "factory" > sys/devices/platform/dell-wmi-sysman/attributes/reset_bios

# cat sys/devices/platform/dell-wmi-sysman/attributes/reset_bios
# builtinsafe lastknowngood [factory] custom

Note that any changes to this attribute requires a reboot
for changes to take effect.

What: /sys/devices/platform/dell-wmi-sysman/attributes/pending_reboot
Date: December 2020
KernelVersion: 5.10
Contact: Divya Bharathi <Divya.Bharathi@Dell.com>,
Mario Limonciello <mario.limonciello@dell.com>,
Prasanth KSR <prasanth.ksr@dell.com>
Description:
A read-only attribute reads 1 if a reboot is necessary to apply
pending BIOS attribute changes.

0: All BIOS attributes setting are current
1: A reboot is necessary to get pending BIOS attribute changes
applied


Note, userspace applications need to follow below steps for efficient
BIOS management,
1. Check if admin password is set. If yes, follow session method for
password management as briefed under password section above.
2. Before setting any attribute, check if it has any modifiers
or value_modifiers. If yes, incorporate them and then modify
attribute.
@@ -4879,6 +4879,15 @@ M: Mario Limonciello <mario.limonciello@dell.com>
S: Maintained
F: drivers/platform/x86/dell-wmi-descriptor.c

DELL WMI SYSMAN DRIVER
M: Divya Bharathi <divya.bharathi@dell.com>
M: Mario Limonciello <mario.limonciello@dell.com>
M: Prasanth Ksr <prasanth.ksr@dell.com>
L: platform-driver-x86@vger.kernel.org
S: Maintained
F: drivers/platform/x86/dell-wmi-*-attributes.*
F: drivers/platform/x86/dell-wmi-*-interface.c

DELL WMI NOTIFICATIONS DRIVER
M: Matthew Garrett <mjg59@srcf.ucam.org>
M: Pali Rohár <pali@kernel.org>
@@ -430,6 +430,18 @@ config DELL_WMI
To compile this driver as a module, choose M here: the module will
be called dell-wmi.

config DELL_WMI_SYSMAN
tristate "Dell WMI Systems management WMI driver"
depends on ACPI_WMI
depends on DMI
select NLS
help
This driver allows changing BIOS settings on many Dell machines from
2018 and newer without the use of any additional software.

To compile this driver as a module, choose M here: the module will
be called dell-wmi-sysman.

config DELL_WMI_DESCRIPTOR
tristate
depends on ACPI_WMI
@@ -47,6 +47,14 @@ obj-$(CONFIG_DELL_WMI) += dell-wmi.o
obj-$(CONFIG_DELL_WMI_DESCRIPTOR) += dell-wmi-descriptor.o
obj-$(CONFIG_DELL_WMI_AIO) += dell-wmi-aio.o
obj-$(CONFIG_DELL_WMI_LED) += dell-wmi-led.o
obj-$(CONFIG_DELL_WMI_SYSMAN) += dell-wmi-sysman.o
dell-wmi-sysman-objs := dell-wmi-sysman-attributes.o \
dell-wmi-enum-attributes.o \
dell-wmi-int-attributes.o \
dell-wmi-string-attributes.o \
dell-wmi-passobj-attributes.o \
dell-wmi-passwordattr-interface.o \
dell-wmi-biosattr-interface.o

# Fujitsu
obj-$(CONFIG_AMILO_RFKILL) += amilo-rfkill.o

0 comments on commit 4809f45

Please sign in to comment.