
From: Simon Glass <sjg@chromium.org> Most sandbox tests use a fixed address in emulated RAM so that it is easier to debug test failures. Update dm_test_acpi_find_table() to work this way. Signed-off-by: Simon Glass <sjg@chromium.org> --- test/dm/acpi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/dm/acpi.c b/test/dm/acpi.c index addc2773220..d38a13e7f84 100644 --- a/test/dm/acpi.c +++ b/test/dm/acpi.c @@ -783,9 +783,8 @@ static int dm_test_acpi_find_table(struct unit_test_state *uts) acpi_start = gd_acpi_start(); /* Setup new ACPI tables */ - buf = memalign(16, BUF_SIZE); - ut_assertnonnull(buf); - addr = map_to_sysmem(buf); + addr = 0x1000; + buf = map_sysmem(addr, BUF_SIZE); ut_assertok(setup_ctx_and_base_tables(uts, &ctx, addr)); table3 = dm_test_write_test_table(&ctx, 3); table1 = dm_test_write_test_table(&ctx, 1); @@ -837,7 +836,6 @@ static int dm_test_acpi_find_table(struct unit_test_state *uts) /* Restore previous ACPI tables */ gd_set_acpi_start(acpi_start); unmap_sysmem(buf); - free(buf); return 0; } -- 2.43.0