HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31416
Change subject: SMBIOS: Update BIOS Information (Type 0) to version V3.2.0 ......................................................................
SMBIOS: Update BIOS Information (Type 0) to version V3.2.0
Add Extended BIOS ROM Size filed Also fix some coding style
Change-Id: Iec35c8c66210f0ddc07a2ca6f976a1f8fc53037d Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/arch/x86/smbios.c M src/include/smbios.h 2 files changed, 22 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/31416/1
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index c0545ce..7cba441 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -376,6 +376,16 @@ * once the SMBIOS specification addresses ROM sizes > 16 MiB. */ uint32_t rom_size = CONFIG_ROM_SIZE; + + if (rom_size - GiB >= 0) + t->extended_bios_rom_size = (rom_size / GiB) | (1 << 14); + else + t->extended_bios_rom_size = (rom_size / MiB); + + /* As a work around to prevent a compiler error, temporarily specify + * 16 MiB flash sizes when ROM size >= 16 MiB. An update is necessary + * once the SMBIOS specification addresses ROM sizes > 16 MiB. + */ rom_size = MIN(CONFIG_ROM_SIZE, 16 * MiB); t->bios_rom_size = (rom_size / 65535) - 1;
diff --git a/src/include/smbios.h b/src/include/smbios.h index 14badbc..23975c5 100644 --- a/src/include/smbios.h +++ b/src/include/smbios.h @@ -52,18 +52,18 @@ const char *smbios_mainboard_family(void); #endif
-#define BIOS_CHARACTERISTICS_PCI_SUPPORTED (1 << 7) -#define BIOS_CHARACTERISTICS_PC_CARD (1 << 8) -#define BIOS_CHARACTERISTICS_PNP (1 << 9) -#define BIOS_CHARACTERISTICS_APM (1 << 10) -#define BIOS_CHARACTERISTICS_UPGRADEABLE (1 << 11) -#define BIOS_CHARACTERISTICS_SHADOW (1 << 12) -#define BIOS_CHARACTERISTICS_BOOT_FROM_CD (1 << 15) -#define BIOS_CHARACTERISTICS_SELECTABLE_BOOT (1 << 16) -#define BIOS_CHARACTERISTICS_BIOS_SOCKETED (1 << 17) +#define BIOS_CHARACTERISTICS_PCI_SUPPORTED (1 << 7) +#define BIOS_CHARACTERISTICS_PC_CARD (1 << 8) +#define BIOS_CHARACTERISTICS_PNP (1 << 9) +#define BIOS_CHARACTERISTICS_APM (1 << 10) +#define BIOS_CHARACTERISTICS_UPGRADEABLE (1 << 11) +#define BIOS_CHARACTERISTICS_SHADOW (1 << 12) +#define BIOS_CHARACTERISTICS_BOOT_FROM_CD (1 << 15) +#define BIOS_CHARACTERISTICS_SELECTABLE_BOOT (1 << 16) +#define BIOS_CHARACTERISTICS_BIOS_SOCKETED (1 << 17)
-#define BIOS_EXT1_CHARACTERISTICS_ACPI (1 << 0) -#define BIOS_EXT2_CHARACTERISTICS_TARGET (1 << 2) +#define BIOS_EXT1_CHARACTERISTICS_ACPI (1 << 0) +#define BIOS_EXT2_CHARACTERISTICS_TARGET (1 << 2)
#define BIOS_MEMORY_ECC_SINGLE_BIT_CORRECTING (1 << 3) #define BIOS_MEMORY_ECC_DOUBLE_BIT_CORRECTING (1 << 4) @@ -235,6 +235,7 @@ u8 system_bios_minor_release; u8 ec_major_release; u8 ec_minor_release; + u16 extended_bios_rom_size; u8 eos[2]; } __packed;