Add support for FFA_PARTITION_INFO_GET

Add support for FFA_PARTITION_INFO_GET, which returns
information on the partitions instantiated in the system.

Signed-off-by: Fuad Tabba <tabba@google.com>

Change-Id: I93070fe841b4b19c596645246203dbba14eddb12
diff --git a/src/vm.c b/src/vm.c
index af3ecc0..a021d77 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -90,6 +90,9 @@
 	return vm_count;
 }
 
+/**
+ * Returns a pointer to the VM with the corresponding id.
+ */
 struct vm *vm_find(ffa_vm_id_t id)
 {
 	uint16_t index;
@@ -108,6 +111,14 @@
 
 	index = id - HF_VM_ID_OFFSET;
 
+	return vm_find_index(index);
+}
+
+/**
+ * Returns a pointer to the VM at the specified index.
+ */
+struct vm *vm_find_index(uint16_t index)
+{
 	/* Ensure the VM is initialized. */
 	if (index >= vm_count) {
 		return NULL;