mirror of
https://github.com/isometimes/rpi4-osdev
synced 2024-11-24 19:20:40 +00:00
.. | ||
audio.bin | ||
audio.wav | ||
boot.h | ||
boot.S | ||
fb.c | ||
fb.h | ||
io.c | ||
io.h | ||
kernel.c | ||
link.ld | ||
Makefile | ||
Makefile.gcc | ||
mb.c | ||
mb.h | ||
multicore.c | ||
multicore.h | ||
README.md | ||
terminal.h |
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!