aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/dm/acpi.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index 49b71be..da72869 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -53,10 +53,15 @@ struct testacpi_plat {
*
* @ctx: Context to set up
*/
-static int setup_ctx_and_base_tables(struct acpi_ctx *ctx, ulong start)
+static int setup_ctx_and_base_tables(struct unit_test_state *uts,
+ struct acpi_ctx *ctx, ulong start)
{
+ struct acpi_writer *entry = ACPI_WRITER_GET(0base);
+
acpi_setup_ctx(ctx, start);
- acpi_setup_base_tables(ctx);
+
+ ctx->tab_start = ctx->current;
+ ut_assertok(acpi_write_one(ctx, entry));
return 0;
}
@@ -264,7 +269,7 @@ static int dm_test_acpi_write_tables(struct unit_test_state *uts)
ut_assertnonnull(buf);
addr = map_to_sysmem(buf);
- setup_ctx_and_base_tables(&ctx, addr);
+ ut_assertok(setup_ctx_and_base_tables(uts, &ctx, addr));
dmar = ctx.current;
ut_assertok(acpi_write_dev_tables(&ctx));
@@ -339,7 +344,7 @@ static int dm_test_setup_ctx_and_base_tables(struct unit_test_state *uts)
buf = memalign(64, BUF_SIZE);
ut_assertnonnull(buf);
addr = map_to_sysmem(buf);
- setup_ctx_and_base_tables(&ctx, addr + 4);
+ ut_assertok(setup_ctx_and_base_tables(uts, &ctx, addr + 4));
ut_asserteq(map_to_sysmem(PTR_ALIGN(buf + 4, 16)), gd_acpi_start());
rsdp = buf + 16;
@@ -382,7 +387,7 @@ static int dm_test_acpi_cmd_list(struct unit_test_state *uts)
buf = memalign(16, BUF_SIZE);
ut_assertnonnull(buf);
addr = map_to_sysmem(buf);
- setup_ctx_and_base_tables(&ctx, addr);
+ ut_assertok(setup_ctx_and_base_tables(uts, &ctx, addr));
ut_assertok(acpi_write_dev_tables(&ctx));
@@ -424,7 +429,7 @@ static int dm_test_acpi_cmd_dump(struct unit_test_state *uts)
buf = memalign(16, BUF_SIZE);
ut_assertnonnull(buf);
addr = map_to_sysmem(buf);
- setup_ctx_and_base_tables(&ctx, addr);
+ ut_assertok(setup_ctx_and_base_tables(uts, &ctx, addr));
ut_assertok(acpi_write_dev_tables(&ctx));