summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-03-18 16:36:36 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-03-26 13:20:09 -0700
commite1761d644a336f98a73d65317eea90fb7c81d24f (patch)
tree4f3cdda5f0cd7cebf051a90e0b40478a19a056dd /firmware
parenteb0fc5749e6cca0b9ab22000fc5b53c43433e18e (diff)
downloadvboot-e1761d644a336f98a73d65317eea90fb7c81d24f.tar.gz
vboot: do not check for VBSD_HONOR_VIRT_DEV_SWITCH
As part of chromium:942901, physical dev switch functionality is being deprecated. As such, we no longer need to specify the flag VBSD_HONOR_VIRT_DEV_SWITCH -- the virtual dev switch should always be honoured. Additionally, there is no longer a need to check this flag when looking up the value for crossystem devsw_cur. This constant will be marked as deprecated in a subsequent CL. BUG=b:124141368, b:124192753, chromium:942901 TEST=Build locally TEST=/work/vboot/src/repohooks/pre-upload.py TEST=make clean && make runtests TEST=make clean && COV=1 make coverage && make coverage_html BRANCH=none Change-Id: Ib1ab86d79b039650136f1038c23175f5990895db Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/1526070 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/include/vboot_struct.h3
-rw-r--r--firmware/lib/vboot_ui.c4
-rw-r--r--firmware/lib/vboot_ui_menu.c3
3 files changed, 4 insertions, 6 deletions
diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h
index fc993712..82ebdb4c 100644
--- a/firmware/include/vboot_struct.h
+++ b/firmware/include/vboot_struct.h
@@ -227,7 +227,8 @@ typedef struct VbKernelPreambleHeader {
#define VBSD_BOOT_S3_RESUME 0x00000100
/* Read-only firmware supports the normal/developer code path */
#define VBSD_BOOT_RO_NORMAL_SUPPORT 0x00000200
-/* VbInit() was told that the system has a virtual dev-switch */
+/* VbInit() was told that the system has a virtual dev-switch;
+ * Deprecated as part of chromium:942901. */
#define VBSD_HONOR_VIRT_DEV_SWITCH 0x00000400
/* VbInit() was told the system supports EC software sync */
#define VBSD_EC_SOFTWARE_SYNC 0x00000800
diff --git a/firmware/lib/vboot_ui.c b/firmware/lib/vboot_ui.c
index 14f8aabe..6ba46682 100644
--- a/firmware/lib/vboot_ui.c
+++ b/firmware/lib/vboot_ui.c
@@ -601,8 +601,7 @@ VbError_t vb2_developer_ui(struct vb2_context *ctx)
case ' ':
/* See if we should disable virtual dev-mode switch. */
VB2_DEBUG("shared->flags=0x%x\n", shared->flags);
- if (shared->flags & VBSD_HONOR_VIRT_DEV_SWITCH &&
- shared->flags & VBSD_BOOT_DEV_SWITCH_ON) {
+ if (shared->flags & VBSD_BOOT_DEV_SWITCH_ON) {
/* Stop the countdown while we go ask... */
if (sd->gbb_flags &
GBB_FLAG_FORCE_DEV_SWITCH_ON) {
@@ -875,7 +874,6 @@ static VbError_t recovery_ui(struct vb2_context *ctx)
* - user forced recovery mode
*/
if (key == VB_KEY_CTRL('D') &&
- shared->flags & VBSD_HONOR_VIRT_DEV_SWITCH &&
!(shared->flags & VBSD_BOOT_DEV_SWITCH_ON) &&
(shared->flags & VBSD_BOOT_REC_SWITCH_ON)) {
if (!(shared->flags &
diff --git a/firmware/lib/vboot_ui_menu.c b/firmware/lib/vboot_ui_menu.c
index 5ac4bb40..8ee27701 100644
--- a/firmware/lib/vboot_ui_menu.c
+++ b/firmware/lib/vboot_ui_menu.c
@@ -356,8 +356,7 @@ static VbError_t to_dev_action(struct vb2_context *ctx)
uint32_t vbsd_flags = vb2_get_sd(ctx)->vbsd->flags;
/* Sanity check, should never happen. */
- if (!(vbsd_flags & VBSD_HONOR_VIRT_DEV_SWITCH) ||
- (vbsd_flags & VBSD_BOOT_DEV_SWITCH_ON) ||
+ if ((vbsd_flags & VBSD_BOOT_DEV_SWITCH_ON) ||
!vb2_allow_recovery(ctx))
return VBERROR_KEEP_LOOPING;