fix(ff-a): use messaging info from the manifest
Adds a messaging method to the VM structure. Refactor messaging info
field in the manifest to comply with information in specification. In
particular - distinguish between the direct message send/receive.
Use messaging method from the manifest to populate partition info for
FFA_PARTITION_INFO_GET ABI. Populates partition info based on the
caller id (SP can send direct messages to other SPs).
Refactors managed exit check to use messaging method value.
Signed-off-by: Maksims Svecovs <maksims.svecovs@arm.com>
Change-Id: Id0734c18d14879b89ba3517b8ff4b3b41b53b56f
diff --git a/src/manifest.c b/src/manifest.c
index f2e8bf5..8883659 100644
--- a/src/manifest.c
+++ b/src/manifest.c
@@ -667,9 +667,10 @@
ret_code = MANIFEST_ERROR_NOT_COMPATIBLE;
}
- if (vm->sp.messaging_method != INDIRECT_MESSAGING &&
- vm->sp.messaging_method != DIRECT_MESSAGING &&
- vm->sp.messaging_method != DIRECT_MESSAGING_MANAGED_EXIT) {
+ if ((vm->sp.messaging_method &
+ ~(FFA_PARTITION_DIRECT_REQ_RECV | FFA_PARTITION_DIRECT_REQ_SEND |
+ FFA_PARTITION_INDIRECT_MSG | FFA_PARTITION_MANAGED_EXIT)) !=
+ 0U) {
dlog_error("Messaging method %s: %x\n", error_string,
vm->sp.messaging_method);
ret_code = MANIFEST_ERROR_NOT_COMPATIBLE;