acpi: Support generation of ACPI code
authorSimon Glass <sjg@chromium.org>
Tue, 7 Jul 2020 19:11:42 +0000 (13:11 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Fri, 17 Jul 2020 06:32:24 +0000 (14:32 +0800)
commit61cc93396a54c1c3fcace092c83def70f3843c2a
tree5fa1f48a46611e005f6c1e2869f86e99870a744a
parentf4955137f5f15e615376cf38559414a9b53e3d55
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 <sjg@chromium.org>
Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
include/acpi/acpigen.h [new file with mode: 0644]
include/dm/acpi.h
lib/acpi/Makefile
lib/acpi/acpi_table.c
lib/acpi/acpigen.c [new file with mode: 0644]
test/dm/Makefile
test/dm/acpigen.c [new file with mode: 0644]