diff options
-rw-r--r-- | common/system.c | 7 | ||||
-rw-r--r-- | include/system.h | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/common/system.c b/common/system.c index e1b8d0b396..5ae642a560 100644 --- a/common/system.c +++ b/common/system.c @@ -1568,3 +1568,10 @@ void clock_enable_module(enum module_id module, int enable) * function. */ } + +__test_only void system_common_reset_state(void) +{ + jdata = 0; + reset_flags = 0; + jumped_to_image = 0; +} diff --git a/include/system.h b/include/system.h index 9b6bf0ff48..0d785c6899 100644 --- a/include/system.h +++ b/include/system.h @@ -49,6 +49,13 @@ void system_pre_init(void); void system_common_pre_init(void); /** + * System common re-initialization; called to reset persistent state + * left by system_common_pre_init(). This is useful for testing + * scenarios calling system_common_pre_init() multiple times. + */ +__test_only void system_common_reset_state(void); + +/** * Set up flags that should be saved to battery backed RAM. * * @param reset_flags - flags passed into system_reset |