summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSridhar Siricilla <sridhar.siricilla@intel.com>2022-12-19 15:05:59 +0530
committerJulius Werner <jwerner@chromium.org>2022-12-21 18:52:50 +0000
commitd13a57915df7e7eea217d6efba0b4051ca7fa838 (patch)
treed3a8cfa701ed7161b823e1f3e9888cced5113bfe /src
parent4af3df35e586a3d9ee43fef1a17eb34fedcef492 (diff)
security/vboot: Drop assert call from vbnv_udc_enable_flag()
It's true that vbnv_udc_enable_flag() is called after vbnv_init() (that's why the assertion was added). However, the former is called in the ramstage, while the latter in verstage. This means that vbnv_initialized will be false in ramstage, which leads to the assertion failure: [EMERG] ASSERTION ERROR: file 'src/security/vboot/vbnv.c', line 88 Since the ctx->nvdata will be restored in ramstage (by vb2api_reinit()), simply remove the assertion. So, the patch drops assert call from vbnv_udc_enable_flag() function. TEST=Verify Rex system boots to OS without assert error. Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com> Change-Id: I49022155239febd5c5be5cf2c5eca2019ca61c12 Reviewed-on: https://review.coreboot.org/c/coreboot/+/71097 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/security/vboot/vbnv.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/security/vboot/vbnv.c b/src/security/vboot/vbnv.c
index 1428a30b33..2ddb89803d 100644
--- a/src/security/vboot/vbnv.c
+++ b/src/security/vboot/vbnv.c
@@ -82,11 +82,6 @@ void save_vbnv(const uint8_t *vbnv_copy)
int vbnv_udc_enable_flag(void)
{
struct vb2_context *ctx = vboot_get_context();
-
- /* This function is expected to be called after temporary nvdata storage in vboot
- context is initialized. */
- assert(vbnv_initialized);
-
return (ctx->nvdata[DEV_FLAGS_OFFSET] & DEV_ENABLE_UDC) ? 1 : 0;
}