[PATCH 2/2 v2] smbios: Fallback to the default DT if sysinfo nodes are missing

Simon Glass sjg at chromium.org
Sat Dec 2 19:27:14 CET 2023


Hi Ilias,

On Wed, 29 Nov 2023 at 23:50, Ilias Apalodimas
<ilias.apalodimas at linaro.org> wrote:
>
> Hi Simon,
>
> [...]
>
>> > Changes since v1:
>> > - Tokenize the DT node entry and use the appropriate value instead of
>> >   the entire string
>> > - Removed Peters tested/reviewed-by tags due to the above
>> >  lib/smbios.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++---
>> >  1 file changed, 90 insertions(+), 4 deletions(-)
>> >
>>
>> Can this be put behind a Kconfig? It adds quite a bit of code which
>> punishes those boards which do the right thing.
>
>
> Sure but OTOH the code increase should be really minimal. But I don't mind I can add a Kconfig
>
>>
>> > +
>> > +       dt_str = ofnode_read_string(ofnode_root(), nprop->dt_str);
>>
>> Could this use ofnode_read_string_index() ?
>
>
> Maybe, I'll have a look and change it if that works
>
> [...]
>
>>
>> Any chance of a test for this code?
>
>
> Sure, but any suggestions on where to add the test?
> SMBIOS tables are populated on OS booting, do we have a test somewhere that boots an OS?

They are written on startup, right? They should certainly be in place
before U-Boot enters the command line.

> Any other ideas?

Probably a test in test/lib/ would work. We actually have
smbios-parser.c which might help?

Regards,
Simon


More information about the U-Boot mailing list