diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2014-10-21 08:50:57 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-10-23 02:19:55 +0000 |
commit | 3ba226c5a8ec80b6445660911b27d3bb4094ea0b (patch) | |
tree | 9590afefb7b17b1e8528e036ae1d7668f10bf19f | |
parent | 0bd37ae5c10e8d67f41fbf92eba1d57572cbbda3 (diff) | |
download | vboot-3ba226c5a8ec80b6445660911b27d3bb4094ea0b.tar.gz |
vboot: Don't abort for OPROM_MISMATCH if not using RO_NORMAL
When the BIOS calls VbInit() in firmware it may not yet know if
the system is in developer mode if there is a virtual developer mode
switch, instead it relies on the VbNv that is prepared by VbInit().
This means that BIOS may not always pass in the correct value for
OPROM_LOADED because the option rom loading has not actually
happened yet.
However since it has not happened yet the BIOS can still respond to
the VbNv flag being set without needing to reboot, so VbInit() does
not need to abort. This was causing FAFT tests to get confused.
If using RO_NORMAL then we can assume an old style where VbInit() is
called by the bootloader after Option ROM loading has already happened,
so it does need to be told to reboot in this case.
BUG=chrome-os-partner:32379
BRANCH=samus
TEST=pass FAFT tests on samus
Change-Id: Id3cdfb338a0c7a9901e0c579acce4fc9c7ba016b
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/224631
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | firmware/lib/vboot_api_init.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/firmware/lib/vboot_api_init.c b/firmware/lib/vboot_api_init.c index 38bc8793..71bfe41d 100644 --- a/firmware/lib/vboot_api_init.c +++ b/firmware/lib/vboot_api_init.c @@ -301,7 +301,13 @@ VbError_t VbInit(VbCommonParams *cparams, VbInitParams *iparams) if ((iparams->flags & VB_INIT_FLAG_OPROM_MATTERS) && !(iparams->flags & VB_INIT_FLAG_OPROM_LOADED)) { VbNvSet(&vnc, VBNV_OPROM_NEEDED, 1); - retval = VBERROR_VGA_OPROM_MISMATCH; + /* + * If not using RO_NORMAL mode then VbInit() is being + * run from within firmware and can still respond to + * the VbNV flag and does not need a reboot here. + */ + if (iparams->flags & VB_INIT_FLAG_RO_NORMAL_SUPPORT) + retval = VBERROR_VGA_OPROM_MISMATCH; VBDEBUG(("VbInit() needs oprom, doesn't have it\n")); } |