zephyr/arch
Andy Ross 0670ba6c92 xtensa: Disable interrupts on entry to _Cstart
Zephyr isn't ready to handle interrupts yet, until the
threading/scheduler are set up and we make our first context switch.
This was a semi-hidden bug: only the timer interrupt would actually
get unmasked before the system was ready, and obviously would never
have time to fire a tick before the system completed initialization.
But a combination of system load and a new version of Qemu (which
seems to be more sensitive to non-deterministic timing glitchery) has
made this visible.  About 2-3% of the time when run under a full
sanitycheck, the qemu process will get swapped away for long enough
that the tick timer expires before _Cstart() has reached
enable_multithreading().

It looks like the original code was cut and pasted from another
implementation, which was expected to call into an "application"
main() routine that wanted interrupts ready.

Fixes #11182

(Note also that this code is not used for ESP-32, which has its own
startup path)

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-11-12 13:51:20 -05:00
..
arc arc: add _arch_irq_connect_dynamic() 2018-11-10 11:01:22 -05:00
arm arch: arm: mpu: force outstanding transactions before MPU disabling 2018-11-12 08:02:13 -05:00
common interrupts: use weak linkage instead of linkonce 2018-11-10 11:01:22 -05:00
nios2 nios2: add _arch_irq_connect_dynamic() 2018-11-10 11:01:22 -05:00
posix arch: kernel_arch_func.h: Fix MISRA violation 2018-10-17 12:17:58 -04:00
riscv32 riscv32: add _arch_irq_connect_dynamic() 2018-11-10 11:01:22 -05:00
x86 x86: add dynamic interrupt support 2018-11-10 11:01:22 -05:00
xtensa xtensa: Disable interrupts on entry to _Cstart 2018-11-12 13:51:20 -05:00
CMakeLists.txt arch: Cmake: Add __ZEPHYR_SUPERVISOR__ macro for arch files. 2018-05-15 17:48:18 +03:00
Kconfig kernel: add dynamic interrupt API 2018-11-10 11:01:22 -05:00