summaryrefslogtreecommitdiff
path: root/lib/smbios.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-07-31 07:20:32 -0600
committerTom Rini <trini@konsulko.com>2024-07-31 07:20:32 -0600
commit4793b683b3ae4aaad9785c36e1d9cc71613a4253 (patch)
treefd6bf04ca23dc979e4ec580d569c95f77dd68b01 /lib/smbios.c
parent8877bc51a8a4d921ba2f163208b8b1a57ba47c18 (diff)
parent939afc80b6b5de23d70789f3cb3a391dd31319b1 (diff)
Merge tag 'efi-2024-10-rc2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2024-10-rc2 Documentation: * Add a description for bootmeth_android UEFI: * Provide and use function list_count_nodes() * Require EFI boot manager for EBBR compliance * Correct check in efi_load_option_dp_join() * Adjust config options for capsule updates SMBIOS: * Add extended Extended BIOS ROM Size
Diffstat (limited to 'lib/smbios.c')
-rw-r--r--lib/smbios.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/smbios.c b/lib/smbios.c
index 4126466e34a..7c24ea129eb 100644
--- a/lib/smbios.c
+++ b/lib/smbios.c
@@ -22,6 +22,7 @@
#include <cpu.h>
#include <dm/uclass-internal.h>
#endif
+#include <linux/sizes.h>
/* 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 || \
@@ -348,7 +349,13 @@ static int smbios_write_type0(ulong *current, int handle,
#endif
t->bios_release_date = smbios_add_prop(ctx, NULL, U_BOOT_DMI_DATE);
#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
t->bios_characteristics = BIOS_CHARACTERISTICS_PCI_SUPPORTED |
BIOS_CHARACTERISTICS_SELECTABLE_BOOT |