summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-05-29 16:22:28 +0800
committerCommit Bot <commit-bot@chromium.org>2019-06-07 20:09:42 +0000
commit40c35a022fc9ff9a2be0f394be45747e8f767931 (patch)
treeb852beb588493e14f5875f63e3a1fb3d2f2b2cf5
parent2d150c697904584f1ef863155129071bb2fed48d (diff)
downloadvboot-40c35a022fc9ff9a2be0f394be45747e8f767931.tar.gz
vboot: check for VB2_NV_DIAG_REQUEST when enabling display
VB2_NV_DISPLAY_REQUEST should only be used for cases where there is no other way for coreboot to tell that display initialization is required. In the case of developer, recovery, and diagnostic modes, display should always be initialized without looking at VB2_NV_DISPLAY_REQUEST. In the case of EC slow sync, VB2_NV_DISPLAY_REQUEST should still be used. BUG=b:124141368, chromium:948592, chromium:967298, b:133175864 TEST=make clean && make runtests BRANCH=none Change-Id: I56e7d50bfd7de596d25ba232251f73ccd2d5df9b Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1634450 Reviewed-by: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Jason Clinton <jclinton@chromium.org>
-rw-r--r--firmware/2lib/2api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/2lib/2api.c b/firmware/2lib/2api.c
index 008282b6..99bb9630 100644
--- a/firmware/2lib/2api.c
+++ b/firmware/2lib/2api.c
@@ -103,12 +103,14 @@ int vb2api_fw_phase1(struct vb2_context *ctx)
* Check for possible reasons to ask the firmware to make display
* available. sd->recovery_reason may have been set above by
* vb2_check_recovery. VB2_SD_FLAG_DEV_MODE_ENABLED may have been set
- * above by vb2_check_dev_switch.
+ * above by vb2_check_dev_switch. VB2_NV_DIAG_REQUEST may have been
+ * set during the last boot in recovery mode.
*/
if (!(ctx->flags & VB2_CONTEXT_DISPLAY_INIT) &&
(vb2_nv_get(ctx, VB2_NV_DISPLAY_REQUEST) ||
sd->flags & VB2_SD_FLAG_DEV_MODE_ENABLED ||
- sd->recovery_reason))
+ sd->recovery_reason ||
+ vb2_nv_get(ctx, VB2_NV_DIAG_REQUEST)))
ctx->flags |= VB2_CONTEXT_DISPLAY_INIT;
/* Mark display as available for downstream vboot and vboot callers. */
if (ctx->flags & VB2_CONTEXT_DISPLAY_INIT)