Author: ian
Date: Sat Sep  2 19:20:11 2017
New Revision: 323132
URL: https://svnweb.freebsd.org/changeset/base/323132

Log:
  The latest RPi firmware leaves secondary cores in a wait-for-event (WFE)
  state to save power, so after writing the entry point address for a core to
  the mailbox, use a dsb() to synchronize the execution pipeline to the data
  written, then use an sev() to wake up the core.
  
  Submitted by: Sylvain Garrigues <syl...@gmail.com>

Modified:
  head/sys/arm/broadcom/bcm2835/bcm2836_mp.c

Modified: head/sys/arm/broadcom/bcm2835/bcm2836_mp.c
==============================================================================
--- head/sys/arm/broadcom/bcm2835/bcm2836_mp.c  Sat Sep  2 18:18:49 2017        
(r323131)
+++ head/sys/arm/broadcom/bcm2835/bcm2836_mp.c  Sat Sep  2 19:20:11 2017        
(r323132)
@@ -117,7 +117,9 @@ bcm2836_mp_start_ap(platform_t plat)
                /* set entry point to mailbox 3 */
                BSWR4(MBOX3SET_CORE(i),
                    (uint32_t)pmap_kextract((vm_offset_t)mpentry));
-               wmb();
+               /* Firmware put cores in WFE state, need SEV to wake up. */
+               dsb();
+        sev();
 
                /* wait for bootup */
                retry = 1000;
_______________________________________________
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