diff options
author | Aaron Durbin <adurbin@chromium.org> | 2015-10-13 14:26:55 -0500 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-10-27 15:18:33 +0100 |
commit | aeb2e15428a8e47c1e544f11745a1ff5f2e3ae2f (patch) | |
tree | 25cf83b67e55b7259fcdfdb33f5f15e4a8fac17e | |
parent | 1d77c721d3ad661e1cdca19901830fb1fe75282f (diff) | |
download | coreboot-aeb2e15428a8e47c1e544f11745a1ff5f2e3ae2f.tar.xz |
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@chromium.org>
Original-Commit-Id: 6ee0c5bb36d17fd80ba34762e7547359fd8971ce
Original-Change-Id: If8dfeedbe1243ec482764e05c8d3f333c18aedd2
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/305540
Original-Tested-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: http://review.coreboot.org/12154
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r-- | src/lib/boot_device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/boot_device.c b/src/lib/boot_device.c index e0353fc1ab..9501d3ae2a 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) |