aboutsummaryrefslogtreecommitdiff
path: root/test/dm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-04-08 16:57:39 -0600
committerBin Meng <bmeng.cn@gmail.com>2020-04-16 14:36:28 +0800
commitbfeb5d460cd129e037c87e9d90b02808d68c0147 (patch)
tree879f1cdfc787a1eb66bb8f5a54b6dbdc0c5497b3 /test/dm
parent91fe8b79f6912ab7622169bc1673e2df222e0b57 (diff)
downloadu-boot-bfeb5d460cd129e037c87e9d90b02808d68c0147.zip
u-boot-bfeb5d460cd129e037c87e9d90b02808d68c0147.tar.gz
u-boot-bfeb5d460cd129e037c87e9d90b02808d68c0147.tar.bz2
acpi: Add support for DMAR
The DMA Remapping Reporting (DMAR) table contains information about DMA remapping. Add a version simple version of this table with only the minimum fields filled out. i.e. no entries. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Diffstat (limited to 'test/dm')
-rw-r--r--test/dm/acpi.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/dm/acpi.c b/test/dm/acpi.c
index 85c846b..e7b8abd 100644
--- a/test/dm/acpi.c
+++ b/test/dm/acpi.c
@@ -67,3 +67,19 @@ static int dm_test_acpi_get_table_revision(struct unit_test_state *uts)
}
DM_TEST(dm_test_acpi_get_table_revision,
DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+
+/* Temporary change to ensure bisectability */
+#ifndef CONFIG_SANDBOX
+/* Test acpi_create_dmar() */
+static int dm_test_acpi_create_dmar(struct unit_test_state *uts)
+{
+ struct acpi_dmar dmar;
+
+ ut_assertok(acpi_create_dmar(&dmar, DMAR_INTR_REMAP));
+ ut_asserteq(DMAR_INTR_REMAP, dmar.flags);
+ ut_asserteq(32 - 1, dmar.host_address_width);
+
+ return 0;
+}
+DM_TEST(dm_test_acpi_create_dmar, DM_TESTF_SCAN_PDATA | DM_TESTF_SCAN_FDT);
+#endif