diff --git a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c index 0a92f0f6840a..da4835829e28 100644 --- a/sys/arm/broadcom/bcm2835/bcm2835_machdep.c +++ b/sys/arm/broadcom/bcm2835/bcm2835_machdep.c @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include "platform_if.h" @@ -139,6 +140,11 @@ static platform_method_t bcm2836_methods[] = { PLATFORMMETHOD(platform_late_init, bcm2835_late_init), 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, }; FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 0); diff --git a/sys/arm/broadcom/bcm2835/bcm2836_mp.c b/sys/arm/broadcom/bcm2835/bcm2836_mp.c index bbbc514a2893..1e5dab4c70c1 100644 --- a/sys/arm/broadcom/bcm2835/bcm2836_mp.c +++ b/sys/arm/broadcom/bcm2835/bcm2836_mp.c @@ -45,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include #ifdef DEBUG #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)) void -platform_mp_setmaxid(void) +bcm2836_mp_setmaxid(platform_t plat) { DPRINTF("platform_mp_setmaxid\n"); @@ -90,7 +93,7 @@ platform_mp_setmaxid(void) } void -platform_mp_start_ap(void) +bcm2836_mp_start_ap(platform_t plat) { uint32_t val; int i, retry; diff --git a/sys/arm/broadcom/bcm2835/bcm2836_mp.h b/sys/arm/broadcom/bcm2835/bcm2836_mp.h new file mode 100644 index 000000000000..5f6de17a42d9 --- /dev/null +++ b/sys/arm/broadcom/bcm2835/bcm2836_mp.h @@ -0,0 +1,38 @@ +/*- + * Copyright (C) 2016 Emmanuel Vadot + * 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_ */ diff --git a/sys/arm/conf/RPI2 b/sys/arm/conf/RPI2 index 1dc5f9262b7e..41aa90dc02e4 100644 --- a/sys/arm/conf/RPI2 +++ b/sys/arm/conf/RPI2 @@ -29,6 +29,7 @@ options INTRNG options SCHED_ULE # ULE scheduler options SMP # Enable multiple cores options PLATFORM +options PLATFORM_SMP # NFS root from boopt/dhcp #options BOOTP