Implement minimal PSCI 1.1.
Only the mandatory functions are supported. This required adding
PSCI_FEATURES which is used to discover which PSCI features are
available and PSCI_CPU_SUSPEND which can put CPUs into low power states.
The hypervisor acts as an adapter for lower version of PSCI running in
EL3.
When waking from a powered down suspend, the CPU needs to be reset to
the same state as when it is first turned on. Only the entry point and
context argument should be present.
Change-Id: I088f214258a1cdd429bee63f1846603057769217
diff --git a/src/vm.c b/src/vm.c
index a670753..15e7521 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -109,7 +109,8 @@
struct vcpu *vcpu = &vm->vcpus[index];
if (index < vm->vcpu_count) {
- arch_regs_set_pc_arg(&vcpu->regs, entry, arg);
- vcpu_on(vcpu);
+ vcpu_on(vcpu, entry, arg);
+ arch_regs_reset(&vcpu->regs, vm->id == HF_PRIMARY_VM_ID, vm->id,
+ vm->ptable.root, vcpu_index(vcpu));
}
}