fix(realm): fixup pdev_create arguments
Directly invoke host_rmi_pdev_create with invalid arguments instead of
referring to gbl_host_pdevs[0] as no valid devices exists in TRP
run config.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I424d77ff2cd3b265a1b1bdcb8e44aa6851c72d13
diff --git a/tftf/tests/runtime_services/host_realm_managment/host_rmi_da_flow.c b/tftf/tests/runtime_services/host_realm_managment/host_rmi_da_flow.c
index 5b41e55..fb6f801 100644
--- a/tftf/tests/runtime_services/host_realm_managment/host_rmi_da_flow.c
+++ b/tftf/tests/runtime_services/host_realm_managment/host_rmi_da_flow.c
@@ -343,7 +343,7 @@
*/
test_result_t host_realm_test_root_port_key_management(void)
{
- struct host_pdev *h_pdev;
+ u_register_t rmi_rc;
int ret;
if (host_rmi_version(RMI_ABI_VERSION_VAL) != 0U) {
@@ -351,8 +351,6 @@
return TEST_RESULT_SKIPPED;
}
- host_pdevs_init();
-
/* Initialize Host NS heap memory */
ret = page_pool_init((u_register_t)PAGE_POOL_BASE,
(u_register_t)PAGE_POOL_MAX_SIZE);
@@ -361,14 +359,12 @@
return TEST_RESULT_FAIL;
}
- h_pdev = &gbl_host_pdevs[0];
-
/*
- * Call rmi_pdev_create with invalid pdev, expect an error
+ * Directly call host_rmi_pdev_create with invalid pdev, expect an error
* to be returned from TRP.
*/
- ret = host_pdev_create(h_pdev);
- if (ret != 0) {
+ rmi_rc = host_rmi_pdev_create((u_register_t)0UL, (u_register_t)0UL);
+ if (rmi_rc != RMI_SUCCESS) {
return TEST_RESULT_SUCCESS;
}