feat(memory share): check memory region desc values

This patch introduces a helper function to check that the values
provided in the memory region descriptor are valid and safe.
Offset values are within safe bounds, receiver count will not
cause overflows and reserved fields are 0.

Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
Change-Id: If3e751cf80cd5a0ecbcc77245a91daac50465a5c
diff --git a/inc/hf/ffa_memory.h b/inc/hf/ffa_memory.h
index 8187e6f..7d7ccac 100644
--- a/inc/hf/ffa_memory.h
+++ b/inc/hf/ffa_memory.h
@@ -13,6 +13,11 @@
 
 #include "vmapi/hf/ffa.h"
 
+bool ffa_memory_region_sanity_check(struct ffa_memory_region *memory_region,
+				    uint32_t ffa_version,
+				    uint32_t fragment_length,
+				    bool send_transaction);
+
 struct ffa_value ffa_memory_send(struct vm_locked from_locked,
 				 struct ffa_memory_region *memory_region,
 				 uint32_t memory_share_length,