[coreboot-gerrit] New patch to review for coreboot: boot_device: add call to boot_device_init()

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Fri Oct 23 13:26:00 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12154

-gerrit

commit 9465c823ddd3a2a27ba5429719df5aa958ef9687
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Tue Oct 13 14:26:55 2015 -0500

    boot_device: add call to boot_device_init()
    
    In the program loading paths using vboot it's possible that
    the boot media has not been initiazed for that stage. Therefore,
    provide this call such that it's guaranteed to be called at least
    once.
    
    BUG=chrome-os-partner:44827
    BRANCH=None
    TEST=Built and booted glados.
    
    Change-Id: I3a0ef4d9eebbf5f15780316cc76b469e8ac3f358
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Original-Commit-Id: 6ee0c5bb36d17fd80ba34762e7547359fd8971ce
    Original-Change-Id: If8dfeedbe1243ec482764e05c8d3f333c18aedd2
    Original-Signed-off-by: Aaron Durbin <adurbin at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/305540
    Original-Tested-by: Julius Werner <jwerner at chromium.org>
    Original-Reviewed-by: Julius Werner <jwerner at chromium.org>
---
 src/lib/boot_device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/lib/boot_device.c b/src/lib/boot_device.c
index e0353fc..9501d3a 100644
--- a/src/lib/boot_device.c
+++ b/src/lib/boot_device.c
@@ -29,6 +29,9 @@ int boot_device_ro_subregion(const struct region *sub,
 {
 	const struct region_device *boot_dev;
 
+	/* Ensure boot device has been initialized at least once. */
+	boot_device_init();
+
 	boot_dev = boot_device_ro();
 
 	if (boot_dev == NULL)



More information about the coreboot-gerrit mailing list