From e589f085c48816b64258c349017e7729d47398ff Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Tue, 15 May 2012 15:38:00 -0700 Subject: [PATCH] Disable interrupts while waiting for reboot Signed-off-by: Randall Spangler BUG=chrome-os-partner:7471 TEST=from console, reboot Change-Id: I932ce34a13f4d6a30e2575450fafa16a7d909e3e --- chip/lm4/system.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chip/lm4/system.c b/chip/lm4/system.c index 6c6d1de64b..e2aedd3691 100644 --- a/chip/lm4/system.c +++ b/chip/lm4/system.c @@ -9,6 +9,7 @@ #include "cpu.h" #include "registers.h" #include "system.h" +#include "task.h" static int wait_for_hibctl_wc(void) @@ -147,13 +148,14 @@ int system_pre_init(void) int system_reset(int is_cold) { + /* Disable interrupts to avoid task swaps during reboot */ + interrupt_disable(); + /* TODO: (crosbug.com/p/7470) support cold boot; this is a warm boot. */ CPU_NVIC_APINT = 0x05fa0004; /* Spin and wait for reboot; should never return */ - /* TODO: (crosbug.com/p/7471) should disable task swaps while - waiting */ while (1) {} return EC_ERROR_UNKNOWN;