svn commit: r323132 - head/sys/arm/broadcom/bcm2835

Ian Lepore ian at FreeBSD.org
Sat Sep 2 19:20:12 UTC 2017


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 <sylgar at 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;


More information about the svn-src-head mailing list