Tegra194: support GET_SMMU_PER testing

This patch introduces a test to get return value from SMC SiP function
TEGRA_SIP_GET_SMMU_PER. This is a common function for all Tegra platforms.

This patch enables the test for Tegra194 platforms.

Signed-off-by: anzhou <anzhou@nvidia.com>
Change-Id: I14d82aecdbccc02ce3965b52230500bf487a0cc3
diff --git a/tftf/tests/plat/nvidia/common/test_sip.c b/tftf/tests/plat/nvidia/common/test_sip.c
index 0fb86fa..48d4186 100644
--- a/tftf/tests/plat/nvidia/common/test_sip.c
+++ b/tftf/tests/plat/nvidia/common/test_sip.c
@@ -6,6 +6,7 @@
 
 #include <arch_helpers.h>
 #include <debug.h>
+#include <smccc.h>
 #include <tftf_lib.h>
 #include <xlat_tables_v2.h>
 
@@ -15,6 +16,7 @@
  * Common Tegra SiP SMCs
  ******************************************************************************/
 #define TEGRA_SIP_NEW_VIDEOMEM_REGION		0x82000003ULL
+#define TEGRA_SIP_GET_SMMU_PER			0xC200FF00ULL
 
 /*
  * @Test_Aim@ Test to issue VideoMem SiP SMC function IDs.
@@ -194,3 +196,28 @@
 
 	return TEST_RESULT_SUCCESS;
 }
+
+/**
+ * @Test_Aim@ Test to read the SMMU_PER register contents and print the
+ * values.
+ */
+test_result_t test_get_smmu_per(void)
+{
+	smc_args tegra_sip_smc = { TEGRA_SIP_GET_SMMU_PER, 0ULL, 0ULL, 0ULL, 0ULL };
+	smc_ret_values ret;
+
+	tftf_testcase_printf("Tegra SIP GET SMMU PER test\n");
+
+	ret = tftf_smc(&tegra_sip_smc);
+
+	if (ret.ret0 != SMC_OK) {
+		tftf_testcase_printf("GET_SMMU_PER test Fail, got %ld\n", (long int)ret.ret0);
+		return TEST_RESULT_FAIL;
+	}
+
+	tftf_testcase_printf("GET_SMMU_PER per[0] = %lu\n", ret.ret1);
+	tftf_testcase_printf("GET_SMMU_PER per[1] = %lu\n", ret.ret2);
+	tftf_testcase_printf("GET_SMMU_PER per[2] = %lu\n", ret.ret3);
+
+	return TEST_RESULT_SUCCESS;
+}