Author: markj
Date: Wed Dec 19 17:45:16 2018
New Revision: 342221
URL: https://svnweb.freebsd.org/changeset/base/342221

Log:
  Implement cpu_halt() for RISC-V.
  
  Submitted by: Mitchell Horne <mhorne...@gmail.com>
  MFC after:    1 week
  Differential Revision:        https://reviews.freebsd.org/D18595

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

Modified: head/sys/riscv/riscv/machdep.c
==============================================================================
--- head/sys/riscv/riscv/machdep.c      Wed Dec 19 17:42:39 2018        
(r342220)
+++ head/sys/riscv/riscv/machdep.c      Wed Dec 19 17:45:16 2018        
(r342221)
@@ -426,7 +426,9 @@ void
 cpu_halt(void)
 {
 
-       panic("cpu_halt");
+       intr_disable();
+       for (;;)
+               __asm __volatile("wfi");
 }
 
 /*
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to