diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2019-02-14 14:19:22 +0100 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2019-02-15 23:22:41 +0000 |
commit | 358cbb3a3061cc0cf3c16aebf042061b5c7908ca (patch) | |
tree | fe2fe2b965c3a82b29130447f37ee11bbddf66f1 /src/arch/x86/smbios.c | |
parent | 1db2346e3fbf9aa52df3593cdcfd3351ffd4419d (diff) |
SMBIOS: Update BIOS Information (Type 0) to version V3.2.0
Add Extended BIOS ROM Size field.
Change-Id: Iec35c8c66210f0ddc07a2ca6f976a1f8fc53037d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31416
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/arch/x86/smbios.c')
-rw-r--r-- | src/arch/x86/smbios.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index c0545ce779..f816647ee2 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -371,14 +371,17 @@ static int smbios_write_type0(unsigned long *current, int handle) #endif #endif /* CONFIG_CHROMEOS */ - /* 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. - */ uint32_t rom_size = CONFIG_ROM_SIZE; rom_size = MIN(CONFIG_ROM_SIZE, 16 * MiB); t->bios_rom_size = (rom_size / 65535) - 1; + if (CONFIG_ROM_SIZE >= 1 * GiB) { + t->extended_bios_rom_size = + DIV_ROUND_UP(CONFIG_ROM_SIZE, GiB) | (1 << 14); + } else { + t->extended_bios_rom_size = DIV_ROUND_UP(CONFIG_ROM_SIZE, MiB); + } + t->system_bios_major_release = 4; t->bios_characteristics = BIOS_CHARACTERISTICS_PCI_SUPPORTED | |