From 61cc93396a54c1c3fcace092c83def70f3843c2a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 7 Jul 2020 13:11:42 -0600 Subject: acpi: Support generation of ACPI code Add a new file to handle generating ACPI code programatically. This is used when information must be dynamically added to the tables, e.g. the SSDT. Initial support is just for writing simple values. Also add a 'base' value so that the table can be freed. This likely doesn't happen in normal code, but is nice to do in tests. Signed-off-by: Simon Glass Reviewed-by: Wolfgang Wallner Reviewed-by: Bin Meng --- lib/acpi/acpi_table.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/acpi/acpi_table.c') diff --git a/lib/acpi/acpi_table.c b/lib/acpi/acpi_table.c index 431776666e2..acc55e7fad6 100644 --- a/lib/acpi/acpi_table.c +++ b/lib/acpi/acpi_table.c @@ -237,6 +237,7 @@ static void acpi_write_xsdt(struct acpi_xsdt *xsdt) void acpi_setup_base_tables(struct acpi_ctx *ctx, void *start) { + ctx->base = start; ctx->current = start; /* Align ACPI tables to 16 byte */ -- cgit v1.2.3