diff options
Diffstat (limited to 'common/main.c')
-rw-r--r-- | common/main.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/common/main.c b/common/main.c index fe3424b67f..90d4a640c3 100644 --- a/common/main.c +++ b/common/main.c @@ -27,6 +27,7 @@ #include "timer.h" #include "uart.h" #include "util.h" +#include "vboot.h" #include "watchdog.h" /* Console output macros */ @@ -168,8 +169,15 @@ test_mockable __keep int main(void) button_init(); #endif /* defined(CONFIG_DEDICATED_RECOVERY_BUTTON | CONFIG_VOLUME_BUTTONS) */ -#if !defined(CONFIG_VBOOT_EFS) && \ - defined(CONFIG_RWSIG) && !defined(HAS_TASK_RWSIG) +#if defined(CONFIG_VBOOT_EFS) + /* + * For RO, it behaves as follows: + * In recovery, it enables PD communication and returns. + * In normal boot, it verifies and jumps to RW. + * For RW, it returns immediately. + */ + vboot_main(); +#elif defined(CONFIG_RWSIG) && !defined(HAS_TASK_RWSIG) /* * Check the RW firmware signature and jump to it if it is good. * |