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_test.cc b/src/manifest_test.cc
index 2ecd9d7..c281174 100644
--- a/src/manifest_test.cc
+++ b/src/manifest_test.cc
@@ -1795,7 +1795,7 @@
ASSERT_EQ(vm->partition.dev_regions[0].base_address, 0x24000000);
ASSERT_EQ(vm->partition.dev_regions[0].page_count, 16);
- ASSERT_EQ(vm->partition.dev_regions[0].attributes, (16 | 3));
+ ASSERT_EQ(vm->partition.dev_regions[0].attributes, 3);
ASSERT_EQ(vm->partition.dev_regions[0].dma_prop.smmu_id, 1);
ASSERT_EQ(vm->partition.dev_regions[0].dma_prop.stream_ids[0], 0);
ASSERT_EQ(vm->partition.dev_regions[0].dma_prop.stream_ids[1], 1);
@@ -1804,7 +1804,7 @@
ASSERT_EQ(vm->partition.dev_regions[0].interrupts[1].id, 4);
ASSERT_EQ(vm->partition.dev_regions[0].interrupts[1].attributes, 5);
ASSERT_EQ(vm->partition.dev_regions[1].base_address, 0x20000000);
- ASSERT_EQ(vm->partition.dev_regions[1].attributes, (16 | 8 | 1));
+ ASSERT_EQ(vm->partition.dev_regions[1].attributes, (8 | 1));
}
TEST_F(manifest, ffa_valid_interrupt_target_manifest)
@@ -1837,7 +1837,7 @@
ASSERT_EQ(vm->partition.dev_regions[0].base_address, 0x24000000);
ASSERT_EQ(vm->partition.dev_regions[0].page_count, 16);
- ASSERT_EQ(vm->partition.dev_regions[0].attributes, (16 | 3));
+ ASSERT_EQ(vm->partition.dev_regions[0].attributes, 3);
ASSERT_EQ(vm->partition.dev_regions[0].dma_prop.smmu_id, 1);
ASSERT_EQ(vm->partition.dev_regions[0].dma_prop.stream_ids[0], 0);
ASSERT_EQ(vm->partition.dev_regions[0].dma_prop.stream_ids[1], 1);