summaryrefslogtreecommitdiff
path: root/arch/x86/lib/tables.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-03-15 14:25:55 +0000
committerTom Rini <trini@konsulko.com>2025-04-03 11:41:55 -0600
commit15ca25e31ed5deb8cc055a19b660b306a9243f58 (patch)
tree63257fa8457686e2b13e6bab7c39f90c3f299b45 /arch/x86/lib/tables.c
parentb03021f56ab0f47075c9a8dbf05e6749fd5ffd85 (diff)
x86: emulation: Support BLOBLIST_TABLES properly
The existing QEMU implementation mostly ignored BLOBLIST_TABLES and allocates the bulk of the tables with malloc(). Update it to place all tables in the bloblist. Since QEMU declares a size of 128KB regardless of the size of its tables, this requires a larger bloblist. Fix up the e820 table to handle this, keeping the old code as an option for now, to assist with any future bug-fixing. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86/lib/tables.c')
-rw-r--r--arch/x86/lib/tables.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/x86/lib/tables.c b/arch/x86/lib/tables.c
index 44fe80c5224..ec52992209f 100644
--- a/arch/x86/lib/tables.c
+++ b/arch/x86/lib/tables.c
@@ -45,6 +45,13 @@ struct table_info {
int align;
};
+/* QEMU's tables include quite a bit of empty space */
+#ifdef CONFIG_QEMU
+#define ACPI_SIZE (192 << 10)
+#else
+#define ACPI_SIZE SZ_64K
+#endif
+
static struct table_info table_list[] = {
#ifdef CONFIG_GENERATE_PIRQ_TABLE
{ "pirq", write_pirq_routing_table },
@@ -60,7 +67,7 @@ static struct table_info table_list[] = {
* that the calculation of gd->table_end works properly
*/
#ifdef CONFIG_GENERATE_ACPI_TABLE
- { "acpi", write_acpi_tables, BLOBLISTT_ACPI_TABLES, SZ_64K, SZ_4K},
+ { "acpi", write_acpi_tables, BLOBLISTT_ACPI_TABLES, ACPI_SIZE, SZ_4K},
#endif
#ifdef CONFIG_GENERATE_SMBIOS_TABLE
/*