feat: report error if too many UUIDs in manifest

Previously, the FF-A manifest parser would silently ignore any UUIDs
after `PARTITION_MAX_UUIDS`. Return an error instead.

Change-Id: I2c277ca52b940c31e27d5bbc613901f60909bca1
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/src/manifest_test.cc b/src/manifest_test.cc
index 41350de..97148ad 100644
--- a/src/manifest_test.cc
+++ b/src/manifest_test.cc
@@ -1979,6 +1979,35 @@
 	ASSERT_EQ(vm->partition.messaging_method, FFA_PARTITION_INDIRECT_MSG);
 	ASSERT_EQ(vm->partition.ns_interrupts_action, NS_ACTION_ME);
 }
+
+TEST_F(manifest, ffa_too_many_uuids)
+{
+	struct_manifest *m;
+
+	/* clang-format off */
+	std::vector<char>  dtb = ManifestDtBuilder()
+		.Compatible({ "arm,ffa-manifest-1.0" })
+		.Property("ffa-version", "<0x10002>")
+		.Property("uuid",
+			 "<0xb4b5671e 0x4a904fe1 0xb81ffb13 0xdae1dacb>,"
+			  "<0xb4b5671e 0x4a904fe1 0xb81ffb13 0xdae1daaa>,"
+			  "<0xb4b5671e 0x4a904fe1 0xb81ffb13 0xdae1daaa>,"
+			  "<0xb4b5671e 0x4a904fe1 0xb81ffb13 0xdae1daaa>,"
+			  "<0xb4b5671e 0x4a904fe1 0xb81ffb13 0xdae1daaa>")
+		.Property("execution-ctx-count", "<1>")
+		.Property("exception-level", "<2>")
+		.Property("execution-state", "<0>")
+		.Property("entrypoint-offset", "<0x00002000>")
+		.Property("xlat-granule", "<0>")
+		.Property("boot-order", "<0>")
+		.Property("messaging-method", "<4>")
+		.Property("ns-interrupts-action", "<1>")
+		.Build();
+	/* clang-format on */
+	ASSERT_EQ(ffa_manifest_from_vec(&m, dtb),
+		  MANIFEST_ERROR_TOO_MANY_UUIDS);
+}
+
 TEST_F(manifest, ffa_uuid_all_zeros)
 {
 	struct_manifest *m;