Re: [PATCH v2] firmware loader: log path to loaded firmwares
From: Luis Chamberlain
Date: Wed Nov 13 2019 - 15:50:15 EST
On Wed, Nov 13, 2019 at 08:19:07PM +0000, Robin H. Johnson wrote:
> I have two uses cases overall:
> - log so you know exactly when it's loaded successfully (great if
> loading a firmware causes your system to lock up a few seconds later)
Then you can change the driver to confirm this, not impose every driver
to do the same.
> - at some point in the future, being able to query what firmware was
> loaded in the past, and esp. exactly what version/data was in that
> firmware file.
Firmware data is opaque to the firmware loader, as such details to
extract generic information about firmware details can only be done
by the driver, which could decode the firmware information. Many
drivers print these details themselves already, if they want it.
A generic interface to let us query *all* devices and currently loaded
firmware through the firmware loader would only be possible today for
firmware which requests (the default) caching of firmware upon
suspend/resume given that we keep the device / firmware name pair
around prior to suspend. For those devices it could be possible to
extend the firmware loader with a driver callback which can extract
firmware details in a generic codified way. To support *all* drivers
though, in a more clean way for this, a separate but similar list
could be kept which enables one to do this. Such items would be
torn down upon driver removal. But that would then be an opt-in
new mechanism.
Luis
Attachment:
signature.asc
Description: PGP signature