rpi4-osdev/part10-multicore
2021-02-21 20:58:04 +00:00
..
audio.bin Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
audio.wav Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
boot.h Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
boot.S Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
fb.c Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
fb.h Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
io.c Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
io.h Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
kernel.c Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
link.ld Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
Makefile Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
Makefile.gcc Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
mb.c Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
mb.h Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
multicore.c Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
multicore.h Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
README.md Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00
terminal.h Added part10-multicore - a rough multicore approach to sound 2021-02-21 20:58:04 +00:00

Writing a "bare metal" operating system for Raspberry Pi 4 (Part 10)

Using multiple CPU cores

Instead of a background DMA transfer, I suggested that we might use a second CPU core to play the audio whilst our main core continues on. I also said it would be hard on the Raspberry Pi 4... and it is.

This code isn't great yet, but it's enough to prove the concept in principle. Importantly, you'll need to modify your config.txt file on your SD card to include the following lines:

kernel_old=1
disable_commandline_tags=1
arm_64bit=1

For now, the points of interest in the code are:

  • The new boot.S and related boot.h loader
  • The new multicore.c and multicore.h files
  • A slimmed down io.h and kernel.c (DMA sound removed), with a new approach to main()
  • A revised link.ld

I will write more soon!