fix: remove memory region's device attribute

Memory and device region node may set attributes bit 4 to state a region
is a device region. This is bogus as despite not being mentioned in the
FF-A binding doc. [1], a memory region node may set device bit attribute
and result in defining a memory region as a device region.
Remove the device attribute from manifest parsing entirely as this comes
as a redundant information with respect to the way memory and device
region nodes are defined in the device tree format. This doesn't change
the parsing logic as memory and device regions are already segregated
into different data arrays.

[1] https://trustedfirmware-a.readthedocs.io/en/latest/components/ffa-manifest-binding.html#memory-regions

Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: If882a6b37bada1df33c2a06665071162ee138693
diff --git a/src/manifest.c b/src/manifest.c
index bb196e1..28aff31 100644
--- a/src/manifest.c
+++ b/src/manifest.c
@@ -508,12 +508,10 @@
  */
 static enum manifest_return_code check_partition_memory_is_valid(
 	uintptr_t base_address, uint32_t page_count, uint32_t attributes,
-	const struct boot_params *params)
+	const struct boot_params *params, bool is_device_region)
 {
 	bool is_secure_region =
 		(attributes & MANIFEST_REGION_ATTR_SECURITY) == 0U;
-	bool is_device_region =
-		(attributes & MANIFEST_REGION_ATTR_MEMORY_TYPE_DEVICE) != 0U;
 	const struct mem_range *ranges_from_manifest;
 	size_t ranges_count;
 	bool within_ranges;
@@ -717,7 +715,7 @@
 
 		TRY(check_partition_memory_is_valid(
 			mem_regions[i].base_address, mem_regions[i].page_count,
-			mem_regions[i].attributes, boot_params));
+			mem_regions[i].attributes, boot_params, false));
 
 		TRY(check_and_record_memory_used(
 			mem_regions[i].base_address, mem_regions[i].page_count,
@@ -857,10 +855,6 @@
 
 		TRY(read_uint32(dev_node, "attributes",
 				&dev_regions[i].attributes));
-		/* Set the memory type attribute to device. */
-		dev_regions[i].attributes =
-			dev_regions[i].attributes |
-			MANIFEST_REGION_ATTR_MEMORY_TYPE_DEVICE;
 
 		/*
 		 * Check RWX permission attributes.
@@ -886,7 +880,7 @@
 
 		TRY(check_partition_memory_is_valid(
 			dev_regions[i].base_address, dev_regions[i].page_count,
-			dev_regions[i].attributes, boot_params));
+			dev_regions[i].attributes, boot_params, true));
 
 		TRY(read_optional_uint32list(dev_node, "interrupts", &list));
 		dlog_verbose("      Interrupt List:\n");
@@ -1609,7 +1603,7 @@
 
 			TRY(check_partition_memory_is_valid(
 				manifest->vm[i].partition.load_addr, page_count,
-				0, boot_params));
+				0, boot_params, false));
 
 			/*
 			 * Check if memory from load-address until (load-address