[PATCH v5] boot/bootfdt: Add smbios3-entrypoint to FDT for non-EFI boots
Simon Glass
sjg at chromium.org
Fri Nov 21 00:40:32 CET 2025
On Thu, 20 Nov 2025 at 01:51, Adriana Nicolae <adriana at arista.com> wrote:
>
> From: adriana <adriana at arista.com>
>
> The Linux kernel can discover SMBIOS tables through two primary methods:
> 1. Via EFI tables, when using EFI boot;
> 2. Via the 'smbios3-entrypoint' property in the /chosen node of the
> device tree.
>
> When U-Boot boots a Linux kernel using a non-EFI command ("bootm",
> "bootz", or "booti"), the kernel relies on the device tree to detect
> the hardware. If SMBIOS tables are available in U-Boot, they should
> be passed to the kernel via this device tree property.
>
> This patch modifies boot_fdt_prepare(), to inject the SMBIOSv3 table
> address into the device tree if there is a table generated by U-boot.
> The "board_fdt_chosen_smbios" is weak in order to leave the possibilty
> for specific boards to select custom SMBIOS addresses.
>
> The changes in this patch are added in the context of supporting this
> device tree property in linux kernel:
> https://lkml.org/lkml/2025/10/24/1393
>
> Device tree schema was updated to include the "smbios3-entrypoint" node
> in pull request: https://github.com/devicetree-org/dt-schema/pull/177
>
> Signed-off-by: Adriana Nicolae <adriana at arista.com>
> ---
> Changes in v5:
> - Allocate 4KiB extra space for fdt blob and align it to 8 bytes.
>
> Changes in v4:
> - Remove weak function board_fdt_chosen_smbios(), replace with
> gd_smbios_start();
> - Return -EAGAIN in test if GENERATE_SMBIOS_TABLE is not enabled;
> - Remove unnecessary fdt cleanup at the end of the test;
> - Added missing newlines at the end of the modified files.
>
> Changes in v3:
> - Moved "board_fdt_chosen_smbios" function to lib/smbios.c
> - Return physical address of smbios entry and use map_sysmem to
> access the entry point;
> - Removed check for config enabled and added check for
> GENERATE_SMBIOS_TABLE;
> - Add test to check that smbios entry address is added into fdt;
>
> Changes in v2:
> - Renamed device tree property to "smbios3-entrypoint".
> - Removed redundant check for CONFIG_SMBIOS.
> ---
> boot/fdt_support.c | 19 ++++++++++++++++++
> test/dm/fdtdec.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 67 insertions(+)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list