AnsweredAssumed Answered

NXP LS1012a FRDM - Startup / Switch EL3 to EL2

Question asked by David Loosli on Oct 19, 2018
Latest reply on Oct 20, 2018 by David Loosli

Hi everyone

 

For my Bachelor Thesis I try to port an OpenSource kernel (i.e. Muen SK) to the ARMv8-A AArch64 architecture and decided to use the NXP LS1012a FRDM evaluation board as the target platform. The Kernel is written in Ada/SPARK and therefore I use a JLink Edu Debugger with OpenOCD and GPS as the IDE.

 

Everything went well so far - after resetting the board and letting the U-Boot bootloader do its job I can load my code into RAM and run it in EL3. I am now trying to get from EL3 to EL2 in hypervisor mode but after a few instructions I get a lot of "Illegal Instructions" in the debugger as well as the executing code even though my binary doesn't contain such illegal or undefined instructions (see pictures in the appendix).

 

A similar variant of the startup code and the linker script was already tested on different hardware and in the simulator and worked. After three days of testing and reading, I think that I am missing something about the MMU in connection with the DDR initialization. You can find the current startup file and linker script in the appendix.

 

Does anyone have any idea or guess where I could find my mistake? I would appreciate your advices!

 

Thanks, David

Attachments

Outcomes