feat(realm): update rsi_ipa_state_get() function

This patch updates rsi_ipa_state_get() function and its
related test calls as per RMM Specification 1.0-rel0-rc1.
It also updates RSI commands API related comments and
makes minor changes in test functions to improve code
readability.

Change-Id: I28f69967ab6ff5b38c2b9efd423b0e8b4ad61dae
Signed-off-by: AlexeiFedorov <Alexei.Fedorov@arm.com>
diff --git a/realm/realm_rsi.c b/realm/realm_rsi.c
index cd4342f..b2a49d4 100644
--- a/realm/realm_rsi.c
+++ b/realm/realm_rsi.c
@@ -22,7 +22,7 @@
 	if (res.ret0 == SMC_UNKNOWN) {
 		return SMC_UNKNOWN;
 	}
-	/* Return lower version. */
+	/* Return lower version */
 	return res.ret1;
 }
 
@@ -71,15 +71,19 @@
 	return res.ret0;
 }
 
-/* This function will return RIPAS of IPA */
-u_register_t rsi_ipa_state_get(u_register_t adr, rsi_ripas_type *ripas)
+/* This function will return RIPAS of IPA range */
+u_register_t rsi_ipa_state_get(u_register_t base,
+				u_register_t top,
+				u_register_t *out_top,
+				rsi_ripas_type *ripas)
 {
 	smc_ret_values res = {};
 
 	res = tftf_smc(&(smc_args)
-			{RSI_IPA_STATE_GET, adr});
+			{RSI_IPA_STATE_GET, base, top});
 	if (res.ret0 == RSI_SUCCESS) {
-		*ripas = res.ret1;
+		*out_top = res.ret1;
+		*ripas = res.ret2;
 	}
 	return res.ret0;
 }