Closed parthitce closed 2 months ago
It's interesting to note that lr
is still intact, so it's not the bx lr
at the end of __arm_smccc_smc()
that goes wrong. Instead,
it looks like the return from secure world goes wrong. Instead of returning to the instruction after the smc instruction it has returned to 0x4000228
. This is an Arm v7-A system so the secure monitor (responsible for enter and exit of secure world) in OP-TEE is used. However, it looks like you have a few patches on top of upstream so that's as far as I can track it. If you have the source code of your downstream OP-TEE fork available look for code updating mon_lr
in struct sm_nsec_ctx
.
The log line "note: keyctl[136] exited with irqs disabled" suggests that mon_spsr
in struct sm_nsec_ctx
might be corrupt too.
The 0x4000228
address looks like it could be a secure world address.
It's interesting to note that
lr
is still intact, so it's not thebx lr
at the end of__arm_smccc_smc()
that goes wrong. Instead, it looks like the return from secure world goes wrong. Instead of returning to the instruction after the smc instruction it has returned to0x4000228
. This is an Arm v7-A system so the secure monitor (responsible for enter and exit of secure world) in OP-TEE is used. However, it looks like you have a few patches on top of upstream so that's as far as I can track it. If you have the source code of your downstream OP-TEE fork available look for code updatingmon_lr
instruct sm_nsec_ctx
.The log line "note: keyctl[136] exited with irqs disabled" suggests that
mon_spsr
instruct sm_nsec_ctx
might be corrupt too.The
0x4000228
address looks like it could be a secure world address.
Thanks for the response. I will check the code path in the optee side. Also to add, as a blind thought, I did try using the mainline Optee with imx vendor kernel tree and it worked fine.
This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time.
Problem:
Toolchain:
Linux Kernel : Mailing 6.9 with patch.
Devicetree changes:
U-Boot : Mainline 2024.07
Optee- OS : Mainline
Compiled with:
Boot flow: Boot ROM -> SPL -> U-Boot -> OP-TEE -> Linux Kernel -> RFS
arch/arm/kernel/smccc-call.S
function__arm_smccc_smc
is crashing (which is assembly).Additional information:
Related issues:
Thanks in advance for the pointers and help.
Note: Full console is attached. optee.txt