[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a2cP2JpWO4PumaRENcOSj8pLwvJfTe6uP9QtRY8eGi_fA@mail.gmail.com>
Date: Tue, 21 Jul 2020 22:50:08 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Daniel Gutson <daniel@...ypsium.com>
Cc: Derek Kiernan <derek.kiernan@...inx.com>,
Tudor Ambarus <tudor.ambarus@...rochip.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Richard Hughes <hughsient@...il.com>,
Alex Bazhaniuk <alex@...ypsium.com>
Subject: Re: [PATCH] [PATCH] Firmware security information in SYSFS
On Mon, Jul 20, 2020 at 9:49 PM Daniel Gutson <daniel@...ypsium.com> wrote:
> On Fri, Jul 17, 2020 at 12:39 PM Arnd Bergmann <arnd@...db.de> wrote:
>>
>> My impression was that the state of the registers you read would
>> be the same if you read them multiple times, at least until you
>> reboot and the firmware has a chance to change them.
>
>
> That's not always the case, for example for the SMI count.
> Another example is WPD, a driver (such as the intel-spi for instance) can change its value if it is unlocked.
> But many others don't change so it might be a good idea to add another function to the API to register constant values.
Ok, if the value can change, then I suppose you can pass a pointer to the
'struct class_attribute' or 'struct file_operations' with the appropriate
'show' callbacks, this should be easier than creating another callback
abstraction.
For values that can not change, passing the value should be easier.
Arnd
Powered by blists - more mailing lists