Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Sep 2017 19:20:11 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r323132 - head/sys/arm/broadcom/bcm2835
Message-ID:  <201709021920.v82JKBSL055850@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709021920.v82JKBSL055850>