Signed-off-by: Ralf Ramsauer <[email protected]>
---
 inmates/lib/arm-common/include/psci.h | 1 +
 inmates/lib/arm-common/psci.c         | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/inmates/lib/arm-common/include/psci.h 
b/inmates/lib/arm-common/include/psci.h
index c850fbd8..3cce9614 100644
--- a/inmates/lib/arm-common/include/psci.h
+++ b/inmates/lib/arm-common/include/psci.h
@@ -67,3 +67,4 @@ static inline void *stack_top(struct stack_sp *stack_sp)
 unsigned int psci_version(void);
 int psci_cpu_on(unsigned int cpu_id, void (*c_entry)(unsigned int),
                struct stack *stack);
+void __attribute__((noreturn)) psci_cpu_off(void);
diff --git a/inmates/lib/arm-common/psci.c b/inmates/lib/arm-common/psci.c
index 25b4a102..2e630fad 100644
--- a/inmates/lib/arm-common/psci.c
+++ b/inmates/lib/arm-common/psci.c
@@ -70,3 +70,11 @@ int psci_cpu_on(unsigned int cpu_id, void 
(*c_entry)(unsigned int),
 
        return 0;
 }
+
+void __attribute__((noreturn)) psci_cpu_off(void)
+{
+       /* point of no return */
+       psci_call(PSCI_CPU_OFF, 0, 0, 0);
+       while (1)
+               asm volatile("wfi");
+}
-- 
2.14.1

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to