[PATCH v2 11/13] smbios: Fill UUID from sysinfo when available

Simon Glass sjg at chromium.org
Sun Oct 27 15:56:26 CET 2024


Hi Jan,

On Wed, 23 Oct 2024 at 06:14, Jan Kiszka <jan.kiszka at siemens.com> wrote:
>
> On 23.10.24 05:39, Simon Glass wrote:
> > Hi Jan,
> >
> > On Tue, 22 Oct 2024 at 21:41, Jan Kiszka <jan.kiszka at siemens.com> wrote:
> >>
> >> On 22.10.24 19:00, Simon Glass wrote:
> >>> On Tue, 22 Oct 2024 at 08:06, Jan Kiszka <jan.kiszka at siemens.com> wrote:
> >>>>
> >>>> From: Jan Kiszka <jan.kiszka at siemens.com>
> >>>>
> >>>> Allow for the sysinfo drivers to provide a system UUID to SMBIOS. Will
> >>>> be first used by the IOT2050 boards.
> >>>>
> >>>> Based on original patch by Li Hua Qian.
> >>>>
> >>>> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
> >>>> ---
> >>>>  include/sysinfo.h | 1 +
> >>>>  lib/smbios.c      | 4 ++++
> >>>>  2 files changed, 5 insertions(+)
> >>>
> >>> Reviewed-by: Simon Glass <sjg at chromium.org>
> >>>
> >>> What is this used for? Would you mind adding a comment for it? Should
> >>> mention that it is a struct uuid
> >>>
> >>
> >> What exactly is unclear here? The System UUID is a part of the SMBIOS
> >> spec that U-Boot just ignored so far.
> >
> > OK, well that just mention that, along with the data type.
> >
>
> Now that I look at your data type comment again: It's actually not ok to
> misuse sysinfo_get_str for transporting this. The UUID is not converted
> into a string by the driver, it is rather returned raw and may even
> terminate prematurely if containing some zero. We need a new
> sysinfo_get_bin or raw op.

Yes, perhaps just sysinfo_get() to read binary info?

Regards,
Simon


More information about the U-Boot mailing list