feat(ff-a): Implement FFA_MEM_PERM_GET/SET

This patch implements the new ABI from the FF-A v1.1 Beta0 spec. These
ABIs are expected to be used by S-EL0 use cases such as StandaloneMM or
other S-EL0 applications such as trusted firmware services or any other
S-EL0 FF-A partition.

Signed-off-by: Raghu Krishnamurthy <raghu.ncstate@gmail.com>
Change-Id: I6a57420ce5821993671362280a66c5c4f190ffbc
diff --git a/inc/vmapi/hf/call.h b/inc/vmapi/hf/call.h
index 749e4ac..6b57c92 100644
--- a/inc/vmapi/hf/call.h
+++ b/inc/vmapi/hf/call.h
@@ -456,3 +456,19 @@
 		.func = FFA_NOTIFICATION_INFO_GET_64,
 	});
 }
+
+static inline struct ffa_value ffa_mem_perm_get(uint64_t base_va)
+{
+	return ffa_call((struct ffa_value){.func = FFA_MEM_PERM_GET_32,
+					   .arg1 = base_va});
+}
+
+static inline struct ffa_value ffa_mem_perm_set(uint64_t base_va,
+						uint32_t page_count,
+						uint32_t mem_perm)
+{
+	return ffa_call((struct ffa_value){.func = FFA_MEM_PERM_SET_32,
+					   .arg1 = base_va,
+					   .arg2 = page_count,
+					   .arg3 = mem_perm});
+}