From: Mark Pearson <markpearson@lenovo.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: <mgross@linux.intel.com>, <platform-driver-x86@vger.kernel.org>
Subject: Re: [External]Re: [PATCH v2] platform/x86: think-lmi: add debug_cmd
Date: Wed, 18 Aug 2021 10:01:33 -0400 [thread overview]
Message-ID: <735e8e9a-426b-6004-af43-69ff4fcab00c@lenovo.com> (raw)
In-Reply-To: <07f7c7d6-176a-9328-ffd2-2ca5cb8040c8@redhat.com>
Hi Hans
On 2021-08-18 3:44 a.m., Hans de Goede wrote:
> Hi,
>
> On 8/17/21 2:15 AM, Mark Pearson wrote:
>> Many Lenovo BIOS's support the ability to send a debug command which
>> is useful for debugging and testing unreleased or early features.
>>
>> Adding support for this feature as a module parameter.
>>
>> Signed-off-by: Mark Pearson <markpearson@lenovo.com>
>> ---
>> Changes in v2:
>> - Updated to use debug_support parameter to enable feature
>> - remove changes to pending_reboot as that was integrated separately
>>
>> .../testing/sysfs-class-firmware-attributes | 11 +++
>> drivers/platform/x86/think-lmi.c | 80 +++++++++++++++++++
>> drivers/platform/x86/think-lmi.h | 1 +
>> 3 files changed, 92 insertions(+)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-class-firmware-attributes b/Documentation/ABI/testing/sysfs-class-firmware-attributes
>> index 0b43997b76e3..90fdf935aa5e 100644
>> --- a/Documentation/ABI/testing/sysfs-class-firmware-attributes
>> +++ b/Documentation/ABI/testing/sysfs-class-firmware-attributes
>> @@ -272,3 +272,14 @@ Description:
>>
>> Note that any changes to this attribute requires a reboot
>> for changes to take effect.
>> +
>> +What: /sys/class/firmware-attributes/*/attributes/debug_cmd
>> +Date: July 2021
>> +KernelVersion: 5.14
>> +Contact: Mark Pearson <markpearson@lenovo.com>
>> +Description:
>> + This write only attribute can be used to send debug commands to the BIOS.
>> + This should only be used when recommended by the BIOS vendor. Vendors may
>> + use it to enable extra debug attributes or BIOS features for testing purposes.
>> +
>> + Note that any changes to this attribute requires a reboot for changes to take effect.
>> diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c
>> index 6cfed4427fb0..4d246bfe4907 100644
>> --- a/drivers/platform/x86/think-lmi.c
>> +++ b/drivers/platform/x86/think-lmi.c
>> @@ -20,6 +20,10 @@
>> #include "firmware_attributes_class.h"
>> #include "think-lmi.h"
>>
>> +static bool debug_support;
>> +module_param(debug_support, bool, 0644);
>
> 0644 implies the setting can be changed at runtime, but it is checked
> only at driver bind + unbind time, so this should be 0444.
Good catch - thanks!
>
> Since the rest of the patch looks good, I've fixed this up while merging
> the patch.
Awesome - thank you!
Mark
prev parent reply other threads:[~2021-08-18 14:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 0:15 [PATCH v2] platform/x86: think-lmi: add debug_cmd Mark Pearson
2021-08-18 7:44 ` Hans de Goede
2021-08-18 14:01 ` Mark Pearson [this message]
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=735e8e9a-426b-6004-af43-69ff4fcab00c@lenovo.com \
--to=markpearson@lenovo.com \
--cc=hdegoede@redhat.com \
--cc=mgross@linux.intel.com \
--cc=platform-driver-x86@vger.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;
as well as URLs for NNTP newsgroup(s).