rpi4-osdev/part10-multicore/README.md
2021-02-21 20:58:04 +00:00

929 B

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!