Closed PeikanTsai closed 4 years ago
Yes, I think you're right.
How about adding a cpsid aif
before write_tpidrprw r0
? The write_tpidrprw r0
should then probably be moved outside the macro vector_prologue_spectre
, just before mrs r0, spsr
.
If fiq happen when pc in
thread_excp_vect_workaround
with fiq enabled, r0 may be modified after exit fiq handler because thetpidr
is used as temporary register to save r0 value.I found this issue after I added an atomic smc call in fiq handler, and sometimes the syscall fail because
r0
is modified. And the value ofr0
seems like a validspsr
.