feat(rmm-eac4): copy context_id to x0 of CPU_ON target
This patch implements the requirement that context_id from x3
of PSCI_CPU_ON caller CPU to copied to x0 of target CPU.
Signed-off-by: Soby Mathew <soby.mathew@arm.com>
Change-Id: I1eb28594fb754174b4f2c0a75e22a2596518c211
diff --git a/runtime/rsi/psci.c b/runtime/rsi/psci.c
index b9cbd91..4769e36 100644
--- a/runtime/rsi/psci.c
+++ b/runtime/rsi/psci.c
@@ -331,6 +331,7 @@
*/
static unsigned long complete_psci_cpu_on(struct rec *target_rec,
unsigned long entry_point_address,
+ unsigned long context_id,
unsigned long caller_sctlr_el1,
unsigned long status)
{
@@ -348,6 +349,7 @@
}
psci_reset_rec(target_rec, caller_sctlr_el1);
+ target_rec->regs[0] = context_id;
target_rec->pc = entry_point_address;
target_rec->runnable = true;
return PSCI_RETURN_SUCCESS;
@@ -392,6 +394,7 @@
rec_ret = complete_psci_cpu_on(target_rec,
calling_rec->regs[2],
+ calling_rec->regs[3],
calling_rec->sysregs.sctlr_el1,
status);
/*