From 84dfe7f2519925917c05888c807eefe12ee719dd Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 8 Jul 2025 05:14:06 +0200 Subject: [PATCH] acpi Adjust dm_test_acpi_find_table() to use a fixed buffer 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. --- 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; }