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>
This commit is contained in:
Simon Glass
2020-04-26 09:19:51 -06:00
committed by Bin Meng
parent 29b351122e
commit 7e586f6907
4 changed files with 147 additions and 86 deletions

View File

@@ -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>