From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Russ Weight <russell.h.weight@intel.com>,
Luis Chamberlain <mcgrof@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Cc: Cezary Rojewski <cezary.rojewski@intel.com>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH v3] firmware_loader: Add debug message with checksum for FW file
Date: Fri, 10 Mar 2023 15:07:36 +0100 [thread overview]
Message-ID: <3cba545e-3abe-2234-7750-4a6b5f11ea55@linux.intel.com> (raw)
In-Reply-To: <542f9495-0216-a26e-3b53-5ccf419c8862@intel.com>
On 3/8/2023 2:17 AM, Russ Weight wrote:
>
>
> On 3/2/23 10:46, Amadeusz Sławiński wrote:
>> Enable dynamic-debug logging of firmware filenames and SHA256 checksums
>> to clearly identify the firmware files that are loaded by the system.
>>
>> Example output:
>> [ 34.944619] firmware_class:_request_firmware: i915 0000:00:02.0: Loaded FW: i915/kbl_dmc_ver1_04.bin, sha256: 2cde41c3e5ad181423bcc3e98ff9c49f743c88f18646af4d0b3c3a9664b831a1
>> [ 48.155884] firmware_class:_request_firmware: snd_soc_avs 0000:00:1f.3: Loaded FW: intel/avs/cnl/dsp_basefw.bin, sha256: 43f6ac1b066e9bd0423d914960fbbdccb391af27d2b1da1085eee3ea8df0f357
>> [ 49.579540] firmware_class:_request_firmware: snd_soc_avs 0000:00:1f.3: Loaded FW: intel/avs/rt274-tplg.bin, sha256: 4b3580da96dc3d2c443ba20c6728d8b665fceb3ed57223c3a57582bbad8e2413
>> [ 49.798196] firmware_class:_request_firmware: snd_soc_avs 0000:00:1f.3: Loaded FW: intel/avs/hda-8086280c-tplg.bin, sha256: 5653172579b2be1b51fd69f5cf46e2bac8d63f2a1327924311c13b2f1fe6e601
>> [ 49.859627] firmware_class:_request_firmware: snd_soc_avs 0000:00:1f.3: Loaded FW: intel/avs/dmic-tplg.bin, sha256: 00fb7fbdb74683333400d7e46925dae60db448b88638efcca0b30215db9df63f
>>
>> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
>> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
>> ---
>>
>> Changes in v3:
>> * add DYNAMIC_DEBUG and FW_LOADER as dependencies before option can be
>> enabled (kernel test robot)
>>
>> Changes in v2:
>> * allocate buffers (Greg)
>> * introduce CONFIG_ option to allow for CONFIG_CRYPTO and CONFIG_CRYPTO_SHA256
>> dependencies without introducing circular dependency (Greg)
>> * add new line between includes and function name (Cezary)
>>
>> ---
>> drivers/base/firmware_loader/Kconfig | 12 +++++++
>> drivers/base/firmware_loader/main.c | 48 +++++++++++++++++++++++++++-
>> 2 files changed, 59 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/base/firmware_loader/Kconfig b/drivers/base/firmware_loader/Kconfig
>> index 5166b323a0f8..a2f8f75e0718 100644
>> --- a/drivers/base/firmware_loader/Kconfig
>> +++ b/drivers/base/firmware_loader/Kconfig
>> @@ -3,6 +3,7 @@ menu "Firmware loader"
>>
>> config FW_LOADER
>> tristate "Firmware loading facility" if EXPERT
>> + select FW_LOADER_DEBUG if DYNAMIC_DEBUG
>> default y
>> help
>> This enables the firmware loading facility in the kernel. The kernel
>> @@ -24,6 +25,17 @@ config FW_LOADER
>> You also want to be sure to enable this built-in if you are going to
>> enable built-in firmware (CONFIG_EXTRA_FIRMWARE).
>>
>> +config FW_LOADER_DEBUG
>> + bool "Additional debug logs"
>
> This is the prompt that shows up when I do "make menuconfig". How about
> something more descriptive?
>
> "Log filenames and checksums for loaded firmware"
>
>> + depends on DYNAMIC_DEBUG
>> + depends on FW_LOADER
>> + depends on CRYPTO
>> + depends on CRYPTO_SHA256
>> + default FW_LOADER
>> + help
>> + Select this if additional information about loaded firmware file in
>> + form of sha256sum should be dumped.
>
> How about:
>
> "Select this option to log firmware filenames and SHA256 checksums to the
> kernel log for each firmware file that is loaded."
>
> Thanks,
> - Russ
>
Thanks! I've send v4, adjusted sentence a bit to mention that it
requires dynamic debug, so that user is not confused why no messages
shows even if option is enabled.
Amadeusz
prev parent reply other threads:[~2023-03-10 14:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-02 18:46 [PATCH v3] firmware_loader: Add debug message with checksum for FW file Amadeusz Sławiński
2023-03-08 1:17 ` Russ Weight
2023-03-10 14:07 ` Amadeusz Sławiński [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=3cba545e-3abe-2234-7750-4a6b5f11ea55@linux.intel.com \
--to=amadeuszx.slawinski@linux.intel.com \
--cc=cezary.rojewski@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=russell.h.weight@intel.com \
/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