Hi experts Ash Wilding Mark Nicholson,
I have a Juno r1 board and I'm using it as the instruction of this page's "Building from source" section.
Now I want to update some secure related registers (e.g., SCR_EL3) for my board. These update operations require EL3 privilege.
In this case, I think I need to write the code in secure monitor layer. I hope I can update the register value while booting time so I think I should add code in the BL2 or BL31 according to the Linaro slides page8.
My workspace contains the folder arm-tf which looks like the part I should work with.
However, after running script build-arm-tf.sh, I do get the bl2.bin and bl31.bin while I don't know how to push these files into my board and use them for trusted booting.
So my questions are:
1. To update the register with EL3 privilege, should I add code in trusted firmware layer?
2. Can I update the trusted firmware by myself for Juno r1? If I can, how?
If I misunderstand any part, please let me know.
Thank you in advance.
Shengye
AT BL3-1 I don't see any immediate reason why you can't modify these registers because of privilege.
Do you have a debugger (e.g. DS-5/DSTREAM) so you can step through this one instruction and a time and check the status of these system register updates?
GUESSES, but...
- Are you using the right access size for the register (check the ARM ARM)?
- Could the update be successful, but changes are overwritten again elsewhere in the firmware? You could try putting some instrumentation/printfs in the code to see if you can learn more.