diff options
author | Keith Packard <keithp@keithp.com> | 2013-10-07 21:53:53 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-10-07 21:53:53 -0700 |
commit | 8f7edcee2db30652ce0b147f282de3396c3786ad (patch) | |
tree | 4be74830f12ad85e82eb159d7a73dc4aa0bb181f /src/lpc/ao_arch_funcs.h | |
parent | 4254de22864de2ed7ae5928c6b8bfd9df1c8a3fb (diff) |
altos/lpc, altos/stm: ARM requires ISB after switching stack pointers
This sticks a barrier in the CPU to prevent using the wrong stack
register past the change.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lpc/ao_arch_funcs.h')
-rw-r--r-- | src/lpc/ao_arch_funcs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lpc/ao_arch_funcs.h b/src/lpc/ao_arch_funcs.h index 9a3219a2..0891903e 100644 --- a/src/lpc/ao_arch_funcs.h +++ b/src/lpc/ao_arch_funcs.h @@ -235,6 +235,7 @@ static inline void ao_arch_start_scheduler(void) { asm("mrs %0,control" : "=&r" (control)); control |= (1 << 1); asm("msr control,%0" : : "r" (control)); + asm("isb"); } #endif /* _AO_ARCH_FUNCS_H_ */ |