aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-01-29 18:32:58 +0100
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2024-02-02 19:57:16 +0100
commit5778c88eb094079502acad632febde7ff0d5b146 (patch)
treee6e66d6174976297e52a39855778fbe9a3b606c6
parent545e0e42b966751da48117820891356ccf47baf1 (diff)
downloadu-boot-5778c88eb094079502acad632febde7ff0d5b146.zip
u-boot-5778c88eb094079502acad632febde7ff0d5b146.tar.gz
u-boot-5778c88eb094079502acad632febde7ff0d5b146.tar.bz2
smbios: correctly fill chassis handle
The chassis handle field in the type 2 structure must point to the handle of the type 3 structure. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
-rw-r--r--lib/smbios.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/smbios.c b/lib/smbios.c
index 6190c16..cd750cc 100644
--- a/lib/smbios.c
+++ b/lib/smbios.c
@@ -422,6 +422,7 @@ static int smbios_write_type2(ulong *current, int handle,
t->asset_tag_number = smbios_add_prop(ctx, "asset-tag", NULL);
t->feature_flags = SMBIOS_BOARD_FEATURE_HOSTING;
t->board_type = SMBIOS_BOARD_MOTHERBOARD;
+ t->chassis_handle = handle + 1;
len = t->length + smbios_string_table_len(ctx);
*current += len;
@@ -550,6 +551,7 @@ static struct smbios_write_method smbios_write_funcs[] = {
{ smbios_write_type0, "bios", },
{ smbios_write_type1, "system", },
{ smbios_write_type2, "baseboard", },
+ /* Type 3 must immediately follow type 2 due to chassis handle. */
{ smbios_write_type3, "chassis", },
{ smbios_write_type4, },
{ smbios_write_type32, },