[ARM] Don't use of /templates for guest templates

This patch removes the use of /templates device tree path for
keeping guest templates. Instead we now load guest device tree
directly from FDT file on file system.

If someone wants to disable filesystem then he/she will have to
use the old method of keeping reference guest device tree under
/templates device tree path.

Signed-off-by: Anup Patel <anup@brainfault.org>
[TESTS] Make Virt-v8 guest consistent with other hypervisors

There has been on-going effort in linaro to standardize the
VM/Guest HW for KVM and Xen. As part of these effort, the
QEMU mach-virt machine model will implement this standardized
VM/Guest HW for KVM. Linaro is also putting efforts to provide
UEFI firmware for standardized VM/Guest HW.

To get the benifits of this standardized VM/Guest HW we make
Virt-v8 machine mode compatible with QEMU mach-virt machine
model. In future, we would be also having Virt-v7 machine
model similar to Virt-v8 machine model for arm32ve.

Signed-off-by: Anup Patel <anup@brainfault.org>
[TESTS] Add missing README file for all arm64 guests

The toplevel README file for all arm64 guests was somehow missing.
This patch adds it.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] Rename one_guest_virt_v8.dts to one_guest_virt-v8.dts for consistency

Signed-off-by: Anup Patel <anup@brainfault.org>
[TESTS] Add fully paravirtualized virt-v7 guest for arm32ve

This patch adds basic firmware source and linux config files for virt-v7
guest.

The virt-v7 guest is excatly same as virt-v8 guest the only difference
it that former is arm32 guest whereas later is arm64 guest. Also, both
virt-v7 and virt-v8 are compatible to standardized mach-virt guest
which Linaro is pushing for KVM and Xen.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] generic: Add DTS files for preconfigure virt-v7 guest on arm32ve boards

This patch adds reference DTS files for creating preconfigured virt-v7 guest
on vexpress-a15 and cubieboard2 boards.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Split init work into two parts

This patch splits system_init_work() into two parts that is
1. Pre-init work (i.e. original system_init_work())
2. Post-init work (i.e. system_postinit_work())

We need a separate system_postinit_work() because current
device driver framework also IO frameworks to defer device
probing using system workqueue. If IO frameworks do use the
defer probing feature then we would end-up freeing init
memory before deferred probe is called called device drivers.
We might also not see the character/rtc device because its
device probing might have been deferred.

To solve the above issue, we have separate system_postinit_work()
which is scheduled as a last step in system_init_work() hence
it will be executed after deferred device probing work. This will
ensure that when we are in system_postinit_work(), all the
deferred device probing work is also finished.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_timer: Add vmm_timer_event_pending() API

This patch adds new API vmm_timer_event_pending() to check whether
given timer event is waiting to expire.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_delay: Add new APIs vmm_usleep, vmm_msleep, and vmm_ssleep

This patch add APIs to vmm_delay for finite duration sleep.

There will always be code desiring to sleep for sometime instead
of executing arch_delay_loop() hence this patch.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] vmm_main: Add API to check whether system init is complete

This patch add vmm_init_done() API to check whether system init
is complete or not.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DAEMONS] mterm: Sleep if system initialization not complete

It might happen that system workqueue sleeps for some event and
mterm starts executing even before system is initialized hence
this patch using vmm_init_done() and vmm_msleep() APIs to sleep
untill system is initialized. If we don't do this then mterm
prints will overlap the system initialization prints.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DAEMONS] telnetd: Initialize telnetd after netstack

The telnetd daemon uses socket programming hence we should ensure
that telnetd is initialized after netstack.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] Add common psci.h for sharing between smp_psci.c and emulate_psci.c

The PSCI host (i.e. smp_psci.c) and PSCI emulation (i.e. emulate_psci.c)
should use the same defines of PSCI for consistency hence this patch
introduce common psci.h for this purpose.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Ensure that /guests and /vmm nodes are present very early

There is lot of code dependent on presence of /guests and /vmm nodes.

This patch ensures that /guests and /vmm nodes are present immediately
after vmm_devtree_init().

Signed-off-by: Anup Patel <anup@brainfault.org>