From 53d5a221632eeef7483d250fdde09bde6cb54df9 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Fri, 10 Jan 2025 17:00:17 -0700 Subject: emulation: Use bloblist to hold tables QEMU can have its own internal ACPI and SMBIOS tables. At present U-Boot copies out the SMBIOS tables but points directly to the ACPI ones. The ACPI tables are not aligned on a 4KB boundary, which means that UPL cannot use them directly, since it uses a reserved-memory node for the tables and that it assumed (by EDK2) to be 4KB-aligned. On x86, QEMU provides the tables in a mapped memory region and U-Boot makes use of these directly, thus making it difficult to use any common code. Adjust the logic to fit within the existing table-generation code. Use a bloblist always and ensure that the ACPI tables is placed in an aligned region. Set a size of 8K for QEMU. This does not actually put all the tables in one place, for QEMU, since it currently adds a pointer to the tables in QFW. On ARM, enable bloblist so that SMBIOS tables can be added to the bloblist. Signed-off-by: Simon Glass --- arch/x86/lib/tables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/x86/lib/tables.c') diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c index 45a70e92763..5fc7dc75377 100644 --- a/arch/x86/lib/tables.c +++ b/arch/x86/lib/tables.c @@ -61,7 +61,7 @@ static struct table_info table_list[] = { #ifdef CONFIG_GENERATE_ACPI_TABLE { "acpi", write_acpi_tables, BLOBLISTT_ACPI_TABLES, 0x10000, 0x1000}, #endif -#if defined(CONFIG_GENERATE_SMBIOS_TABLE) && !defined(CONFIG_QFW_SMBIOS) +#ifdef CONFIG_GENERATE_SMBIOS_TABLE { "smbios", write_smbios_table, BLOBLISTT_SMBIOS_TABLES, 0x1000, 0x100}, #endif }; -- cgit v1.2.3