public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Simon Glass <sjg@chromium.org>
Cc: "Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Caleb Connolly" <caleb.connolly@linaro.org>,
	"Raymond Mao" <raymond.mao@linaro.org>,
	u-boot@lists.denx.de,
	"Tuomas Tynkkynen" <tuomas.tynkkynen@iki.fi>,
	"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
	"Bin Meng" <bmeng@tinylab.org>,
	"Alper Nebi Yasak" <alpernebiyasak@gmail.com>,
	"Kever Yang" <kever.yang@rock-chips.com>,
	"Jonas Karlman" <jonas@kwiboo.se>, "Stefan Roese" <sr@denx.de>,
	"Marek Behún" <kabel@kernel.org>,
	"Wan Yee Lau" <wan.yee.lau@intel.com>,
	"Alexander Gendin" <agendin@matrox.com>,
	"Michal Simek" <michal.simek@amd.com>,
	"Masahisa Kojima" <kojima.masahisa@socionext.com>,
	"Max Krummenacher" <max.krummenacher@toradex.com>,
	"Francesco Dolcini" <francesco.dolcini@toradex.com>,
	"Sean Anderson" <seanga2@gmail.com>,
	"Oleksandr Suvorov" <oleksandr.suvorov@foundries.io>,
	"Peter Robinson" <pbrobinson@gmail.com>
Subject: Re: [PATCH 00/10] SMBIOS improvements
Date: Thu, 19 Sep 2024 11:48:03 -0600	[thread overview]
Message-ID: <20240919174803.GU4252@bill-the-cat> (raw)
In-Reply-To: <CAFLszTiVwOMHPPZV3iHyW4cdz7cr5vPZj=-6_VwCWXnix=Kg7Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4933 bytes --]

On Thu, Sep 19, 2024 at 04:13:02PM +0200, Simon Glass wrote:
> Hi,
> 
> On Sun, 15 Sept 2024 at 20:28, Tom Rini <trini@konsulko.com> wrote:
> >
> > On Sun, Sep 15, 2024 at 07:57:19PM +0200, Heinrich Schuchardt wrote:
> > > On 8/26/24 21:59, Tom Rini wrote:
> > > > On Mon, Aug 26, 2024 at 01:12:16PM -0600, Simon Glass wrote:
> > > > > Hi Tom,
> > > > >
> > > > > On Mon, 26 Aug 2024 at 12:23, Tom Rini <trini@konsulko.com> wrote:
> > > > > >
> > > > > > On Mon, Aug 26, 2024 at 11:58:54AM -0600, Simon Glass wrote:
> > > > > > > Hi Caleb,
> > > > > > >
> > > > > > > On Mon, 19 Aug 2024 at 17:03, Caleb Connolly <caleb.connolly@linaro.org> wrote:
> > > > > > > >
> > > > > > > > Hi Simon,
> > > > > > > >
> > > > > > > > > As a general comment, this is adding a load of code which is used by a
> > > > > > > > > lot of platforms. As more and more aarch64 platforms are created, this
> > > > > > > > > data grows. Why not use the devicetree for this hardware information?
> > > > > > > > > That is what it is for.
> > > > > > > >
> > > > > > > > This data does not belong in devicetree, the various system registers
> > > > > > > > exist to describe this information... Putting it in DT would be
> > > > > > > > duplicating it.
> > > > > > >
> > > > > > > I am not wanting to duplicate info which can be read from system registers.
> > > > > > >
> > > > > > > >
> > > > > > > > Using DT for this would additionally require having bindings accepted
> > > > > > > > upstream and for all SoCs to add them. To what end?
> > > > > > >
> > > > > > > To get the correct information in there. How are boards supposed to
> > > > > > > add SMBIOS info? Do we end up creating a whole infra in U-Boot just
> > > > > > > for the driver to read it out? It just doesn't make any sense to me...
> > > > > > >
> > > > > > > Let's put hardware info in the DT where it belongs.
> > > > > >
> > > > > > I'm a little confused here because of some older threads on this overall
> > > > > > topic. Part of the issue here is that in user space, "everyone" has
> > > > > > SMBIOS-based tooling today, and wants to have that work, rather than
> > > > > > inventing new tooling or modify existing tooling. And you were concerned
> > > > > > I thought that we had tied SMBIOS too much to EFI being present when
> > > > > > indeed it should be possible to pass the location along to the OS
> > > > > > without EFI, but at the time Linux at least only supported that notion
> > > > > > on MIPS I think?
> > > > >
> > > > > That is a whole other concern I have, that we are perpetuating this
> > > > > legacy format which is a real pain to work with, when we already have
> > > > > devicetree. Let's leave that issue aside as I have not detected any
> > > > > interest in solving that problem, or even any agreement that it is a
> > > > > problem.
> > > >
> > > > OK, yes, lets set that aside.
> > > >
> > > > > But for this particular series, I am just wanting to get the correct
> > > > > info in there. Having the CPU-detection code provide an opinion about
> > > > > what type of chassis is in use (just to take an example, the patch
> > > > > pieces I highlighted have been dropped from the email I am replying
> > > > > to) just seems a bit daft to me. Only the board vendor would know that
> > > > > info.
> > > >
> > > > Yes, I agree the detection should be reworked a good bit as some
> > > > information will be board design specific while others SoC specific. And
> > > > we should avoid adding many unused at run time strings to all platforms
> > > > that enable this too (looking at all the CPU vendor related stuff).
> > > >
> > >
> > > I doubt on productive machines there will be much use of U-Boot's smbios
> > > command use. It is more a developer tool.
> 
> Many commands fall into that category.

