Refactor main entry
vm_get_first_boot returns the PVM in the normal world or the
first booted SP in the secure world. The intent is that primary,
secondary physical core cold boot and CPU off resume into the
pinned vCPU from the first VM. This assumes the PVM in normal
world is the first booted VM.
Change-Id: I3f3833e2e9f1c278df8f5d480a3b16799012dd32
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/src/cpu.c b/src/cpu.c
index 0a3fc6f..11eb0a3 100644
--- a/src/cpu.c
+++ b/src/cpu.c
@@ -139,7 +139,8 @@
sl_unlock(&c->lock);
if (!prev) {
- struct vm *vm = vm_find(HF_PRIMARY_VM_ID);
+ /* This returns the first booted VM (e.g. primary in the NWd) */
+ struct vm *vm = vm_get_first_boot();
struct vcpu *vcpu = vm_get_vcpu(vm, cpu_index(c));
struct vcpu_locked vcpu_locked;