mirror of
https://xff.cz/git/u-boot/
synced 2025-09-25 12:31:17 +02:00
smbios: add extended Extended BIOS ROM Size
U-Boot claims to create SMBIOS 3.7 tables. The type 0 table has a field Extended BIOS ROM Size since version 3.1. BIOS ROM sizes of 16 MiB or above must be written to this field. Add and fill the missing field. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
@@ -105,6 +105,7 @@ struct __packed smbios_type0 {
|
|||||||
u8 bios_minor_release;
|
u8 bios_minor_release;
|
||||||
u8 ec_major_release;
|
u8 ec_major_release;
|
||||||
u8 ec_minor_release;
|
u8 ec_minor_release;
|
||||||
|
u16 extended_bios_rom_size;
|
||||||
char eos[SMBIOS_STRUCT_EOS_BYTES];
|
char eos[SMBIOS_STRUCT_EOS_BYTES];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#include <cpu.h>
|
#include <cpu.h>
|
||||||
#include <dm/uclass-internal.h>
|
#include <dm/uclass-internal.h>
|
||||||
#endif
|
#endif
|
||||||
|
#include <linux/sizes.h>
|
||||||
|
|
||||||
/* Safeguard for checking that U_BOOT_VERSION_NUM macros are compatible with U_BOOT_DMI */
|
/* Safeguard for checking that U_BOOT_VERSION_NUM macros are compatible with U_BOOT_DMI */
|
||||||
#if U_BOOT_VERSION_NUM < 2000 || U_BOOT_VERSION_NUM > 2099 || \
|
#if U_BOOT_VERSION_NUM < 2000 || U_BOOT_VERSION_NUM > 2099 || \
|
||||||
@@ -348,7 +349,13 @@ static int smbios_write_type0(ulong *current, int handle,
|
|||||||
#endif
|
#endif
|
||||||
t->bios_release_date = smbios_add_prop(ctx, NULL, U_BOOT_DMI_DATE);
|
t->bios_release_date = smbios_add_prop(ctx, NULL, U_BOOT_DMI_DATE);
|
||||||
#ifdef CONFIG_ROM_SIZE
|
#ifdef CONFIG_ROM_SIZE
|
||||||
t->bios_rom_size = (CONFIG_ROM_SIZE / 65536) - 1;
|
if (CONFIG_ROM_SIZE < SZ_16M) {
|
||||||
|
t->bios_rom_size = (CONFIG_ROM_SIZE / 65536) - 1;
|
||||||
|
} else {
|
||||||
|
/* CONFIG_ROM_SIZE < 8 GiB */
|
||||||
|
t->bios_rom_size = 0xff;
|
||||||
|
t->extended_bios_rom_size = CONFIG_ROM_SIZE >> 20;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
t->bios_characteristics = BIOS_CHARACTERISTICS_PCI_SUPPORTED |
|
t->bios_characteristics = BIOS_CHARACTERISTICS_PCI_SUPPORTED |
|
||||||
BIOS_CHARACTERISTICS_SELECTABLE_BOOT |
|
BIOS_CHARACTERISTICS_SELECTABLE_BOOT |
|
||||||
|
Reference in New Issue
Block a user