diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2019-05-29 15:51:48 -0600 |
---|---|---|
committer | Jack Rosenthal <jrosenth@chromium.org> | 2019-06-06 19:55:40 +0000 |
commit | c723e723392aabc35747a6678b4b7931d7aeddb7 (patch) | |
tree | 2ebdd22275c369d0580641ddb23b8e782ff0b91a /chip/ish/aontaskfw | |
parent | e12b71b1fe82af7bc804004147f33da5e29cced1 (diff) | |
download | chrome-ec-c723e723392aabc35747a6678b4b7931d7aeddb7.tar.gz |
ish: use magic number to verify persistent data
Move persistent data definitions to a structure and have linker script
define the address of the symbol into the AON ROM (persistent data
storage). Use the magic number "ISHd" to verify persistent data
storage and copy to static memory when valid. Commit changes from the
local copy during reset.
BUG=b:133779707,b:133647823,b:132059981
BRANCH=none
TEST=power-on is only reset flag under cold reset, panic data
persists, watchdog reset produces correct reset flags, UART always
printing system info on boot
Change-Id: I65a458cc2656f8fe26361ef2117ceb5439edff6c
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1636293
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Diffstat (limited to 'chip/ish/aontaskfw')
-rw-r--r-- | chip/ish/aontaskfw/ish_aon_share.h | 2 | ||||
-rw-r--r-- | chip/ish/aontaskfw/ish_aontask.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/chip/ish/aontaskfw/ish_aon_share.h b/chip/ish/aontaskfw/ish_aon_share.h index ee630a49bf..c8664165ea 100644 --- a/chip/ish/aontaskfw/ish_aon_share.h +++ b/chip/ish/aontaskfw/ish_aon_share.h @@ -6,6 +6,7 @@ #ifndef __CROS_EC_ISH_AON_SHARE_H #define __CROS_EC_ISH_AON_SHARE_H +#include "common.h" #include "ia_structs.h" /* magic ID for valid aontask image sanity check */ @@ -21,7 +22,6 @@ struct ish_aon_share { /* magic ID */ uint32_t magic_id; - /* last error */ /* error counter */ uint32_t error_count; /* last error */ diff --git a/chip/ish/aontaskfw/ish_aontask.c b/chip/ish/aontaskfw/ish_aontask.c index fc584857b1..5e16ee7d6a 100644 --- a/chip/ish/aontaskfw/ish_aontask.c +++ b/chip/ish/aontaskfw/ish_aontask.c @@ -192,7 +192,7 @@ static struct tss_entry aon_tss = { .ebx = 0, /* set stack top pointer at the end of usable aon memory */ .esp = CONFIG_AON_ROM_BASE - AON_SP_RESERVED, - .ebp = AON_SP_RESERVED, + .ebp = CONFIG_AON_ROM_BASE - AON_SP_RESERVED, .esi = 0, .edi = 0, /* entry 1 in LDT for data segment */ |