smbios: Refactor smbios library
authorRaymond Mao <raymond.mao@linaro.org>
Fri, 6 Dec 2024 22:54:22 +0000 (14:54 -0800)
committerTom Rini <trini@konsulko.com>
Tue, 14 Jan 2025 20:29:29 +0000 (14:29 -0600)
commit5d38e0d963f704cbad3c0c57a274e191b9f3f44c
treedc661b17ef2021bfb68351110329dc29082aa682
parentce562b42ce096fabb7800887ec4d0a9e81d7d97b
smbios: Refactor smbios library

Current smbios library does not fully match to the specification.
It hardcodes values instead of exposing values from the device.
It does not reserve the space to support dynamic length for
contained object handles or elements and misses the handling of
a few of fields.

The refactoring of this patch includes:
1. Expose values from device via sysinfo interface.
2. Replace smbios_add_prop with smbios_add_prop_si to allow getting
   string values from sysinfo.
3. Add smbios_get_val_si to get values from sysinfo or device tree.
4. Use sysinfo_get_data to get data area.
5. Reserve the space of contained object handles and elements.
6. Miscellaneous fixes in smbios.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
include/smbios.h
lib/Kconfig
lib/smbios.c