Author: andrew
Date: Fri Jul 31 15:54:34 2015
New Revision: 286134
URL: https://svnweb.freebsd.org/changeset/base/286134

Log:
  Try to put the CPU into a low power state if we failed to otherwise halt
  the system.
  
  Obtained from:        ABT Systems Ltd
  Sponsored by: The FreeBSD Foundation

Modified:
  head/sys/arm64/arm64/machdep.c

Modified: head/sys/arm64/arm64/machdep.c
==============================================================================
--- head/sys/arm64/arm64/machdep.c      Fri Jul 31 15:32:32 2015        
(r286133)
+++ head/sys/arm64/arm64/machdep.c      Fri Jul 31 15:54:34 2015        
(r286134)
@@ -376,7 +376,11 @@ void
 cpu_halt(void)
 {
 
-       panic("ARM64TODO: cpu_halt");
+       /* We should have shutdown by now, if not enter a low power sleep */
+       intr_disable();
+       while (1) {
+               __asm __volatile("wfi");
+       }
 }
 
 /*
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to