Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
DiskImg
Font8x16.h Just Refreshed all Nov 8, 2018
Pi1.bat
Pi2.bat
Pi3-32.bat
Pi3-64.bat
README.md
SmartStart32.S Just Refreshed all Nov 8, 2018
SmartStart64.S Just Refreshed all Nov 8, 2018
emb-stdio.c
emb-stdio.h
kernel.elf Just Refreshed all Nov 8, 2018
kernel.map Just Refreshed all Nov 8, 2018
list.txt Just Refreshed all Nov 8, 2018
main.c Just Refreshed all Nov 8, 2018
rpi-SmartStart.c
rpi-smartstart.h Just Refreshed all Nov 8, 2018
rpi32.ld
rpi64.ld Just Refreshed all Nov 8, 2018

README.md

MULTICORE Pi 1,2,3 AARCH 32, NEW*** Pi3 AARCH64

Yes the multicore sample was extended to 64 BIT code.

Please remember the Pi1 is single processor. So while you can build code for a Pi1 it can't be used for hyperthreading unless used on a Pi2 or Pi3. The assembler and linker files are paired you use either the 32 bit or 64 bit together.

The SmartStartxx.S assembler boot stub was extended to setup cores 1,2,3 for hyperthreading. A new spinlock was created which mimics the bootloaders but is C compiler safe. To do that registers that would be trashed by C routines where restored when the core process is called. In addition to that each core has its own stack the size of which is controlled by the new matching linker file (rpixx.ld).

The demo uses printf to screen which is very dangerous because printf is not re-entrant so I took a bit of care to avoid clashes using it. Please don't try and take using printf too far what is expected is you setup proper thread safe C code. The random core hyperthread calls are cause by the interrupt timer.

rpi-SmartStart.h provides the C call

function bool CoreExecute (uint8_t coreNum, CORECALLFUNC func);

Where CORECALLFUNC is defined as

typedef void (*CORECALLFUNC) (void);

So CoreExecute can assign any "void function (void)" C routine to be execute by the given core (1..3).

As per usual you can simply copy the files in the DiskImg directory onto a format SD card and place in Pi to test

You can’t perform that action at this time.