We have two implementations of write_acpi_tables(). One for writing ACPI
tables based on ACPI_WRITER() entries another based on copying tables from
QEMU.
Create a symbol CONFIG_QFW_ACPI that signifies copying ACPI tables from
QEMU and use it consistently.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Hidden option to enable QEMU fw_cfg interface and uclass. This will
be selected by either CONFIG_CMD_QFW or CONFIG_GENERATE_ACPI_TABLE.
+config QFW_ACPI
+ bool
+ default y
+ depends on QFW && GENERATE_ACPI_TABLE && !SANDBOX
+ help
+ Hidden option to read ACPI tables from QEMU.
+
config QFW_PIO
bool
depends on QFW
#include <tables_csum.h>
#include <asm/acpi_table.h>
-#if defined(CONFIG_GENERATE_ACPI_TABLE) && !defined(CONFIG_SANDBOX)
+#ifdef QFW_ACPI
/*
* This function allocates memory for ACPI tables
*
file = qfw_find_file(dev, "etc/acpi/rsdp");
return file->addr;
}
-#endif
+#endif /* QFW_ACPI */
static void qfw_read_entry_io(struct qfw_dev *qdev, u16 entry, u32 size,
void *address)
obj-y += acpi_writer.o
# With QEMU the ACPI tables come from there, not from U-Boot
-ifndef CONFIG_QEMU
+ifndef CONFIG_QFW_ACPI
obj-y += base.o
obj-y += csrt.o
obj-y += mcfg.o
return 0;
}
-#ifndef CONFIG_QEMU
+#ifndef CONFIG_QFW_ACPI
static int acpi_write_all(struct acpi_ctx *ctx)
{
const struct acpi_writer *writer =
return map_to_sysmem(gd->acpi_ctx->rsdp);
}
-#endif /* QEMU */
+#endif /* QFW_ACPI */
void acpi_setup_ctx(struct acpi_ctx *ctx, ulong start)
{