Compare commits

..

1 Commits

Author SHA1 Message Date
Simon Glass
4cf1704199 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.

Series-to: u-boot
Series-cc: trini

Series-changes: 2
- Drop unwanted debugging

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>
Tested-by: Niklas Sombert <niklas.sombert@uni-duesseldorf.de>
Series-version: 2
2025-05-23 17:53:16 +01:00
6 changed files with 6 additions and 25 deletions

View File

@@ -1055,7 +1055,7 @@ config ARCH_QEMU
imply DM_RNG imply DM_RNG
imply DM_RTC imply DM_RTC
imply RTC_PL031 imply RTC_PL031
imply OF_HAS_PRIOR_STAGE if !TARGET_QEMU_ARM_SBSA && !QEMU_MANUAL_DTB imply OF_HAS_PRIOR_STAGE if !TARGET_QEMU_ARM_SBSA
imply VIDEO imply VIDEO
imply VIDEO_BOCHS imply VIDEO_BOCHS
imply SYS_WHITE_ON_BLACK imply SYS_WHITE_ON_BLACK

View File

@@ -126,6 +126,8 @@ int write_tables(void)
use_high = true; use_high = true;
if (!gd->arch.table_start_high) if (!gd->arch.table_start_high)
gd->arch.table_start_high = rom_addr; 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); rom_table_end = table->write(rom_addr);
if (!rom_table_end) { if (!rom_table_end) {

View File

@@ -13,15 +13,3 @@ config MTDPARTS_NOR1
help help
This define the partition of nor1 used to build mtparts dynamically This define the partition of nor1 used to build mtparts dynamically
for the u-boot env stored on nor1. for the u-boot env stored on nor1.
config QEMU_MANUAL_DTB
bool "Manually provide a device tree to QEMU"
help
For some use cases, such as FIT validation where a public key must be
placed in U-Boot's device tree, we need to override the device tree
that QEMU would normally provide to us.
Note: this work-around is necessary since Linaro has blocked
addition of a feature to support additions to the QEMU devicetree:
Link: https://patchwork.kernel.org/project/qemu-devel/patch/20210926183410.256484-1-sjg@chromium.org/#24481799

View File

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

View File

@@ -46,8 +46,3 @@ You can then run qemu with the merged devicetree, e.g.::
Note that there seems to be a bug in some versions of qemu where the output of Note that there seems to be a bug in some versions of qemu where the output of
dumpdtb does not quite match what is provided to U-Boot. dumpdtb does not quite match what is provided to U-Boot.
See also the
`rejected QEMU patch <https://patchwork.kernel.org/project/qemu-devel/patch/20231117021840.117874-1-sjg@chromium.org>`_
and
`discussion <https://patchwork.kernel.org/project/qemu-devel/patch/20210926183410.256484-1-sjg@chromium.org>`_.

View File

@@ -205,13 +205,8 @@ config OF_HAS_PRIOR_STAGE
development purposes, but it is not recommended, and likely will not development purposes, but it is not recommended, and likely will not
even work, for production systems. even work, for production systems.
Note: This option can be disabled for QEMU usiing QEMU_MANUAL_DTB thus Note: This option must be set in Kconfig and cannot be enabled or
allowing QEMU to support FIT validation, where the devicetree must disabled in the board's defconfig file.
include a public key.
See also this for context:
https://patchwork.kernel.org/project/qemu-devel/patch/20210926183410.256484-1-sjg@chromium.org/#24481799
config OF_OMIT_DTB config OF_OMIT_DTB
bool "Omit the device tree output when building" bool "Omit the device tree output when building"