Yes, there is a trade-off to be made.

> > > For reading all the details we currently have
> > > lib/efi_loader/smbiosdump.efi which can dump the SMBIOS table to a file
> > > that dmidecode can read.
> > >
> > > Maybe instead of adding more and more decoding logic into the U-Boot
> > > smbios command we should add an smbios sub-command to dump to a file.
> > > This would be less of a hassle than running an EFI program for the same
> > > purpose.
> >
> > Sounds like a good idea to me.
> 
> I would like to see this series land in U-Boot as I believe it is very
> helpful for seeing what the table looks like. Dumping to a file which
> then needs to be decoded is not as convenient. We may also find it
> easier to add tests for SMBIOS.

And I don't look forward to the seemingly inevitable parsing bug means
CVE assigned. If the command is broadly enabled then "everyone" gets to
worry about it, and if it's narrowly enabled have we really gotten
better than the options of dump to file, parse elsewhere or load a
parser and run it?

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

  reply	other threads:[~2024-09-19 17:48 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-16 15:46 [PATCH 00/10] SMBIOS improvements Raymond Mao
2024-08-16 15:46 ` [PATCH 01/10] sysinfo: Add sysinfo API for accessing data area Raymond Mao
2024-08-16 15:46 ` [PATCH 02/10] sysinfo: Add sysinfo driver and data structure for SMBIOS Raymond Mao
2024-08-26  9:01   ` Michal Simek
2024-08-26  9:52   ` Michal Simek
2024-08-29 14:05   ` Simon Glass
2024-08-16 15:46 ` [PATCH 03/10] smbios: Refactor SMBIOS library Raymond Mao
2024-08-26  9:34   ` Michal Simek
2024-09-09 15:30   ` Heinrich Schuchardt
2024-08-16 15:46 ` [PATCH 04/10] smbios: ignore the non-existence of platform sysinfo detect Raymond Mao
2024-08-26  9:39   ` Michal Simek
2024-08-16 15:46 ` [PATCH 05/10] armv8: Add arch-specific sysinfo driver Raymond Mao
2024-08-19 11:09   ` Caleb Connolly
2024-08-26 15:32   ` Michal Simek
2024-08-16 15:46 ` [PATCH 06/10] sysinfo: Add sysinfo driver for SMBIOS type 7 Raymond Mao
2024-08-16 15:46 ` [PATCH 07/10] smbios: Add support to " Raymond Mao
2024-08-16 15:46 ` [PATCH 08/10] armv8: Add sysinfo driver for cache information Raymond Mao
2024-08-16 15:46 ` [PATCH 09/10] configs: Enable sysinfo for QEMU Arm64 Raymond Mao
2024-08-16 15:46 ` [PATCH 10/10] tests: update smbios pytest Raymond Mao
2024-08-19 22:19   ` Tom Rini
2024-10-21 15:23     ` Raymond Mao
2024-10-21 17:23       ` Tom Rini
2024-08-17 15:58 ` [PATCH 00/10] SMBIOS improvements Simon Glass
2024-08-19 23:03   ` Caleb Connolly
2024-08-26 17:58     ` Simon Glass
2024-08-26 18:23       ` Tom Rini
2024-08-26 18:50         ` Heinrich Schuchardt
2024-08-26 19:12         ` Simon Glass
2024-08-26 19:59           ` Tom Rini
2024-09-15 17:57             ` Heinrich Schuchardt
2024-09-15 18:28               ` Tom Rini
2024-09-19 14:13                 ` Simon Glass
2024-09-19 17:48                   ` Tom Rini [this message]
2024-10-07 14:47                     ` Raymond Mao
2024-09-03 16:06   ` Raymond Mao
2024-09-10 18:44     ` Simon Glass
2024-09-10 19:20       ` Raymond Mao
2024-09-10 20:15         ` Simon Glass
2024-08-19 11:56 ` Caleb Connolly
2024-09-09 13:37   ` Raymond Mao

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=20240919174803.GU4252@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=agendin@matrox.com \
    --cc=alpernebiyasak@gmail.com \
    --cc=bmeng@tinylab.org \
    --cc=caleb.connolly@linaro.org \
    --cc=francesco.dolcini@toradex.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jonas@kwiboo.se \
    --cc=kabel@kernel.org \
    --cc=kever.yang@rock-chips.com \
    --cc=kojima.masahisa@socionext.com \
    --cc=max.krummenacher@toradex.com \
    --cc=michal.simek@amd.com \
    --cc=oleksandr.suvorov@foundries.io \
    --cc=pbrobinson@gmail.com \
    --cc=raymond.mao@linaro.org \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=sr@denx.de \
    --cc=tuomas.tynkkynen@iki.fi \
    --cc=u-boot@lists.denx.de \
    --cc=wan.yee.lau@intel.com \
    --cc=xypron.glpk@gmx.de \
    /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