RPI2: Add support for PLATFORM_SMP so we can later add it to GENERIC.
Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D8063
This commit is contained in:
parent
0c051204d7
commit
10912ba837
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=306437
@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <dev/fdt/fdt_common.h>
|
#include <dev/fdt/fdt_common.h>
|
||||||
|
|
||||||
#include <arm/broadcom/bcm2835/bcm2835_wdog.h>
|
#include <arm/broadcom/bcm2835/bcm2835_wdog.h>
|
||||||
|
#include <arm/broadcom/bcm2835/bcm2836_mp.h>
|
||||||
|
|
||||||
#include "platform_if.h"
|
#include "platform_if.h"
|
||||||
|
|
||||||
@ -139,6 +140,11 @@ static platform_method_t bcm2836_methods[] = {
|
|||||||
PLATFORMMETHOD(platform_late_init, bcm2835_late_init),
|
PLATFORMMETHOD(platform_late_init, bcm2835_late_init),
|
||||||
PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset),
|
PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset),
|
||||||
|
|
||||||
|
#ifdef SMP
|
||||||
|
PLATFORMMETHOD(platform_mp_start_ap, bcm2836_mp_start_ap),
|
||||||
|
PLATFORMMETHOD(platform_mp_setmaxid, bcm2836_mp_setmaxid),
|
||||||
|
#endif
|
||||||
|
|
||||||
PLATFORMMETHOD_END,
|
PLATFORMMETHOD_END,
|
||||||
};
|
};
|
||||||
FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 0);
|
FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 0);
|
||||||
|
@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <machine/bus.h>
|
#include <machine/bus.h>
|
||||||
#include <machine/fdt.h>
|
#include <machine/fdt.h>
|
||||||
#include <machine/intr.h>
|
#include <machine/intr.h>
|
||||||
|
#include <machine/platformvar.h>
|
||||||
|
|
||||||
|
#include <arm/broadcom/bcm2835/bcm2836_mp.h>
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
#define DPRINTF(fmt, ...) do { \
|
#define DPRINTF(fmt, ...) do { \
|
||||||
@ -77,7 +80,7 @@ static bus_space_handle_t bs_periph;
|
|||||||
bus_space_write_4(fdtbus_bs_tag, bs_periph, (addr), (val))
|
bus_space_write_4(fdtbus_bs_tag, bs_periph, (addr), (val))
|
||||||
|
|
||||||
void
|
void
|
||||||
platform_mp_setmaxid(void)
|
bcm2836_mp_setmaxid(platform_t plat)
|
||||||
{
|
{
|
||||||
|
|
||||||
DPRINTF("platform_mp_setmaxid\n");
|
DPRINTF("platform_mp_setmaxid\n");
|
||||||
@ -90,7 +93,7 @@ platform_mp_setmaxid(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
platform_mp_start_ap(void)
|
bcm2836_mp_start_ap(platform_t plat)
|
||||||
{
|
{
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
int i, retry;
|
int i, retry;
|
||||||
|
38
sys/arm/broadcom/bcm2835/bcm2836_mp.h
Normal file
38
sys/arm/broadcom/bcm2835/bcm2836_mp.h
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*-
|
||||||
|
* Copyright (C) 2016 Emmanuel Vadot <manu@freebsd.org>
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions
|
||||||
|
* are met:
|
||||||
|
* 1. Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* 2. Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||||
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||||
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||||
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||||
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||||
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
|
* SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
* $FreeBSD$
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _BCM2836_MP_H_
|
||||||
|
#define _BCM2836_MP_H_
|
||||||
|
|
||||||
|
void bcm2836_mp_setmaxid(platform_t plat);
|
||||||
|
void bcm2836_mp_start_ap(platform_t plat);
|
||||||
|
|
||||||
|
#endif /* _BCM2836_MP_H_ */
|
@ -29,6 +29,7 @@ options INTRNG
|
|||||||
options SCHED_ULE # ULE scheduler
|
options SCHED_ULE # ULE scheduler
|
||||||
options SMP # Enable multiple cores
|
options SMP # Enable multiple cores
|
||||||
options PLATFORM
|
options PLATFORM
|
||||||
|
options PLATFORM_SMP
|
||||||
|
|
||||||
# NFS root from boopt/dhcp
|
# NFS root from boopt/dhcp
|
||||||
#options BOOTP
|
#options BOOTP
|
||||||
|
Loading…
Reference in New Issue
Block a user