aboutsummaryrefslogtreecommitdiff
path: root/test/dm/acpi.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-12-01 09:03:05 -0700
committerSimon Glass <sjg@chromium.org>2022-01-25 11:44:36 -0700
commita9246416326398b5f0ce72af38bba1c43f1cb1e9 (patch)
tree27c373add3b46b706c7bf100e8245ae2d035beb6 /test/dm/acpi.c
parent2d7c7382969ff2a412acb409e76b2959dd715cc3 (diff)
downloadu-boot-a9246416326398b5f0ce72af38bba1c43f1cb1e9.zip
u-boot-a9246416326398b5f0ce72af38bba1c43f1cb1e9.tar.gz
u-boot-a9246416326398b5f0ce72af38bba1c43f1cb1e9.tar.bz2
acpi: Tidy up the item list
At present this is really just a debugging aid, but it is a bit untidy. Add proper columns and display the type name instead of a number. Sample output for coral: => acpi items Seq Type Addr Size Device/Writer --- ----- -------- ---- ------------- 0 other 79925000 240 0base 1 other 79925240 40 1facs 2 dsdt 799252a4 58 board 3 dsdt 799252fc 10 lpc 4 other 79925280 32f0 3dsdt 5 other 79928570 1000 4gnvs 6 other 79929570 100 5fact 7 other 79929670 30 5mcfg 8 other 799296a0 50 5spcr 9 other 799296f0 50 5tpm2 a other 79929740 70 5x86 b ssdt 799297d4 fe maxim-codec c ssdt 799298d2 28 i2c2@16,0 d ssdt 799298fa 270 da-codec e ssdt 79929b6a 28 i2c2@16,1 f ssdt 79929b92 28 i2c2@16,2 10 ssdt 79929bba 83 tpm@50 11 ssdt 79929c3d 28 i2c2@16,3 12 ssdt 79929c65 282 elan-touchscreen@10 13 ssdt 79929ee7 285 raydium-touchscreen@39 14 ssdt 7992a16c 28 i2c2@17,0 15 ssdt 7992a194 d8 elan-touchpad@15 16 ssdt 7992a26c 163 synaptics-touchpad@2c 17 ssdt 7992a3cf 28 i2c2@17,1 18 ssdt 7992a3f7 111 wacom-digitizer@9 19 ssdt 7992a508 8f sdmmc@1b,0 1a ssdt 7992a597 4b wifi 1b ssdt 7992a5e2 1a0 cpu@0 1c ssdt 7992a782 1a0 cpu@1 1d ssdt 7992a922 1a0 cpu@2 1e ssdt 7992aac2 211 cpu@3 1f other 799297b0 1530 6ssdt 20 other 7992ace0 2f10 8dev Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/dm/acpi.c')
-rw-r--r--test/dm/acpi.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index da72869..d648f30 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -566,18 +566,22 @@ DM_TEST(dm_test_acpi_inject_dsdt, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
static int dm_test_acpi_cmd_items(struct unit_test_state *uts)
{
struct acpi_ctx ctx;
+ ulong addr;
void *buf;
buf = malloc(BUF_SIZE);
ut_assertnonnull(buf);
+ addr = map_to_sysmem(buf);
acpi_reset_items();
ctx.current = buf;
ut_assertok(acpi_fill_ssdt(&ctx));
console_record_reset();
run_command("acpi items", 0);
- ut_assert_nextline("dev 'acpi-test', type 1, size 2");
- ut_assert_nextline("dev 'acpi-test2', type 1, size 2");
+ ut_assert_nextline("Seq Type Base Size Device/Writer");
+ ut_assert_nextline("--- ----- -------- ---- -------------");
+ ut_assert_nextline(" 0 ssdt %8lx 2 acpi-test", addr);
+ ut_assert_nextline(" 1 ssdt %8lx 2 acpi-test2", addr + 2);
ut_assert_console_end();
acpi_reset_items();
@@ -585,16 +589,20 @@ static int dm_test_acpi_cmd_items(struct unit_test_state *uts)
ut_assertok(acpi_inject_dsdt(&ctx));
console_record_reset();
run_command("acpi items", 0);
- ut_assert_nextline("dev 'acpi-test', type 2, size 2");
- ut_assert_nextline("dev 'acpi-test2', type 2, size 2");
+ ut_assert_nextlinen("Seq");
+ ut_assert_nextlinen("---");
+ ut_assert_nextline(" 0 dsdt %8lx 2 acpi-test", addr);
+ ut_assert_nextline(" 1 dsdt %8lx 2 acpi-test2", addr + 2);
ut_assert_console_end();
console_record_reset();
run_command("acpi items -d", 0);
- ut_assert_nextline("dev 'acpi-test', type 2, size 2");
+ ut_assert_nextlinen("Seq");
+ ut_assert_nextlinen("---");
+ ut_assert_nextline(" 0 dsdt %8lx 2 acpi-test", addr);
ut_assert_nextlines_are_dump(2);
ut_assert_nextline("%s", "");
- ut_assert_nextline("dev 'acpi-test2', type 2, size 2");
+ ut_assert_nextline(" 1 dsdt %8lx 2 acpi-test2", addr + 2);
ut_assert_nextlines_are_dump(2);
ut_assert_nextline("%s", "");
ut_assert_console_end();