It all started when GDC superhero and primary source of my inferiority complex Graham Wihilididalolz had asked me about getting JayStation2 running on his Pi. Graham had wisely chosen to attempt this with an RPI2, since RPI3 moved to a 64-bit Cortex-A53, and therefore my RPI2-based stuff surely wouldn’t boot on such a totally different CPU.
Funny story. It didn’t boot anyway. Turns out my code was depending on a minor HW difference that was introduced between RPI2’s v1.1 and v1.2 board revisions. That ever so small change was a swapping of the old Cortex-A7 CPU for the same A53/2837 found in the RPI3. Allegedly they were having a hard time sourcing the old part, and switched to the new CPU without bothering to make a big deal of it.
At this point, I said screw it, and ported the whole thing to RPI3. This post is an open topic that I will keep adding to as I find more differences. If I’m missing anything, please let me know and I will update.
; Divider = 48000000 / (16 * 115200) = 26.0416666667 = ~26.
; Frac part = (0.0416666667 * 64) + 0.5 = 3.1666666688 = ~3.
; Divider = 3000000 / (16 * 115200) = 1.627 = ~1.
; Frac part = (0.627 * 64) + 0.5 = 40.6 = ~40.
Exact same code, you just use a different clock in the calculation.
For some reason I don’t fully understand, GPIO pins 14 and 15 had their functions changed around to default to something bluetooth related. This is even stranger, because they chose to use the pins from the only UART in the system with a stable clock. Its easy enough to fix, just set GPIO pins 14 and 15 to alt func 0 (0b100).
The SMP bit, responsible for marking a CPU as part of the inner shareable domain, has changed location. It used to be bit 6 of the ACTLR register, and is now bit 6 of the CPUECTLR register.
; ACTLR register changed from A7 to A52.
I’m not currently in a position to try this on my RPI2, but I would love for someone else to try and let me know what the default is.