FF-A: Booting SPs according to 'boot-order'

Secure Hafnium boots partitions according to boot-order in the manifest.
In this patch:
- Added manifest parsing of "boot-order", and populated VM structure
with it;
- Added the field "next_boot" to the VM structure, in order to create a
boot list that is sorted by the "boot-order";
- The root of the list points to the highest priority VM;
- Booting consists on traversing the list upon use of MSG_WAIT
interface from the highest priority VMs;
- After traversing the whole boot list, returns execution to SPMD;
- "manifest_Test.cc" updated to include "boot-order" field in
tests to the partition manifest;
- "vm_test.cc" updated to include unit test for the main logic of this
patch.

Change-Id: I43adf90447eed3bc24c8eb2ccb8eb979b471f3c3
Signed-off-by: J-Alves <Joao.Alves@arm.com>
diff --git a/inc/hf/manifest.h b/inc/hf/manifest.h
index 3e9eaf4..efa345b 100644
--- a/inc/hf/manifest.h
+++ b/inc/hf/manifest.h
@@ -29,6 +29,8 @@
 /** Mask for getting read/write/execute permission */
 #define MM_PERM_MASK 0x7
 
+#define DEFAULT_BOOT_ORDER 0x0
+
 enum run_time_el {
 	EL1 = 0,
 	S_EL0,
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index 01aaaca..0e4d23f 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -120,6 +120,13 @@
 
 	atomic_bool aborting;
 
+	/**
+	 * Booting parameters.
+	 */
+	bool initialized;
+	uint16_t boot_order;
+	struct vm *next_boot;
+
 	/** Arch-specific VM information. */
 	struct arch_vm arch;
 };
@@ -159,3 +166,6 @@
 bool vm_unmap(struct vm_locked vm_locked, paddr_t begin, paddr_t end,
 	      struct mpool *ppool);
 bool vm_unmap_hypervisor(struct vm_locked vm_locked, struct mpool *ppool);
+
+void vm_update_boot(struct vm *vm);
+struct vm *vm_get_first_boot(void);