September 14, 2018

The Nanopi Fire3 - lessons from U-Boot about the MMU

The ARM v8 is a new beast to me, as is the armv8 MMU. I added some print statements to the mmu_setup() routine in U-Boot (in arch/arm/cpu/armv8/cache_v8.c) and learned the following. The big "granule" size is a nice thing for someone like me who basically wants a transparent 1:1 MMU mapping and to just get the thing out of my way. The S5P6818 on the Fire3 really has only 4G of address space of any interest, so we could map all of it with only 8 page table entries! I suppose it is good practice to initialize all 8192 entries, but I am betting we could do just fine setting up only 8. The entries as set up by U-Boot look like this:
00000401
20000401
40000411
60000411
80000401
a0000401
c0000401
e0000401
Note that the entries that map RAM have an extra bit set.


Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org