feat(ff-a): report RXTX buffer size in FFA_FEATURES

FF-A v1.2 ALP1 requires that FFA_FEATURES with function id=FFA_RXTX_MAP
must report the minimum and maximum buffer sizes required for the RXTX
buffers. The patch does this when the ffa version is at least 1.2.

Change-Id: I7e765fdec4bcad3a09c4a04af57c690474a21a5a
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/src/api.c b/src/api.c
index 9cb7c6c..196c8e7 100644
--- a/src/api.c
+++ b/src/api.c
@@ -2454,7 +2454,6 @@
 	case FFA_VERSION_32:
 	case FFA_FEATURES_32:
 	case FFA_RX_RELEASE_32:
-	case FFA_RXTX_MAP_64:
 	case FFA_RXTX_UNMAP_32:
 	case FFA_PARTITION_INFO_GET_32:
 	case FFA_ID_GET_32:
@@ -2497,6 +2496,24 @@
 	case FFA_MSG_SEND_DIRECT_RESP2_64:
 #endif
 		return (struct ffa_value){.func = FFA_SUCCESS_32};
+	case FFA_RXTX_MAP_64: {
+		uint32_t arg2 = 0;
+		struct ffa_features_rxtx_map_params params = {
+			.min_buf_size = FFA_RXTX_MAP_MIN_BUF_4K,
+			.mbz = 0,
+			.max_buf_size =
+				(ffa_version >= MAKE_FFA_VERSION(1, 2))
+					? FFA_RXTX_MAP_MAX_BUF_PAGE_COUNT
+					: 0,
+		};
+
+		memcpy_s(&arg2, sizeof(arg2), &params, sizeof(params));
+		return (struct ffa_value){
+			.func = FFA_SUCCESS_32,
+			.arg2 = arg2,
+		};
+	}
+
 	case FFA_MEM_RETRIEVE_REQ_32:
 		if ((input_property & FFA_FEATURES_MEM_RETRIEVE_REQ_MBZ_MASK) !=
 		    0U) {