summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-04-26 18:19:51 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-04-30 12:16:12 +0300
commit7e586f69070db02171dca77f41adbcccd6394b33 (patch)
treee3215822437a057ffbd20f8eefb6790ac22adb84 /include
parent29b351122ed23124f70473a411c65074d5a61146 (diff)
downloadu-boot-7e586f69070db02171dca77f41adbcccd6394b33.tar.xz
acpi: Put table-setup code in its own function
We always write three basic tables to ACPI at the start. Move this into its own function, along with acpi_fill_header(), so we can write a test for this code. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_table.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/acpi/acpi_table.h b/include/acpi/acpi_table.h
index 55349c0bb6..3681c5c8ed 100644
--- a/include/acpi/acpi_table.h
+++ b/include/acpi/acpi_table.h
@@ -560,6 +560,16 @@ void acpi_inc_align(struct acpi_ctx *ctx, uint amount);
*/
int acpi_add_table(struct acpi_ctx *ctx, void *table);
+/**
+ * acpi_setup_base_tables() - Set up context along with RSDP, RSDT and XSDT
+ *
+ * Set up the context with the given start position. Some basic tables are
+ * always needed, so set them up as well.
+ *
+ * @ctx: Context to set up
+ */
+void acpi_setup_base_tables(struct acpi_ctx *ctx, void *start);
+
#endif /* !__ACPI__*/
#include <asm/acpi_table.h>