[PATCH 00/10] Raspberry Pi 2 (BCM2836) SMP support
Alan Cudmore
alan.cudmore at gmail.com
Sun Sep 4 14:38:36 UTC 2016
Hi Pavel,
I applied your patches, and verified that my apps still work on the Raspberry Pi 1 ( Pi Zero ). Now I am moving to the Pi 2 for some tests.
When building for the Pi 2, I need to use the —enable-smp configure switch, correct?
When I build the raspberrypi2 BSP with —enable-smp and —enable-tests, the smpfatal08 test does not compile. It has multiple definition errors like the following:
../../../../../raspberrypi2/lib/librtemsbsp.a(libbsp_a-bspsmp.o): In function `_CPU_SMP_Get_current_processor':
/Users/alan/rtems/build/build-pavel-tmp/arm-rtems4.12/c/raspberrypi2/lib/libbsp/arm/raspberrypi/../../../../../.././raspberrypi2/lib/include/rtems/score/cpu.h:522: multiple definition of `_CPU_SMP_Start_processor'
init.o:/Users/alan/rtems/build/build-pavel-tmp/arm-rtems4.12/c/raspberrypi2/testsuites/smptests/smpfatal08/../../../../../../../../rtems-src/rtems-pavel/c/src/../../testsuites/smptests/smpfatal08/init.c:60: first defined here
But I tried several of the SMP tests that did compile before this one and they are working on my Raspberry Pi 2!
When I build with just the samples, rather than the full test suite, the build completes, and I can link and run my application just like the Pi.
This is great, thanks for advancing the Raspberry pi BSPs!
Alan
> On Sep 3, 2016, at 8:31 AM, pisa at cmp.felk.cvut.cz wrote:
>
> From: Pavel Pisa <pisa at cmp.felk.cvut.cz>
>
> The series implements Raspberry Pi 2 (BCM2836) SMP support.
>
> The first two patches modify ARM Cortex-A common CP15 support
> to expose clean by level cache operations to the BSP code.
> Clean and invalidation of L1 cache is required when the secondary
> CPU is booted. But the secondary CPU must not trash content
> of shared cache levels because primary CPU is already running
> from it.
>
> Next patches provides basic SMP implementation.
> BCM2836 core mailboxes are used to implement inter-processor
> interrupts.
>
> The last two patches change reimplement clock driver to
> use GPU/system timer instead of ARM timer because original
> approach has been incompatible with SMP support.
> SMP support requires timecounter source and it implemented
> easier from GPU/system timer which is based on free-running
> counter.
>
> Pavel Pisa (9):
> bsps/arm: use defines for cache type register format field.
> bsps/arm: remove lock in arm_cp15_set_translation_table_entries().
> bsps/arm: reorganize CP15 code to allow clean and invalidate ARMv7
> cache by level.
> arm/raspberrypi: more definitions of BCM2836 core local peripherals.
> arm/raspberrypi: rename linkcmds to linkcmds.in to allow their
> configure processing.
> arm/raspberrypi: propagate number of configured CPUs into linker
> script.
> bsps/arm: basic BCM2836 SMP implementation.
> arm/raspberrypi: correct and extend definitions for GPU timer.
> arm/raspberrypi: use GPU/system timer as clock source.
>
> Rohini Kulkarni (1):
> arm/raspberrypi: include definitions of BCM2836 SMP mailboxes.
>
> c/src/lib/libbsp/arm/raspberrypi/Makefile.am | 5 +-
> c/src/lib/libbsp/arm/raspberrypi/clock/clockdrv.c | 98 +++++++----
> c/src/lib/libbsp/arm/raspberrypi/configure.ac | 19 ++-
> c/src/lib/libbsp/arm/raspberrypi/include/bsp.h | 3 +
> c/src/lib/libbsp/arm/raspberrypi/include/irq.h | 5 +
> .../libbsp/arm/raspberrypi/include/raspberrypi.h | 182 ++++++++++++++++++++-
> c/src/lib/libbsp/arm/raspberrypi/irq/irq.c | 18 ++
> c/src/lib/libbsp/arm/raspberrypi/startup/bspsmp.c | 122 ++++++++++++++
> .../libbsp/arm/raspberrypi/startup/bspstarthooks.c | 35 +++-
> .../raspberrypi/startup/{linkcmds => linkcmds.in} | 4 +-
> .../arm/raspberrypi/startup/mm_config_table.c | 8 +
> .../libbsp/arm/shared/arm-cp15-set-ttb-entries.c | 10 +-
> c/src/lib/libcpu/arm/shared/include/arm-cp15.h | 147 ++++++++++-------
> 13 files changed, 539 insertions(+), 117 deletions(-)
> create mode 100644 c/src/lib/libbsp/arm/raspberrypi/startup/bspsmp.c
> rename c/src/lib/libbsp/arm/raspberrypi/startup/{linkcmds => linkcmds.in} (95%)
>
> --
> 1.9.1
>
More information about the devel
mailing list