panic: Provide declarations for chip panic data backup/restore

Provide APIs that allow chips to implement their own version of
backing up/restoring panic data to persistent storage.

BUG=b:62076222
BRANCH=None
TEST=make -j buildall

Change-Id: Idda2d55703d4fe7e0a8d6305695fbf4e193b596b
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/530196
Reviewed-by: Mulin Chao <mlchao@nuvoton.com>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
This commit is contained in:
Furquan Shaikh
2017-06-11 17:51:28 -07:00
committed by chrome-bot
parent 520f1aff77
commit 7e59da99a2
2 changed files with 19 additions and 0 deletions

View File

@@ -745,6 +745,15 @@
*/
#undef CONFIG_SOFTWARE_PANIC
/*
* Certain platforms(e.g. eve, poppy) cannot retain panic info in data ram since
* VCC is powered down on EC reset. On such platforms, panic data needs to be
* saved/restored to persistent storage by using chip specific
* implementations. This option can be enabled by those platforms that have and
* wish to use chip-implemented panic backup/restore functions.
*/
#undef CONFIG_CHIP_PANIC_BACKUP
/*
* Provide the default GPIO abstraction layer.
* You want this unless you are doing a really tiny firmware.

View File

@@ -170,4 +170,14 @@ void ignore_bus_fault(int ignored);
*/
struct panic_data *panic_get_data(void);
/**
* Chip-specific implementation for backing up panic data to persistent
* storage. This function is used to ensure that the panic data can survive loss
* of VCC power rail.
*
* There is no generic restore function provided since every chip can decide
* when it is safe to restore panic data during the system initialization step.
*/
void chip_panic_data_backup(void);
#endif /* __CROS_EC_PANIC_H */