dmidecode-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [dmidecode] [Patch v3] firmware: dmi-sysfs: add SMBIOS entry point a


From: Jean Delvare
Subject: Re: [dmidecode] [Patch v3] firmware: dmi-sysfs: add SMBIOS entry point area raw attribute
Date: Thu, 5 Mar 2015 08:46:56 +0100

Hi Ivan,

On Wed, 04 Mar 2015 14:28:20 +0200, Ivan.khoronzhuk wrote:
> On 02/26/2015 11:41 AM, Jean Delvare wrote:
> > On Thu, 26 Feb 2015 09:50:42 +0100, Jean Delvare wrote:
> >> Please also note that the recently released version 3.0.0 of the SMBIOS
> >> specification introduces a new entry point format, and the firmware is
> >> allowed to implement both the old and the new format. It may be
> >> desirable to expose both to user-space under different names.
> >
> > Having read the kernel code meanwhile, I see we will call either
> > dmi_smbios3_present or dmi_present successfully, not both, so
> > presenting both entry points to user-space would be non-trivial. So I'm
> > fine with presenting only one entry point in sysfs for the time being.
> > We can always revisit later if it turns out that dmidecode really needs
> > both in some cases.
> 
> Why do you need two tables ? If kernel can parse the best one why
> it should present the old one? The old is subset of new, so the new must
> contain all required information, only format can be slightly different.
> If dmidecode has problems in reading new version then dmidecode should
> be modified, not kernel.

It's not just two tables (I don't expect a lot of BIOSes to provide two
tables in practice, and they would have essentially the same format
anyway) but more importantly two entry points. The _SM3_ entry point is
brand new and most applications (including dmidecode) don't support it
yet. It doesn't matter if the kernel itself can parse it, as it passes
the raw entry point to applications anyway.

It happens that we are introducing this new sysfs raw interface at the
same time _SM3_ is being introduced, so we do not have to care about
backwards compatibility. Both the kernel and dmidecode will need to be
updated to support the new interface, so we can keep things simple and
let the kernel expose only the best entry point.

If the sysfs raw interface was already present at the time _SM3_
support was being added, then we would have had to present both entry
points for backwards compatibility. And if some _SM4_ entry point is
ever added in the future with a new format, we will have to export it
as a new sysfs attribute so as to not break compatibility.

As a summary, I agree that a single entry point file is OK for now, but
only because we are lucky that the timing is right.

-- 
Jean Delvare
SUSE L3 Support



reply via email to

[Prev in Thread] Current Thread [Next in Thread]