summaryrefslogtreecommitdiff
path: root/include/ec_commands.h
diff options
context:
space:
mode:
authorVic Yang <victoryang@google.com>2015-01-27 14:18:23 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-28 01:56:15 +0000
commit3a1b5ec3dd91bac4833167cedcd68d9d4936ce6b (patch)
tree68d30e75a74d553aaab9a8cc1db1f9bf74cfbe60 /include/ec_commands.h
parent7aa976d3a4832389f868b054297a239eb7d6d685 (diff)
downloadchrome-ec-3a1b5ec3dd91bac4833167cedcd68d9d4936ce6b.tar.gz
cortex-m: disallow rescheduling if task_start() has not yet run
Most GPIO/peripheral interrupts are enabled in HOOK_INIT or some other *_init() functions that are called before task_start(). Quite a lot of these IRQ handler wake some task to process the interrupt, and this causes a race condition. If the interrupt is triggered before task_start() is called, the system may crash/hang/whatever. Fix this by only allowing rescheduling tasks if task_start() is called. This is basically the cortex-m version of commit e541eeb2. BRANCH=Ryu BUG=None TEST=Without this fix, my Ryu P3 always crashes when cold resetting from bootloader mode. After applying this fix, it doesn't anymore. Change-Id: I0f81e90482ff97469c4f0423d6aa060f2ac76f74 Signed-off-by: Vic Yang <victoryang@google.com> Reviewed-on: https://chromium-review.googlesource.com/243626 Tested-by: Vic Yang <victoryang@chromium.org> Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'include/ec_commands.h')
0 files changed, 0 insertions, 0 deletions