From ff192304b69944734a661227c2d00aab5b15cdaf Mon Sep 17 00:00:00 2001 From: Ilias Apalodimas Date: Wed, 9 Jun 2021 18:14:47 +0300 Subject: [PATCH] smbios: Fix BIOS Characteristics Extension Byte 2 We currently define the EFI support of an SMBIOS table as the third bit of "BIOS Characteristics Extension Byte 1". The latest DMTF spec defines it on "BIOS Characteristics Extension Byte 2". Signed-off-by: Ilias Apalodimas Remove superfluous assignment. Signed-off-by: Heinrich Schuchardt --- include/smbios.h | 2 +- lib/smbios.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/smbios.h b/include/smbios.h index ffeefb4737..fc49fc10b9 100644 --- a/include/smbios.h +++ b/include/smbios.h @@ -60,7 +60,7 @@ struct __packed smbios_entry { #define BIOS_CHARACTERISTICS_SELECTABLE_BOOT (1 << 16) #define BIOS_CHARACTERISTICS_EXT1_ACPI (1 << 0) -#define BIOS_CHARACTERISTICS_EXT1_UEFI (1 << 3) +#define BIOS_CHARACTERISTICS_EXT2_UEFI (1 << 3) #define BIOS_CHARACTERISTICS_EXT2_TARGET (1 << 2) struct __packed smbios_type0 { diff --git a/lib/smbios.c b/lib/smbios.c index 26df2bf123..b69f5e8c48 100644 --- a/lib/smbios.c +++ b/lib/smbios.c @@ -229,9 +229,9 @@ static int smbios_write_type0(ulong *current, int handle, t->bios_characteristics_ext1 = BIOS_CHARACTERISTICS_EXT1_ACPI; #endif #ifdef CONFIG_EFI_LOADER - t->bios_characteristics_ext1 |= BIOS_CHARACTERISTICS_EXT1_UEFI; + t->bios_characteristics_ext2 |= BIOS_CHARACTERISTICS_EXT2_UEFI; #endif - t->bios_characteristics_ext2 = BIOS_CHARACTERISTICS_EXT2_TARGET; + t->bios_characteristics_ext2 |= BIOS_CHARACTERISTICS_EXT2_TARGET; /* bios_major_release has only one byte, so drop century */ t->bios_major_release = U_BOOT_VERSION_NUM % 100; -- 2.34.1