Ensure that the VGA is enabled/disabled as needed.

On some systems, we require the VGA option ROM to be loaded before VbInit()
is called so we can display BIOS screens. If that hasn't happened, we
request it and reboot. Alternatively, if we don't need the option ROM
(normal mode) but we've already loaded it, we un-request it and reboot just
in case there are security vulnerabilities that might be exposed.

Not all systems need preloaded option ROMs. There is an additional input
flag that indicates whether this matters or not.

BUG=chrome-os-partner:8789
TEST=manual

Using keyboard-based dev-mode, switch between normal and dev mode and back.
It should work as expected.

Change-Id: Id1d662014d47ab648c73db4b1647520801f3a0b8
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27125
Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Bill Richardson
2012-07-10 17:56:42 -07:00
committed by Gerrit
parent 45de9c931b
commit 88d9375f50
3 changed files with 25 additions and 5 deletions

View File

@@ -233,8 +233,6 @@ typedef struct VbKernelPreambleHeader {
#define VBSD_BOOT_RO_NORMAL_SUPPORT 0x00000200
/* VbInit was told that the system has a virtual dev-switch */
#define VBSD_HONOR_VIRT_DEV_SWITCH 0x00000400
/* VbInit was told that the VGA Option ROM was loaded at boot */
#define VBSD_BOOT_OPROM_LOADED 0x00000800
/* Result codes for VbSharedDataHeader.check_fw_a_result (and b_result) */
#define VBSD_LF_CHECK_NOT_DONE 0