Track whether u-boot was warm or cold booted, and implement is_processor_reset

Code which determined whether u-boot on x86 was warm or cold booted (really if
it started at the beginning of the text segment or at the ELF entry point) was
partially implemented, and the result was simply dropped when leaving the
assembly part of initialization. This change completes the implementation,
plumbs the result through to the global data structure, and implements
is_processor_reset to check the value there.

BUG=chrome-os-partner:5252
TEST=Built and did a twostop boot on Alex. The firmware was resigned using the
command below so that the RW firmware would be used. When is_processor_reset
was hardcoded to return true all the time, u-boot would go into recovery mode.
Now it boots successfully.

/resign_firmwarefd.sh  image.bin /tmp/image_new.bin
../../tests/devkeys/firmware_data_key.vbprivk
../../tests/devkeys/firmware.keyblock
../../tests/devkeys/firmware_data_key.vbprivk
../../tests/devkeys/firmware.keyblock
../../tests/devkeys/kernel_subkey.vbpubk 1 0

Change-Id: I22b8ed3c3b472807832f1f7e7724f27a218cf4cf
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: http://gerrit.chromium.org/gerrit/8396
Commit-Ready: Gabe Black <gabeblack@chromium.org>
Reviewed-by: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
1 file changed
tree: 3c65c9eed2aff1c5545ff3decc4a1629c7f447e3
  1. board/
  2. common/
  3. include/
  4. lib/