arm: Handle thumb2 thread entry point.
In cpu_set_upcall(), if the thread startup routine is a thumb routine, make sure to set PSR_T, so that the CPU will run in thumb mode. MFC After: 1 week
This commit is contained in:
parent
2191473724
commit
a342ecd326
|
@ -235,6 +235,8 @@ cpu_set_upcall(struct thread *td, void (*entry)(void *), void *arg,
|
|||
tf->tf_pc = (int)entry;
|
||||
tf->tf_r0 = (int)arg;
|
||||
tf->tf_spsr = PSR_USR32_MODE;
|
||||
if ((register_t)entry & 1)
|
||||
tf->tf_spsr |= PSR_T;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue