diff --git a/board/cr50/wp.c b/board/cr50/wp.c index 01fdf2e116..eb1d01155e 100644 --- a/board/cr50/wp.c +++ b/board/cr50/wp.c @@ -263,7 +263,6 @@ static void power_button_poked(void) } DECLARE_IRQ(GC_IRQNUM_RBOX0_INTR_PWRB_IN_FED_INT, power_button_poked, 1); - static void start_unlock_process(int total_poking_time, int max_poke_interval) { unlock_in_progress = 1; @@ -356,6 +355,15 @@ static int command_lock(int argc, char **argv) int enabled; int i; +#ifndef CR50_DEV + /* Don't allow the console to be unlocked at all for prod images. */ + ASSERT(console_is_restricted() == 1); + if (argc > 1) + return EC_ERROR_ACCESS_DENIED; + + goto out; +#endif /* !defined(CR50_DEV) */ + if (argc > 1) { if (!parse_bool(argv[1], &enabled)) return EC_ERROR_PARAM1;