Skip to content

Commit

Permalink
smbios: Fix BIOS Characteristics Extension Byte 2
Browse files Browse the repository at this point in the history
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 <[email protected]>

Remove superfluous assignment.
Signed-off-by: Heinrich Schuchardt <[email protected]>
  • Loading branch information
apalos authored and xypron committed Jun 28, 2021
1 parent a86ed41 commit ff19230
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/smbios.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions lib/smbios.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ff19230

Please sign in to comment.