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/config_chip.h | |
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/config_chip.h')
-rw-r--r-- | chip/ish/config_chip.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chip/ish/config_chip.h b/chip/ish/config_chip.h index cf0bd75c1a..3f3f3ee275 100644 --- a/chip/ish/config_chip.h +++ b/chip/ish/config_chip.h @@ -9,6 +9,11 @@ /* CPU core BFD configuration */ #include "core/minute-ia/config_core.h" +#ifndef __ASSEMBLER__ +/* Needed for PANIC_DATA_BASE */ +#include "ish_persistent_data.h" +#endif + /* Number of IRQ vectors on the ISH */ #define CONFIG_IRQ_COUNT (VEC_TO_IRQ(255) + 1) @@ -54,13 +59,8 @@ + CONFIG_AON_RAM_SIZE \ - CONFIG_AON_ROM_SIZE) -/* - * Store persistent panic data in AON memory. There are 256 bytes - * available for ECOS use, and we need two software-defined REG32's at - * the end. - */ -#define CONFIG_PANIC_DATA_BASE CONFIG_AON_ROM_BASE -#define CONFIG_PANIC_DATA_SIZE (256 - (2 * sizeof(uint32_t))) +/* Store persistent panic data in AON memory. */ +#define CONFIG_PANIC_DATA_BASE (&(ish_persistent_data.panic_data)) /* System stack size */ #define CONFIG_STACK_SIZE 1024 |