[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Minios-devel] [UNIKRAFT PATCHv5 40/46] plat/common: Implement CPU reset for arm64


  • To: <minios-devel@xxxxxxxxxxxxxxxxxxxx>, <simon.kuenzer@xxxxxxxxx>
  • From: Wei Chen <wei.chen@xxxxxxx>
  • Date: Fri, 10 Aug 2018 07:08:30 +0000
  • Authentication-results: spf=fail (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=arm.com;
  • Cc: Kaly.Xin@xxxxxxx, nd@xxxxxxx, wei.chen@xxxxxxx
  • Delivery-date: Fri, 10 Aug 2018 07:10:26 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Nodisclaimer: True
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

From: Wei Chen <Wei.Chen@xxxxxxx>

Using PSCI despatch function to call PSCI_CPU_RESET
function to reset CPU.

Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx>
---
 plat/common/arm/cpu_native.c        | 7 +++++++
 plat/common/include/arm/arm64/cpu.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/plat/common/arm/cpu_native.c b/plat/common/arm/cpu_native.c
index 2d1a1aa..429b172 100644
--- a/plat/common/arm/cpu_native.c
+++ b/plat/common/arm/cpu_native.c
@@ -43,3 +43,10 @@ void halt(void)
 {
        __asm__ __volatile__("wfi");
 }
+
+/* Systems support PSCI >= 0.2 can do system reset from PSCI */
+void reset(void)
+{
+       UK_BUGON (!smcc_psci_call);
+       smcc_psci_call(PSCI_FNID_SYSTEM_RESET, 0, 0, 0);
+}
diff --git a/plat/common/include/arm/arm64/cpu.h 
b/plat/common/include/arm/arm64/cpu.h
index b231d32..c156fd3 100644
--- a/plat/common/include/arm/arm64/cpu.h
+++ b/plat/common/include/arm/arm64/cpu.h
@@ -102,3 +102,4 @@ int32_t smcc_psci_smc_call(uint32_t, uint64_t, uint64_t, 
uint64_t);
 
 /* CPU native APIs */
 void halt(void);
+void reset(void);
-- 
2.17.1


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.