Commit Graph

14 Commits

Author SHA1 Message Date
Ian Lepore
79a8182b65 Change leading spaces to tabs, no functional change. 2017-09-02 19:22:16 +00:00
Ian Lepore
ac0a9a9064 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>
2017-09-02 19:20:11 +00:00
Andrew Turner
feabce61dc Start to remove the old pre-INTRNG code from the arm platforms. These have
all moved to use INTRNG.

Reviewed by:	manu, mmel
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D8469
2016-11-08 12:15:57 +00:00
Michal Meloun
7cc70732a3 ARM: SEV/WFE instructions are implemented starting from ARMv6K,
use it directly.

MFC after: 1 week
2016-10-06 13:18:18 +00:00
Emmanuel Vadot
10912ba837 RPI2: Add support for PLATFORM_SMP so we can later add it to GENERIC.
Reviewed by:	andrew
Differential Revision:	https://reviews.freebsd.org/D8063
2016-09-29 06:54:02 +00:00
Andrew Turner
59c3cb81c1 Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine
independent code that needs to know about INTRNG such as PCI drivers.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-04-15 16:05:41 +00:00
Svatopluk Kraus
120b6fc9b2 Implement bcm2836 interrupt controller for INTRNG and enable it
on RPI2 by default.

Differential Revision:	https://reviews.freebsd.org/D5822
2016-04-05 13:41:51 +00:00
Andrew Turner
7133fe0f33 Almost all copies of platform_mp_init_secondary just called
intr_pic_init_secondary. Replace them with a direct call. On BCM2836
and ARMADA XP we need to add this function, but it can be empty.

Reviewed by:	ian, imp
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D5460
2016-02-26 16:04:47 +00:00
Andrew Turner
3210b87554 Remove platform_mp_probe as it's almost identical on most ARM SoCs, and
slightly wrong on the others. We should just check if mp_ncpus is set to
more than one CPU as we may wish to run on a single core even when SMP is
available.

Reviewed by:	ian
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D5458
2016-02-26 15:54:34 +00:00
Andrew Turner
243b36c321 Remove platform_ipi_send, it's an unneeded as all implementations are
identical.

Sponsored by:	 ABT Systems Ltd
2016-02-25 20:48:23 +00:00
Michal Meloun
a89156f53f ARM: Use new ARMv6 naming conventions for cache and TLB functions
in all but ARMv4 specific files.
Expand ARMv6 compatibility stubs in cpu-v4.h. Use physical address
in L2 cache functions if ARM_L2_PIPT is defined.
2016-02-05 14:57:41 +00:00
Andrew Turner
17fb49c1e4 An IPI must be cleared before it is handled otherwise next IPI could be
missed. In other words, if a new request for an IPI is sent while the
previous request is being handled but the IPI is not cleared yet, the
clearing of the previous IPI request also clears the new one and the
handling is missed.

There are only three MP interrupt controllers in ARM now. Two of them are
fixed by this change, the third one is correct, probably only just by
accident. The fix is minimalistic as new interrupt framework is awaited.

It was debugged on RPi2 where missing IPI handling together with SCHED_ULE
led to situation in which tdq_ipipending was not cleared and so IPI_PREEMPT
was stopped to be sent. Various odditys were found related to slow system
response time like various events timed out, and slow console response.

Submitted by:	Svatopluk Kraus <onwahe@gmail.com>
Reviewed by:	loos, kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D3722
2015-10-01 12:09:05 +00:00
Luiz Otavio O Souza
98d1292d0a Fix the SMP initialization on RPi 2 (BCM2836).
Invalidate the CPU cache before start the others CPUs.

Submitted by:	Michal Meloun <meloun@miracle.cz>
2015-05-13 01:48:47 +00:00
Luiz Otavio O Souza
962940ce6c Add the SMP support for Raspberry Pi 2 (BCM2836).
Tested with the build of some ports and a buildworld.

Submitted by:	Daisuke Aoyama <aoyama@peach.ne.jp>
2015-05-07 22:11:44 +00:00