From aeb2e15428a8e47c1e544f11745a1ff5f2e3ae2f Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 13 Oct 2015 14:26:55 -0500 Subject: [PATCH] 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 Original-Commit-Id: 6ee0c5bb36d17fd80ba34762e7547359fd8971ce Original-Change-Id: If8dfeedbe1243ec482764e05c8d3f333c18aedd2 Original-Signed-off-by: Aaron Durbin Original-Reviewed-on: https://chromium-review.googlesource.com/305540 Original-Tested-by: Julius Werner Original-Reviewed-by: Julius Werner Reviewed-on: http://review.coreboot.org/12154 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- 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 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)