feat(api): add page count param/return to `FFA_MEM_PERM_GET`

The v1.3 specification adds a new "page count" argument and return value
to the `FFA_MEM_PERM_GET` ABI. Update `api_ffa_mem_perm_get` and
`ffa_mem_perm_get` accordingly.

Change-Id: I21a068bce2275caf5b9278ac891d686e76615560
Signed-off-by: Karl Meakin <karl.meakin@arm.com>
diff --git a/inc/vmapi/hf/call.h b/inc/vmapi/hf/call.h
index 421bcf1..7fd5f2c 100644
--- a/inc/vmapi/hf/call.h
+++ b/inc/vmapi/hf/call.h
@@ -668,10 +668,19 @@
 	});
 }
 
-static inline struct ffa_value ffa_mem_perm_get(uint64_t base_va)
+static inline struct ffa_value ffa_mem_perm_get(uint64_t base_va,
+						uint32_t page_count)
 {
-	return ffa_call((struct ffa_value){.func = FFA_MEM_PERM_GET_32,
-					   .arg1 = base_va});
+	return ffa_call((struct ffa_value){
+		.func = FFA_MEM_PERM_GET_32,
+		.arg1 = base_va,
+		/**
+		 * The handler for `FFA_MEM_PERM_GET` calculates the size of the
+		 * region as (page_count + 1) * granule size. So we must pass in
+		 * page_count - 1.
+		 */
+		.arg2 = page_count - 1,
+	});
 }
 
 static inline struct ffa_value ffa_mem_perm_set(uint64_t base_va,