summaryrefslogtreecommitdiff
path: root/common/cmd_vbexport_test.c
diff options
context:
space:
mode:
authorTom Wai-Hong Tam <waihong@chromium.org>2011-07-15 16:55:21 +0800
committerSimon Glass <sjg@chromium.org>2011-08-29 10:59:02 -0700
commitf4fe2e2dc3cba81df463b21159924b5707ce5607 (patch)
treec1287cac8d23d92841d191971cdcf63775a7190b /common/cmd_vbexport_test.c
parent98660ae72f5916737d389374d0846741ffeff833 (diff)
CHROMIUM: Partially load GBB when needed.
This CL is to make the firmware just load a minimal part of GBB: the header, HWID (required by crossystem data), and rootkey (required by verifying firmware). When VbInit() returns VB_INIT_OUT_ENABLE_DISPLAY, firmware then continues to load the BMP Block. When it returns VB_INIT_OUT_ENABLE_RECOVERY, firmware loads the recovery key. We profiled this change. It totally gains 142ms of boot time on Seaboard. Loads entired GBB in RO normal boot: 2,349,330 bootm_start Loads minimal required part of GBB in RO normal boot: 2,207,288 bootm_start BUG=chromium-os:17700 TEST=build chromeos_seaboard_vboot without error; success to boot normal path; when developer switch on, bmp showed; when recovery button pressed, bmp showed; run "vbexport_test display" to show bmps. Change-Id: I8d1d8b5676505b05328cfea6a1ff35d1048dc131 Reviewed-on: http://gerrit.chromium.org/gerrit/4287 Reviewed-by: Randall Spangler <rspangler@chromium.org> Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Diffstat (limited to 'common/cmd_vbexport_test.c')
-rw-r--r--common/cmd_vbexport_test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/cmd_vbexport_test.c b/common/cmd_vbexport_test.c
index 32baf43452..7da84a0993 100644
--- a/common/cmd_vbexport_test.c
+++ b/common/cmd_vbexport_test.c
@@ -370,6 +370,11 @@ static uint8_t *read_gbb_from_firmware(void)
return NULL;
}
+ if (load_bmpblk_in_gbb(global, &file)) {
+ VbExDebug("Failed to load BMP Block in GBB!\n");
+ return NULL;
+ }
+
if (file.close(&file)) {
VbExDebug("Failed to close firmware device!\n");
}