summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2021-03-03 17:34:43 +0800
committerCommit Bot <commit-bot@chromium.org>2021-03-10 06:39:05 +0000
commita115e1ad81f9f93b9c36779f645305b06056661e (patch)
tree012741dc0e38cfd2cf05fff24fa84e47b7bbd094 /firmware
parentce7171190f1975d1ea3e65a1d46d640ebc243d9e (diff)
downloadvboot-a115e1ad81f9f93b9c36779f645305b06056661e.tar.gz
vboot: do not change screens when dev boot disallowed
In CL:2716747, VB2_SCREEN_DEVELOPER_TO_NORM is pulled up to act as the root screen in the case of dev boot being disallowed. As such, the screen changes can be removed from VB2_SCREEN_DEVELOPER_MODE init() and reinit() functions. If the user does manage to get into the developer mode screen while developer mode is disabled, rely on the individual checks in these functions to prevent booting: - vb2_ui_developer_mode_boot_internal_action - vb2_ui_developer_mode_boot_external_action - vb2_ui_developer_mode_boot_altfw_action BUG=b:159579189, b:181087237 TEST=make clean && make runtests BRANCH=none Signed-off-by: Joel Kitching <kitching@google.com> Change-Id: Ic72d30709baeac2fc7e681d973413e2e9c8b0483 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2730669 Reviewed-by: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/2lib/2ui_screens.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/firmware/2lib/2ui_screens.c b/firmware/2lib/2ui_screens.c
index cda9400b..218c34f9 100644
--- a/firmware/2lib/2ui_screens.c
+++ b/firmware/2lib/2ui_screens.c
@@ -688,10 +688,6 @@ vb2_error_t developer_mode_init(struct vb2_ui_context *ui)
enum vb2_dev_default_boot_target default_boot =
vb2api_get_dev_default_boot_target(ui->ctx);
- /* TODO(b/159579189): Split this case into a separate root screen */
- if (!vb2_dev_boot_allowed(ui->ctx))
- return vb2_ui_screen_change(ui, VB2_SCREEN_DEVELOPER_TO_NORM);
-
/* Don't show "Return to secure mode" button if GBB forces dev mode. */
if (vb2_get_gbb(ui->ctx)->flags & VB2_GBB_FLAG_FORCE_DEV_SWITCH_ON)
VB2_SET_BIT(ui->state->hidden_item_mask,
@@ -781,10 +777,6 @@ vb2_error_t developer_mode_action(struct vb2_ui_context *ui)
const int use_short = vb2api_use_short_dev_screen_delay(ui->ctx);
uint64_t elapsed_ms;
- /* TODO(b/159579189): Split this case into a separate root screen */
- if (!vb2_dev_boot_allowed(ui->ctx))
- return vb2_ui_screen_change(ui, VB2_SCREEN_DEVELOPER_TO_NORM);
-
/* Once any user interaction occurs, stop the timer. */
if (ui->key)
ui->disable_timer = 1;