December 24, 2016

Memory allocation on the Orange Pi PC and U-Boot

The H3 chip itself has a variety of SRAM tucked away inside of it, and even an SRAM controller to help map it. The only thing I have learned so far is that there is a 32K section of it at address 0 that the U-boot SPL uses, and perhaps the bootrom as well.

The Orange Pi has 1G of ram and it is located at 0x40000000 to 0x7fffffff. I have U-Boot load my images to 0x42000000. As near as I can tell U-Boot itself is running at 0x4a000000. When U-Boot transfers control to me, the sp contains 0x79f34c78. That is an odd address for the stack, but it is near the end of DRAM so I guess that is OK.

The main thing is that I should avoid having U-Boot load my image on top of itself or the U-Boot stack. Once I start running, I can freely trash U-boot, but may need to take care about MMU tables.

Device addresses

Here is a handy list I tripped over, along with some other odd items.


Have any comments? Questions? Drop me a line!

Tom's electronics pages / tom@mmto.org