[coreboot-gerrit] New patch to review for coreboot: b1c7440 device: Conditionally bypass oprom execution

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Sun Apr 27 21:37:24 CEST 2014


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5595

-gerrit

commit b1c7440942838a7625c8a9a72a0a7aed2f1f5982
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Sun Dec 22 00:22:49 2013 +0200

    device: Conditionally bypass oprom execution
    
    Builds with CHROMEOS can bypass VGA oprom when boot is not in
    developer or recovery modes. Have the same functionality available
    without CHROMEOS but with BOOTMODE_STRAPS.
    
    Change-Id: I97644364305dc05aad78a744599476ccc58db163
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/device/pci_device.c | 20 +++++++++-----------
 1 file changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index d5f150c..3cf46b3 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -668,20 +668,18 @@ static int should_run_oprom(struct device *dev)
 	if (should_run >= 0)
 		return should_run;
 
-#if CONFIG_CHROMEOS
-	/* In ChromeOS we want to boot blazingly fast. Therefore
-	 * we don't run (VGA) option ROMs, unless we have to print
+	/* 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() &&
-	    !vboot_wants_oprom()) {
-		printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
-		should_run = 0;
-		return should_run;
-	}
-#endif
-	should_run = 1;
+	should_run = !IS_ENABLED(CONFIG_BOOTMODE_STRAPS) ||
+		developer_mode_enabled() || recovery_mode_enabled();
 
+#if CONFIG_CHROMEOS
+	if (!should_run)
+		should_run = vboot_wants_oprom();
+#endif
+	if (!should_run)
+		printk(BIOS_DEBUG, "Not running VGA Option ROM\n");
 	return should_run;
 }
 



More information about the coreboot-gerrit mailing list