History log of /external/vboot_reference/firmware/2lib/2nvstorage.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
32138f9d4c143bc0858d32e3a7a7b30ff5655212 13-Jan-2015 Randall Spangler <rspangler@chromium.org> vboot2: Split NV storage field defintions into their own header

And include it in vb2_api.h if VB20 internals are needed.

This allows coreboot to get at the fields more cleanly for now, rather
than duplicating the field definitions. In the long run, we should
have APIs for this rather than having coreboot peek at the bits
directly.

BUG=none
BRANCH=none
TEST=emerge-veyron_pinky coreboot && make -j runtests

Change-Id: Ic308c3470773b91191bf682ff1b3cfce8864d26a
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/240285
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2nvstorage.c
782300d093a2fbf2ca24e446fb6d65f9f28e56a6 23-Sep-2014 Randall Spangler <rspangler@chromium.org> vboot2: Add previously tried slot and result to NV storage

This gives recovery mode information on two boots back instead of one,
which may be handy for debugging.

It also allows determining whether a failure of the current boot
should try the other slot or go to recovery, using only information
stored in NV storage.

Added crossystem support for printing the fields, and unit tests.

BUG=chrome-os-partner:32585
BRANCH=none
TEST=make runtests; VBOOT2=1 make runtests

Change-Id: Ia9f4186210d30217b902db7c513ae4ab8851f8f4
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/221230
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
/external/vboot_reference/firmware/2lib/2nvstorage.c
9e1da784487fb8cfbe4e76693e07205b66675bda 25-Jun-2014 Randall Spangler <rspangler@chromium.org> Add nvstorage / crossystem support for new vboot2 fields

This allows testing vboot2. These fields are ignored by original
vboot firmware.

BUG=chromium:370082
BRANCH=none
TEST=manual
crossystem -> fw_tried=A, fw_result=unknown, fw_try_next=A

crossystem fw_tried=B
echo $? -> 1
crossystem -> fw_tried=A, fw_result=unknown, fw_try_next=A

crossystem fw_try_next=B
crossystem -> fw_tried=A, fw_result=unknown, fw_try_next=B
crossystem fw_try_next=beats_me
echo $? -> 1
crossystem -> fw_tried=A, fw_result=unknown, fw_try_next=B
crossystem fw_try_next=A
crossystem -> fw_tried=A, fw_result=unknown, fw_try_next=A

crossystem fw_result=trying
crossystem -> fw_tried=A, fw_result=trying, fw_try_next=A
crossystem fw_result=bupkis
echo $? -> 1
crossystem -> fw_tried=A, fw_result=trying, fw_try_next=A
crossystem fw_result=success
crossystem -> fw_tried=A, fw_result=success, fw_try_next=A
crossystem fw_result=failure
crossystem -> fw_tried=A, fw_result=failure, fw_try_next=A
crossystem fw_result=unknown
crossystem -> fw_tried=A, fw_result=unknown, fw_try_next=A

crossystem -> fw_try_count = 0, fwb_tries = 0
crossystem fw_try_count=6
crossystem -> fw_try_count = 6, fwb_tries = 6
crossystem fwb_tries=0
crossystem -> fw_try_count = 0, fwb_tries = 0

Change-Id: I1532f3384f8c05de2a7ff3f35abcc35d18049491
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/205475
/external/vboot_reference/firmware/2lib/2nvstorage.c
8de992c441e36453a5a08bcf7c2462835007f81e 24-Jun-2014 Randall Spangler <rspangler@chromium.org> vboot2: fix overloaded NV bit

Bill and I both added meanings for byte 1 bit 0x10. His changed
(NV_BOOT_BACKUP_NVRAM) landed first, so move the vboot2 bit to byte 2.

BUG=chromium:370082
BRANCH=none
TEST=make clean && VBOOT2=1 make runtests

Change-Id: Ib7ff8da47d03f91cbeb729ca517c6315dfb4e6ac
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/205408
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2nvstorage.c
b9be53640efdee92b1b42e60adda274563236301 05-Jun-2014 Randall Spangler <rspangler@chromium.org> vboot2: Use more specific error codes

Error codes reported by the crypto and storage APIs are now very
specific, and tests verify the proper errors are reported.

More specific error codes coming to other files next, but I don't want
this CL to get too long.

This also changes test_common.c so TEST_EQ() reports mismatched values
in both decimal and hex, and adds TEST_SUCC() to test for a successful
return value.

BUG=chromium:370082
BRANCH=none
TEST=make clean && VBOOT2=1 COV=1 make

Change-Id: I255c8e5769284fbc286b9d94631b19677a71cdd0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/202778
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2nvstorage.c
3333e578497aafc4eb8c6e1e359f6e2b1dee633a 14-May-2014 Randall Spangler <rspangler@chromium.org> vboot2: Add nvstorage and secdata functions

This is the second of several CLs adding a more memory- and
code-efficient firmware verification library.

BUG=chromium:370082
BRANCH=none
TEST=make clean && COV=1 make

Change-Id: I1dd571e7511bff18469707d5a2e90068e68e0d6f
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/199841
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
/external/vboot_reference/firmware/2lib/2nvstorage.c