bdb: Add vba_bdb_init
authorDaisuke Nojiri <dnojiri@chromium.org>
Wed, 4 May 2016 21:55:57 +0000 (14:55 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Sat, 7 May 2016 10:32:47 +0000 (03:32 -0700)
commit85dbb3442011e6d5b69da54c46f11d59c9172784
treea722d6a20b82ee22eec8b1ce295f116d281404a8
parent8917b808ce4b4cda9b8e52c7ff8bb04e7836479b
bdb: Add vba_bdb_init

vba_bdb_init initializes the vboot context and decides what to do next
based on the vboot register content. Possible actions are:
1. proceed to verify the current slot
2. reset to try the other slot
3. reset to recovery mode

bdb_sprw_test demonstrates these actions.

BUG=chrome-os-partner:51907
BRANCH=tot
TEST=make runtests

Change-Id: If72cdd575d09b9162a871f088064ca853b7fd74d
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/342604
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Makefile
firmware/bdb/bdb.h
firmware/bdb/bdb_api.h [new file with mode: 0644]
firmware/bdb/misc.c [new file with mode: 0644]
firmware/bdb/stub.c [new file with mode: 0644]
tests/bdb_sprw_test.c [new file with mode: 0644]