mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 02:05:01 +00:00
vboot: Support SLOW_EC_UPDATE with OPROM_MATTERS
In order to display the slow EC update screen on x86 devices in normal mode it is necessary to request a reboot where the VGA Option ROM is loaded. This needs a bit of plumbing to pass the OPROM_MATTERS and OPROM_LOADED flags into shared data so they can be consumed in the VbEcSoftwareSync() function. It also needs the VbInit() function to not immediately request a reboot if the VGA Option ROM was loaded in normal mode and the SLOW_EC flag is set as it will still need to be used during software sync. A FIXME in VbEcSoftwareSync() is implemented and the comment is removed, and two extra checks are done. First, if rebooting to RO then also check if the VGA Option ROM is needed to save an extra reboot, and second when exiting the software sync function request a reboot without the VGA Option ROM if it was done in normal mode and the option rom was needed+loaded. The request for a reboot from VbEcSoftwareSync() is saved when doing EC update in case there is an (optional) PD software sync that may also need to display the screen. BUG=chrome-os-partner:12257,chrome-os-partner:32379 BRANCH=samus TEST=all tests pass, manual testing: 1) in normal mode, with EC/PD in RW, ensure that they are rebooted to RO and the VGA Option ROM is loaded and the wait screen is displayed, and then the system is rebooted at the end and the VGA Option ROM is not loaded. 2) same as #1 with EC/PD in RO already, same result 3) same as #1 with system in developer mode, same result except there is no reboot at the end of software sync 4) same as #1 with system in developer mode and EC/PD in RO, ensure that there is no extra reboot at the beginning or end of software sync. Change-Id: Id592181efd640f4cd37a986cd1dcc29f3ca45104 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/223718 Reviewed-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
e54e656b9f
commit
731f8e8a1d
@@ -82,6 +82,10 @@ VbError_t VbInit(VbCommonParams *cparams, VbInitParams *iparams)
|
||||
shared->flags |= VBSD_EC_SLOW_UPDATE;
|
||||
if (iparams->flags & VB_INIT_FLAG_VIRTUAL_REC_SWITCH)
|
||||
shared->flags |= VBSD_BOOT_REC_SWITCH_VIRTUAL;
|
||||
if (iparams->flags & VB_INIT_FLAG_OPROM_MATTERS)
|
||||
shared->flags |= VBSD_OPROM_MATTERS;
|
||||
if (iparams->flags & VB_INIT_FLAG_OPROM_LOADED)
|
||||
shared->flags |= VBSD_OPROM_LOADED;
|
||||
|
||||
is_s3_resume = (iparams->flags & VB_INIT_FLAG_S3_RESUME ? 1 : 0);
|
||||
|
||||
@@ -327,7 +331,14 @@ 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, 0);
|
||||
retval = VBERROR_VGA_OPROM_MISMATCH;
|
||||
/*
|
||||
* If this is a system with slow EC update then don't
|
||||
* reboot immediately in case VGA option ROM is still
|
||||
* needed to display an update screen. The reboot will
|
||||
* be requested after EC software sync is complete.
|
||||
*/
|
||||
if (!(iparams->flags & VB_INIT_FLAG_EC_SLOW_UPDATE))
|
||||
retval = VBERROR_VGA_OPROM_MISMATCH;
|
||||
VBDEBUG(("VbInit() has oprom, doesn't need it\n"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user