mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-29 10:00:51 +00:00
If a bios carries an EC image signed by a wrong key, EFS EC falls back to the previous slot upon reboot. Vboot currently does not handle this case and tries to update the EC with an incompatible image again. When this happens, a user sees 'applying critical update' screen repeatedly. This patch adds EFS_VERIFYV host command. Vboot on AP calls it to check whether the EC likes a newly updated image or not. If the verification fails, it's considered as update failure and vboot displays 'broken' screen. BUG=b:71719323 BRANCH=none TEST=Flash EC SPI with an image which has a different RO key. Boot DUT and let it run software sync. EC-RO rejects the updated image and falls back to the previous one. The update counter is incremented and vboot shows the 'broken' screen, requesting recovery. Change-Id: I8a107a376963baa146ff691c50d80018ec3e429c Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/858159 Reviewed-by: Randall Spangler <rspangler@chromium.org>
32 lines
1.3 KiB
Plaintext
32 lines
1.3 KiB
Plaintext
/* Copyright 2017 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/*
|
|
* List of enabled tasks in the priority order
|
|
*
|
|
* The first one has the lowest priority.
|
|
*
|
|
* For each task, use the macro TASK_ALWAYS(n, r, d, s) for base tasks and
|
|
* TASK_NOTEST(n, r, d, s) for tasks that can be excluded in test binaries,
|
|
* where :
|
|
* 'n' in the name of the task
|
|
* 'r' in the main routine of the task
|
|
* 'd' in an opaque parameter passed to the routine at startup
|
|
* 's' is the stack size in bytes; must be a multiple of 8
|
|
*
|
|
* For USB PD tasks, IDs must be in consecutive order and correspond to
|
|
* the port which they are for. See TASK_ID_TO_PD_PORT() macro.
|
|
*/
|
|
|
|
#define CONFIG_TASK_LIST \
|
|
TASK_ALWAYS(HOOKS, hook_task, NULL, 2048) \
|
|
/* Larger stack for RW verification (i.e. sha256, rsa) */ \
|
|
TASK_NOTEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) \
|
|
TASK_NOTEST(PDCMD, pd_command_task, NULL, TASK_STACK_SIZE) \
|
|
TASK_ALWAYS(HOSTCMD, host_command_task, NULL, 2048) \
|
|
TASK_ALWAYS(CONSOLE, console_task, NULL, LARGER_TASK_STACK_SIZE) \
|
|
TASK_ALWAYS(POWERBTN, power_button_task, NULL, LARGER_TASK_STACK_SIZE) \
|
|
TASK_ALWAYS(PD_C0, pd_task, NULL, LARGER_TASK_STACK_SIZE)
|