fix(ff-a): boot info version matches partition version

According to FF-A spec beginning in version v1.1, when SPMC passes the
boot information blob to a partition, it should set the FF-A version in
the boot information header to the version specified by the partition in
its manifest.

See FF-A v1.3 ALP1 5.4.2 Boot information header for more information.

Signed-off-by: Kathleen Capella <kathleen.capella@arm.com>
Change-Id: I19a79be4bb7fa9e524e47ecff1e3d9e76b5a7031
diff --git a/src/boot_info.c b/src/boot_info.c
index 129d7be..7d9f013 100644
--- a/src/boot_info.c
+++ b/src/boot_info.c
@@ -20,13 +20,14 @@
  * Initializes the ffa_boot_info_header in accordance to the specification.
  */
 static void ffa_boot_info_header_init(struct ffa_boot_info_header *header,
-				      size_t blob_size)
+				      size_t blob_size,
+				      enum ffa_version vm_ffa_version)
 {
 	assert(header != NULL);
 	assert(blob_size != 0U);
 
 	header->signature = FFA_BOOT_INFO_SIG;
-	header->version = FFA_BOOT_INFO_VERSION;
+	header->version = vm_ffa_version;
 	header->info_blob_size = blob_size;
 	header->desc_size = sizeof(struct ffa_boot_info_desc);
 	header->desc_count = 0;
@@ -92,7 +93,8 @@
  * requested information into the boot info memory.
  */
 bool ffa_boot_info_node(struct fdt_node *boot_info_node,
-			struct partition_pkg *pkg)
+			struct partition_pkg *pkg,
+			enum ffa_version vm_ffa_version)
 {
 	struct memiter data;
 	struct ffa_boot_info_header *boot_info_header;
@@ -121,7 +123,8 @@
 	 * descriptors. The size of boot info contents to be incremented,
 	 * depending on the info specified in the partition's FF-A manifest.
 	 */
-	ffa_boot_info_header_init(boot_info_header, boot_info_size);
+	ffa_boot_info_header_init(boot_info_header, boot_info_size,
+				  vm_ffa_version);
 
 	if (!fdt_is_compatible(boot_info_node, "arm,ffa-manifest-boot-info")) {
 		dlog_verbose("The node 'boot-info' is not compatible.\n");
diff --git a/src/manifest.c b/src/manifest.c
index d20a0cf..d75db65 100644
--- a/src/manifest.c
+++ b/src/manifest.c
@@ -1552,7 +1552,8 @@
 				"space.\n",
 				vm->debug_name.data);
 		} else {
-			if (!ffa_boot_info_node(&boot_info_node, &pkg)) {
+			if (!ffa_boot_info_node(&boot_info_node, &pkg,
+						vm->partition.ffa_version)) {
 				dlog_error(
 					"Failed to process boot "
 					"information.\n");