In message Y1kBF4LltIgWpXGj@genode-labs.com Stefan Kalkowski stefan.kalkowski@genode-labs.com wrote:
I do not know in which mode your platform is started. From your writings, I did assumed it starts in EL2. If I remember correctly, apart from UART accesses, the first "register" access should be the EL2 MMU setup right before the assembler snippet switches to EL1.
EL2 is where uboot leaves me.
I am also thinking of uboot. I have no control over it as it is now. It promptly refuses uimages, gives abort. I am loading binary to load/start address and start it with go.
Bootm command does a bit more than just jumping to a address.
I need to build uboot, but in order to boot from mmc I need to nuke boot sector on emmc.
A good thing is that I have the TRM's now.
To me this seems to be the root cause for the symptoms you are experiencing. When the image is somehow corrupted resp. not setup completely (e.g. non-zeroed data segment parts), you'll get strange results in the execution of the bootstrap code. Therefore, it would be good to first target the issues that lead to the uImage load failure. Normally, you do not necessarily need to build u-boot on your own. Maybe you can investigate what holds u-boot from loading your uImage successfully (trying different linking address, different loadaddr for the uImage etc.).
Regards Stefan
Makes sense. I have tried many load linking addresses. They all fail in the same way. It fails before "Starting kernel..."
We are moving to a new place here so it will not be done right now. Board and similar stuff makes it ways into boxes.
I have tried to use different banks of ram. Linux lists four areas. If I go with the second I get data abort at the place bootstrap code hangs. Not a very useful ESR , but the cpu is reading. PC,LR and SP points to addresses in uboot. I don't think alignment is a problem here. But it can be uboot. If interrupts are on it can make things corrupt pretty quick. But before it starts mapping elf segment it maps the beginning of image with success.
So new uboot is the first thing I will do when things are settled here.