Vboot wrapper - add recovery reason, refactor timing

Pressing Tab at a firmware screen now displays real data, including
the recovery reason, HWID, and contents of VbNvStorage.

Entry point start/end time tracking in VbSharedData now refers to the
new wrapper APIs.

Added capability for calling firmware to request recovery mode (for
example, if it's unable to initialize RAM, can't find the SSD, etc.).
Previously, calling firmware had no (good) way to do this other than
faking the recovery button being pressed.

BUG=chromium-os:17018
TEST=emerge on x86 and tegra2_seaboard

Change-Id: I7d377f279842b30a10d945d13571c41c464633f1
Reviewed-on: http://gerrit.chromium.org/gerrit/3814
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
Randall Spangler
2011-07-08 14:01:54 -07:00
parent 1b1998dff0
commit 9619112a57
10 changed files with 175 additions and 180 deletions

View File

@@ -280,14 +280,17 @@ typedef struct VbSharedDataHeader {
uint64_t kernel_subkey_data_size; /* Size of kernel subkey data */
/* Timer values from VbExGetTimer(). Unused values are set to 0.
* If a function is called mutiple times, these are the times from
* the most recent call. See crosbug.com/17018. */
uint64_t timer_load_firmware_start_enter; /* VbInit() - enter */
uint64_t timer_load_firmware_start_exit; /* VbInit() - exit */
uint64_t timer_load_firmware_enter; /* LoadFirmware() - enter */
uint64_t timer_load_firmware_exit; /* LoadFirmware() - exit */
uint64_t timer_load_kernel_enter; /* LoadKernel() - enter */
uint64_t timer_load_kernel_exit; /* LoadKernel() - exit */
* Note that these are now the enter/exit times for the wrapper API entry
* points; see crosbug.com/17018. */
/* VbInit() enter/exit */
uint64_t timer_vb_init_enter;
uint64_t timer_vb_init_exit;
/* VbSelectFirmware() enter/exit */
uint64_t timer_vb_select_firmware_enter;
uint64_t timer_vb_select_firmware_exit;
/* VbSelectAndLoadKernel() enter/exit */
uint64_t timer_vb_select_and_load_kernel_enter;
uint64_t timer_vb_select_and_load_kernel_exit;
/* Information stored in TPM, as retrieved by firmware */
uint32_t fw_version_tpm; /* Current firmware version in TPM */