[PATCH 7/7] smbios: correctly fill chassis handle
Ilias Apalodimas
ilias.apalodimas at linaro.org
Thu Feb 1 09:42:08 CET 2024
On Mon, 29 Jan 2024 at 23:05, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> 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 at canonical.com>
> ---
> lib/smbios.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/smbios.c b/lib/smbios.c
> index 50072adb4e8..5a6a980ff6f 100644
> --- a/lib/smbios.c
> +++ b/lib/smbios.c
> @@ -420,6 +420,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;
> @@ -548,6 +549,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, },
> --
> 2.43.0
>
Acked-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>
More information about the U-Boot
mailing list