diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/2lib/2misc.c | 11 | ||||
-rw-r--r-- | firmware/2lib/include/2api.h | 6 |
2 files changed, 6 insertions, 11 deletions
diff --git a/firmware/2lib/2misc.c b/firmware/2lib/2misc.c index 03766b44..efa33a8a 100644 --- a/firmware/2lib/2misc.c +++ b/firmware/2lib/2misc.c @@ -579,10 +579,9 @@ void vb2_fill_dev_boot_flags(struct vb2_context *ctx) { struct vb2_gbb_header *gbb = vb2_get_gbb(ctx); - if (vb2_secdata_fwmp_get_flag(ctx, VB2_SECDATA_FWMP_DEV_DISABLE_BOOT) && - !(gbb->flags & VB2_GBB_FLAG_FORCE_DEV_SWITCH_ON)) - ctx->flags &= ~(uint64_t)VB2_CONTEXT_DEV_BOOT_ALLOWED; - else + if (!vb2_secdata_fwmp_get_flag(ctx, + VB2_SECDATA_FWMP_DEV_DISABLE_BOOT) || + (gbb->flags & VB2_GBB_FLAG_FORCE_DEV_SWITCH_ON)) ctx->flags |= VB2_CONTEXT_DEV_BOOT_ALLOWED; if (vb2_nv_get(ctx, VB2_NV_DEV_BOOT_EXTERNAL) || @@ -590,15 +589,11 @@ void vb2_fill_dev_boot_flags(struct vb2_context *ctx) vb2_secdata_fwmp_get_flag(ctx, VB2_SECDATA_FWMP_DEV_ENABLE_EXTERNAL)) ctx->flags |= VB2_CONTEXT_DEV_BOOT_EXTERNAL_ALLOWED; - else - ctx->flags &= ~(uint64_t)VB2_CONTEXT_DEV_BOOT_EXTERNAL_ALLOWED; if (vb2_nv_get(ctx, VB2_NV_DEV_BOOT_ALTFW) || (gbb->flags & VB2_GBB_FLAG_FORCE_DEV_BOOT_ALTFW) || vb2_secdata_fwmp_get_flag(ctx, VB2_SECDATA_FWMP_DEV_ENABLE_ALTFW)) ctx->flags |= VB2_CONTEXT_DEV_BOOT_ALTFW_ALLOWED; - else - ctx->flags &= ~(uint64_t)VB2_CONTEXT_DEV_BOOT_ALTFW_ALLOWED; } int vb2api_use_short_dev_screen_delay(struct vb2_context *ctx) diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h index 66594035..b973417d 100644 --- a/firmware/2lib/include/2api.h +++ b/firmware/2lib/include/2api.h @@ -242,19 +242,19 @@ enum vb2_context_flags { VB2_CONTEXT_EC_TRUSTED = (1 << 24), /* - * Boot into developer mode is allowed by FWMP and GBB flags. + * Boot into developer mode is allowed by FWMP or GBB flags. */ VB2_CONTEXT_DEV_BOOT_ALLOWED = (1 << 25), /* * Boot into developer mode from external disk is allowed by nvdata, - * FWMP and GBB flags. + * FWMP or GBB flags. */ VB2_CONTEXT_DEV_BOOT_EXTERNAL_ALLOWED = (1 << 26), /* * Boot into developer mode from alternate bootloader is allowed by - * nvdata, FWMP and GBB flags. + * nvdata, FWMP or GBB flags. */ VB2_CONTEXT_DEV_BOOT_ALTFW_ALLOWED = (1 << 27), }; |