feat(ff-a): report execution state in partition info get

FF-A Version 1.1 adds several additional flags to
the properties field of the partition information
descriptors. Add flag for execution state and test
that it is set when FF-A v1.1 is specified and zero
when FF-A v1.0 descriptors are being used.

Currently only 64-bit execution state is supported
for FF-A compliant partitions.

Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: Ic0e406bd491b5bae248704ba81ed5620e777e26b
diff --git a/src/api.c b/src/api.c
index 46eb892..eb09499 100644
--- a/src/api.c
+++ b/src/api.c
@@ -384,11 +384,14 @@
 		for (uint32_t i = 0; i < vm_count; i++) {
 			/*
 			 * Populate the VM's RX buffer with the partition
-			 * information.
+			 * information. Clear properties bits that must be zero
+			 * according to DEN0077A FF-A v1.0 REL Table 8.25.
 			 */
 			recv_mailbox[i].vm_id = partitions[i].vm_id;
 			recv_mailbox[i].vcpu_count = partitions[i].vcpu_count;
-			recv_mailbox[i].properties = partitions[i].properties;
+			recv_mailbox[i].properties =
+				partitions[i].properties &
+				~FFA_PARTITION_v1_0_RES_MASK;
 		}
 
 	} else {
@@ -443,7 +446,7 @@
 	}
 
 	/*
-	 * No need to count if we are returning the number of paritions as we
+	 * No need to count if we are returning the number of partitions as we
 	 * already know this.
 	 */
 	if (uuid_is_null && count_flag) {
@@ -474,6 +477,8 @@
 					vm_are_notifications_enabled(vm)
 						? FFA_PARTITION_NOTIFICATION
 						: 0;
+				partitions[array_index].properties |=
+					FFA_PARTITION_AARCH64_EXEC;
 				if (uuid_is_null) {
 					partitions[array_index].uuid = vm->uuid;
 				}