FF-A: secondary EC cold boot
When the SPMC boots, all Secure Partitions are initialized
on their primary Execution Context. A Secure Partition calls
FFA_SECONDARY_EP_REGISTER at virtual FF-A instance from
its first EC passing the entry point address for secondary
ECs. A secondary EC is first resumed either upon invocation
of PSCI_CPU_ON from the NWd to which a SP is registered
(currently the first SP) or by ffa_run invocation.
Change-Id: Ic6050af16d4081ca31729744995fbb999b170e11
Signed-off-by: Max Shvetsov <maksims.svecovs@arm.com>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/inc/hf/api.h b/inc/hf/api.h
index a28c1d0..e72d3cd 100644
--- a/inc/hf/api.h
+++ b/inc/hf/api.h
@@ -84,3 +84,5 @@
struct ffa_value args,
struct vcpu *current,
struct vcpu **next);
+struct ffa_value api_ffa_secondary_ep_register(ipaddr_t entry_point,
+ struct vcpu *current);
diff --git a/inc/hf/vcpu.h b/inc/hf/vcpu.h
index ea277c0..3668c8d 100644
--- a/inc/hf/vcpu.h
+++ b/inc/hf/vcpu.h
@@ -109,8 +109,8 @@
void vcpu_on(struct vcpu_locked vcpu, ipaddr_t entry, uintreg_t arg);
ffa_vcpu_index_t vcpu_index(const struct vcpu *vcpu);
bool vcpu_is_off(struct vcpu_locked vcpu);
-bool vcpu_secondary_reset_and_start(struct vcpu *vcpu, ipaddr_t entry,
- uintreg_t arg);
+bool vcpu_secondary_reset_and_start(struct vcpu_locked vcpu_locked,
+ ipaddr_t entry, uintreg_t arg);
bool vcpu_handle_page_fault(const struct vcpu *current,
struct vcpu_fault_info *f);
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index 75974cf..2c5ffc6 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -121,12 +121,18 @@
atomic_bool aborting;
/**
- * Booting parameters.
+ * Booting parameters (FF-A SP partitions).
*/
bool initialized;
uint16_t boot_order;
struct vm *next_boot;
+ /**
+ * Secondary entry point supplied by FFA_SECONDARY_EP_REGISTER used
+ * for cold and warm boot of SP execution contexts.
+ */
+ ipaddr_t secondary_ep;
+
/** Arch-specific VM information. */
struct arch_vm arch;
};