From 74a0efe09a203959d5ab4879e4c1cf139c93b410 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 30 Mar 2012 17:10:49 -0700 Subject: [PATCH] [ChromeOS] Don't initialize VGA Option ROM in normal mode ChromeOS features two different modes: normal mode and developer mode (aka jailbreak mode). In developer mode, we need to display a warning screen for security reasons. However, in normal mode we want to boot blazingly fast. Therefore we don't run (VGA) option ROMs, unless we have to print something on the screen before the kernel is loaded. Change-Id: I37f63d0b082a48e037e65bde2b380f9b8743ed29 Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/829 Tested-by: build bot (Jenkins) Reviewed-by: Mathias Krause Reviewed-by: Ronald G. Minnich --- src/devices/pci_device.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c index 0a870b84c..c0559956b 100644 --- a/src/devices/pci_device.c +++ b/src/devices/pci_device.c @@ -54,6 +54,9 @@ #if CONFIG_HAVE_ACPI_RESUME && !CONFIG_S3_VGA_ROM_RUN #include #endif +#if CONFIG_CHROMEOS +#include +#endif u8 pci_moving_config8(struct device *dev, unsigned int reg) { @@ -667,6 +670,15 @@ void pci_dev_init(struct device *dev) ((dev->class >> 8) == PCI_CLASS_DISPLAY_VGA)) return; +#if CONFIG_CHROMEOS + /* In ChromeOS we want to boot blazingly fast. Therefore + * we don't run (VGA) option ROMs, unless we have to print + * something on the screen before the kernel is loaded. + */ + if (!developer_mode_enabled() && !recovery_mode_enabled()) + return; +#endif + rom = pci_rom_probe(dev); if (rom == NULL) return; -- 2.25.1