Compare commits

..

1 Commits

Author SHA1 Message Date
Simon Glass
4130a8271a x86: efi_loader: Ensure the SMBIOS tables are sent via EFI
The EFI-loader code has not been fully converted to use bloblist, so
relies on the SMBIOS-table address being set in global_data.

Set this up in write_tables() so that the SMBIOS tables are actually
available.

Enable the command for x86 QEMU so that the SMBIOS tests actually run.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 83ce35d6eb ("emulation: Use bloblist to hold tables")
Reported-by: Niklas Sombert <niklas.sombert@uni-duesseldorf.de>
2025-04-06 08:42:56 +12:00
4 changed files with 7 additions and 8 deletions

View File

@@ -126,6 +126,8 @@ int write_tables(void)
use_high = true;
if (!gd->arch.table_start_high)
gd->arch.table_start_high = rom_addr;
if (table->tag == BLOBLISTT_SMBIOS_TABLES)
gd_set_smbios_start(rom_addr);
}
rom_table_end = table->write(rom_addr);
if (!rom_table_end) {

View File

@@ -23,5 +23,6 @@ config BOARD_SPECIFIC_OPTIONS # dummy
imply VIRTIO_PCI
imply VIRTIO_NET
imply VIRTIO_BLK
imply CMD_SMBIOS
endif

View File

@@ -190,7 +190,7 @@ config OF_BOARD
earlier stage should enable OF_HAS_PRIOR_STAGE.
config OF_HAS_PRIOR_STAGE
bool "Device tree comes from prior-stage firmware"
bool
help
Indicates that a prior stage of the firmware (before U-Boot proper)
makes use of device tree and this board normally boots with that prior
@@ -205,13 +205,8 @@ config OF_HAS_PRIOR_STAGE
development purposes, but it is not recommended, and likely will not
even work, for production systems.
Note: This option can be updated in the board's defconfig file if
needed. E.g. for QEMU to support FIT validation the devicetree must
include a public key.
See also this for context:
https://patchwork.kernel.org/project/qemu-devel/patch/20210926183410.256484-1-sjg@chromium.org/#24481799
Note: This option must be set in Kconfig and cannot be enabled or
disabled in the board's defconfig file.
config OF_OMIT_DTB
bool "Omit the device tree output when building"

View File

@@ -35,6 +35,7 @@ efi_status_t efi_smbios_register(void)
void *buf;
addr = gd_smbios_start();
printf("register %lx\n", addr);
if (!addr) {
log_err("No SMBIOS tables to install\n");
return EFI_NOT_FOUND;