ARM-software / tf-issues

Issue tracking for the ARM Trusted Firmware project
37 stars 16 forks source link

Does ATF support switching to Non-Secure EL2 Aarch32 state? #142

Closed chinamao closed 10 years ago

chinamao commented 10 years ago

hi, experts: I want to test a 32bit Uboot.bin . So, before ATF jump to Uboot.bin, i want ATF switchs to Non-Secure EL2 Aarch32 state.

So, does ATF support switching to Non-Secure EL2 Aarch32 state now?

best wishes,

athoelke commented 10 years ago

At the moment the BL2 and BL3-1 software assumes that the normal-world register width is 64-bit. For example, in bl2_main() the bl33_image_info.spsr is constructed with a 64-bit register width mode; and bl31_prepare_next_image_entry() does not set the register-width bit of SCR_EL3 to match SPSR_EL3.

We have not yet tested using a 32-bit normal world, and additional changes would be required in the PSCI implementation to clean the parameters from a 32-bit caller, and to correctly set up SCR_EL3 and SPSR_EL3 for CPUs on the warm boot path before entering the normal world.

chinamao commented 10 years ago

hi, athoelke: thanks for your reply!

Maybe "64bit ATF + 32bit normal world UEFI boot loader" is also a user requirement!

danh-arm commented 10 years ago

Maybe "64bit ATF + 32bit normal world UEFI boot loader" is also a user requirement!

Yes it probably is but we have to prioritize this requirement against all the others. Currently, we are primarily supporting 64-bit normal world firmware. If you'd like to influence the TF roadmap or even better, contribute to it, then please contact us privately.

In the meantime, it is possible to run 32-bit EL1 normal world firmware without changing TF, by inserting a 64-bit EL2 stub in front of the normal world firmware, which does the 64-bit to 32-bit transition. Clearly this solution doesn't work if you want your normal world firmware (or kernel) to have control of EL2.