summaryrefslogtreecommitdiff
path: root/cmd/smbios.c
AgeCommit message (Collapse)Author
2025-06-25cmd: smbios: Fix header for type 3 entriesMark Kettenis
Change from "Baseboard Information" to "Chassis information". Signed-off-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-01-14cmd: update smbios cmdRaymond Mao
Update the cmd according to the changes of the smbios library: 1. Refactor smbios cmd print functions to match the content defined by the specification. 2. Add new print functions for Type 3, 4 and 7. 3. Remove the fallback string "Not specified" from smbios_get_string, as the spec requires a NULL output for those undefined strings. 4. Update the test_cmd_smbios_sandbox pytest expected result to align with the smbios library changes and add new pytest test_cmd_smbios_sysinfo_verbose to test the verbose smbios output. Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
2025-01-14smbios: Refactor the smbios headfileRaymond Mao
Move the smbios field definitions to a separated simple headfile, which is a prerequisite to be included by dts files. Add new definitions for cache information. This patch also includes a few of code optimizations in smbios. Signed-off-by: Raymond Mao <raymond.mao@linaro.org> Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-03-27cmd: smbios: type 1 wake-up time, familyHeinrich Schuchardt
Correct type 1 output * render wake up time as string * print family string * remove duplicate serial number output Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02smbios: correctly name Structure Table Maximum Size fieldHeinrich Schuchardt
In the SMBIOS 3 entry point the Structure Table Maximum Size field was incorrectly named max_struct_size. A Maximum Structure Size field only exists in the SMBIOS 2.1 entry point and has a different meaning. Call the Structure Table Length field table_maximum_size. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02cmd: smbios: show correct table size for SMBIOS2.1 entry pointHeinrich Schuchardt
The SMBIOS table size for SMBIOS2.1 entry points is in field 'Structure Table Length' (offset 0x16) and not in field 'Maximum Structure Size' (offset 0x08). Rename the receiving variable max_struct_size to table_maximum_size to avoid future confusion. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02cmd: smbios: replace missing string by 'Not Specified'Heinrich Schuchardt
A missing string value is indicated by a string index of 0. In this case print 'Not Specified' like the Linux dmidecode command does. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-02-02cmd: smbios: add missing colon after UUIDHeinrich Schuchardt
For consistent formatting add a colon ':' after the UUID label. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-02-02cmd: smbios: always use '0x%04x' for printing handlesHeinrich Schuchardt
Handles are u16 numbers. Consistently use '0x%04x' to print them. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-01-26cmd: provide command to display SMBIOS informationHeinrich Schuchardt
U-Boot can either generated an SMBIOS table or copy it from a prior boot stage, e.g. QEMU. Provide a command to display the SMBIOS information. Currently only type 1 and 2 are translated to human readable text. Other types may be added later. Currently only a hexdump and the list of strings is provided for these. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>