diff options
author | Simon Glass <sjg@chromium.org> | 2020-11-05 16:32:09 +0300 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2020-11-06 05:18:20 +0300 |
commit | a3f5c8ea69a0047aa0db12517b3bf91ae7d3f682 (patch) | |
tree | 008ff6be17d80a4e0a9baf86ead4f7f7d95d552e /lib | |
parent | 44ffb6f0ecaf25bd233b511cbf2ddb7b6019a53d (diff) | |
download | u-boot-a3f5c8ea69a0047aa0db12517b3bf91ae7d3f682.tar.xz |
smbios: Add more properties
The current tables only support a subset of the available fields defined
by the SMBIOS spec. Add a few more.
We could use CONFIG_SYS_CPU or CONFIG_SYS_SOC as a default for family, but
the meaning of that value relates more to the whole system rather than
just the SoC.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/smbios.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/smbios.c b/lib/smbios.c index 3f9d2ec085..a52a9d5b30 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -173,12 +173,15 @@ static int smbios_write_type1(ulong *current, int handle, ofnode node) CONFIG_SMBIOS_MANUFACTURER); t->product_name = smbios_add_prop_default(t->eos, node, "product", CONFIG_SMBIOS_PRODUCT_NAME); + t->version = smbios_add_prop(t->eos, node, "version"); if (serial_str) { t->serial_number = smbios_add_string(t->eos, serial_str); strncpy((char *)t->uuid, serial_str, sizeof(t->uuid)); } else { t->serial_number = smbios_add_prop(t->eos, node, "serial"); } + t->sku_number = smbios_add_prop(t->eos, node, "sku"); + t->family = smbios_add_prop(t->eos, node, "family"); len = t->length + smbios_string_table_len(t->eos); *current += len; @@ -199,6 +202,7 @@ static int smbios_write_type2(ulong *current, int handle, ofnode node) CONFIG_SMBIOS_MANUFACTURER); t->product_name = smbios_add_prop_default(t->eos, node, "product", CONFIG_SMBIOS_PRODUCT_NAME); + t->asset_tag_number = smbios_add_prop(t->eos, node, "asset-tag"); t->feature_flags = SMBIOS_BOARD_FEATURE_HOSTING; t->board_type = SMBIOS_BOARD_MOTHERBOARD; |