3d4ea334a96f20b78dace4da7ab145a7d906283c is buggy due to reset is in privilege level and thread mode.
But the commit assume reset_handler is in Handler mode and makes undefined behavior when first calling activate except 06-Preemptive.
By some experiment, I acknowledge that it can still work well in QEMU but fail in real HW (STMF429), and that misled me during checking 3d4ea334a96f20b78dace4da7ab145a7d906283c.
I've solving it in my local by hacking activate or thread_start.
After cleanup the code, I will make a PR to solve it.
According to https://www.ptt.cc/bbs/ASM/M.1534260340.A.DC5.html
3d4ea334a96f20b78dace4da7ab145a7d906283c is buggy due to reset is in
privilege level
andthread mode
.But the commit assume
reset_handler
is inHandler mode
and makes undefined behavior when first callingactivate
except06-Preemptive
.By some experiment, I acknowledge that it can still work well in QEMU but fail in real HW (STMF429), and that misled me during checking 3d4ea334a96f20b78dace4da7ab145a7d906283c.
I've solving it in my local by hacking
activate
orthread_start
. After cleanup the code, I will make a PR to solve it.