mirror of
https://github.com/seL4/seL4.git
synced 2026-04-04 22:39:54 +00:00
Ensure that FPU state enables fpu on aarch32
When the FPU state is loaded from a thread for the first time the uninitialised floating point exception register is 0 leading to the FPU being disabled until an instruction fault occurs in that thread upon re-entry. Clearly, if we are loading the FPU state for a thread we want the FPU to be enabled so we enable it whenever it is loaded.
This commit is contained in:
@@ -198,8 +198,8 @@ static inline void loadFpuState(user_fpu_state_t *src)
|
||||
/* Load FPSCR. */
|
||||
VMSR(FPSCR, src->fpscr);
|
||||
|
||||
/* Restore FPEXC. */
|
||||
VMSR(FPEXC, src->fpexc);
|
||||
/* Restore FPEXC ensuring that it is enabled. */
|
||||
VMSR(FPEXC, src->fpexc | BIT(FPEXC_EN_BIT));
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HAVE_FPU */
|
||||
|
||||
Reference in New Issue
Block a user