diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-10-23 16:37:45 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2015-10-23 22:49:29 -0700 |
commit | 9acd84460e953dd793c9594b141ca7e38568820d (patch) | |
tree | 5e12ae87e6f7c94fb49d74381adccabcdfb8b2e6 /board/samus_pd | |
parent | 71e12124e5e5e54e921a6940ed93599a90b3035a (diff) | |
download | chrome-ec-9acd84460e953dd793c9594b141ca7e38568820d.tar.gz |
glados: oak: reboot EC if PD MCU crashes
If PD MCU crashes, it will go back to RO code and stay there
until the next AP boot. So, if EC detects PD has crashed, then
EC should panic reboot with debug message that it detected
a PD crash.
PD MCU crash is detected by EC by seeing the PD MCU transition
from RW to RO, without it setting the flag that it got there
from a sysjump.
This CL also makes minor changes to oak_pd and glados_pd board.c
files to make them identical, other than the few minor real
differences between them.
BUG=none
BRANCH=none
TEST=tested on glados using pdcmd console command on EC to test
sysjumps and reboots:
sysjump to RW: pdcmd 0xd2 0 2 0
sysjump to RO: pdcmd 0xd2 0 1 0
cold reboot: pdcmd 0xd2 0 4 0
Verified that PD can jump back and forth between RO and RW
without EC panicing. Verified that if PD MCU is in RW and
reboots, then the EC will panic and print 'PD crash'. Verify
if PD MCU reboots while in RO, without ever going to RW first,
then EC does not panic.
Change-Id: Id3191f4005e70a6c61a9322bf535b4374e85eb9a
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/308586
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/samus_pd')
-rw-r--r-- | board/samus_pd/board.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/board/samus_pd/board.c b/board/samus_pd/board.c index 8b86994b72..ff85debd22 100644 --- a/board/samus_pd/board.c +++ b/board/samus_pd/board.c @@ -51,13 +51,9 @@ static int batt_soc; /* Default to 5V charging allowed for dead battery case */ static enum pd_charge_state charge_state = PD_CHARGE_5V; -/* - * PD MCU status and host event status for host command - * Note: these vars must be aligned on 4-byte boundary because we pass the - * address to atomic_ functions which use assembly to access them. - */ -static int32_t host_event_status_flags __aligned(4); -static int32_t pd_status_flags __aligned(4); +/* PD MCU status and host event status for host command */ +static int32_t host_event_status_flags; +static int32_t pd_status_flags; static struct ec_response_pd_status pd_status; |