August 13, 2018
The Nanopi Fire3 - 64 bit ARM
The A53 cores in the s5p6818 will be my first experience with armv8 (i.e. 64 bit arm).
A big question will be whether U-Boot starts my code running in 32 bit or 64 bit mode.
A person can sit and guess, but the only sure thing is to verify by experiment.
All evidence points to U-Boot running in 64 bit mode on this chip.
One would expect then that it would start any executables in 64 bit mode as well.
The fact that the aarch64 compiler is used to build U-Boot is the first line of
evidence. I use objdump to disassemble the u-boot binary and see code that looks
like the following. The fact that the registers a refered to as "x" and that the
register numbers go beyond 15 solidly confirm that this is 64 bit code.
43c00b84: a9bf7bfd stp x29, x30, [sp, #-16]!
43c00b88: a9bf73fb stp x27, x28, [sp, #-16]!
43c00b8c: a9bf6bf9 stp x25, x26, [sp, #-16]!
Both 32 and 64
Further study shows that the A53 core in the s5p6818 starts up in 32 bit mode (A32) and all of the on-chip bootrom code is A32.
After this it depends. The next stage is some form of "bl1" bootloader and can be 32 bit or 64 bit.
The bootloader will definitely branch to it in 32 bit mode, but it may have a header that flips the processor to 64 bit mode.
The bl1 loader I have settled on using definitely does immediately transtion to 64 bit, and that suits me fine.
Have any comments? Questions?
Drop me a line!
Tom's electronics pages / tom@mmto.org