summaryrefslogtreecommitdiff
path: root/tests/vb21_host_sig_tests.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Fix license headers to conform with linterJakub Czapiga2022-10-041-1/+1
| | | | | | | | | | | | | BRANCH=none BUG=none TEST=cros lint Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Change-Id: I7710c43c8c70cf257a898f22c42ecbf350e125a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3925702 Commit-Queue: Jakub Czapiga <czapiga@google.com> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org> Tested-by: Jakub Czapiga <czapiga@google.com>
* tests/common/tests.h: rename test_common.h to common/tests.hHsin-Te Yuan2022-07-151-1/+1
| | | | | | | | | | | | | | Create tests/common/ to put some common files. BUG=none BRANCH=none TEST=make runtests Signed-off-by: Hsin-Te Yuan <yuanhsinte@google.com> Change-Id: I8918b7a1e62d47fca6074ef123e2de6f46f1aa00 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3754814 Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
* vboot: move vboot 2.1 functions and structs into host codeJoel Kitching2020-02-111-3/+3
| | | | | | | | | | | | | | | | | | These structs and functions need to stick around for futility to use, but they are no longer supported in firmware code. Rename host/lib21/include/* files to end in 21 instead of 2. BUG=b:124141368, chromium:968464 TEST=make clean && make runtests BRANCH=none Change-Id: I01e181e2f03553d60724fbdc826f5ada63777303 Cq-Depend: chromium:1969172 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1963621 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Commit-Queue: Joel Kitching <kitching@chromium.org>
* vboot: align workbuf to VB2_WORKBUF_ALIGNJoel Kitching2019-11-131-1/+1
| | | | | | | | | | | | | | | Also standardize on position and spacing of __attribute__. BUG=b:124141368 TEST=make clean && make runtests BRANCH=none Change-Id: Ic61d6193c2413824837a51af98eb2dcd9ea4ab85 Signed-off-by: Joel Kitching <kitching@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1902843 Commit-Queue: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
* vboot: save GBB header in workbuf during firmware verificationJoel Kitching2019-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since GBB header will be needed for subsequent GBB reads later on (in kernel verification stage), and since GBB header is relatively small (128 bytes), save the full GBB header onto workbuf during firmware verification stage, and store an offset pointer to it in vb2_shared_data. vb2_gbb_header object may be accessed via the vb2_get_gbb function. Additionally, update functions in firmware/lib/region-init.c to read GBB data from flash, rather than using cparams passed in by depthcharge, which is slated for deprecation. BUG=b:124141368, chromium:954774 TEST=make clean && make runtests BRANCH=none Change-Id: I6e6218231299ce3a5b383663bc3480b20f929840 Signed-off-by: Joel Kitching <kitching@google.com> Cq-Depend: chromium:1585500 Reviewed-on: https://chromium-review.googlesource.com/1627430 Commit-Ready: Joel Kitching <kitching@chromium.org> Tested-by: Joel Kitching <kitching@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Joel Kitching <kitching@chromium.org>
* tests: Fix coverity warningsRandall Spangler2016-09-151-2/+4
| | | | | | | | | | | | | | Assorted minor code issues, which we should fix so any new errors stand out more. BUG=chromium:643769 BRANCH=none TEST=make runtests Change-Id: I927571f8a30794c70228506afe4da3eda86f765b Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/383953 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* vboot: Disambiguate vb2.1 structs and functionsRandall Spangler2016-07-261-28/+28
| | | | | | | | | | | | | | | | | | | | | | | Futility needs to link against both vboot1/vboot2.0 and vboot2.1 functions. This was easy in the past because it did (vboot1 + vboot2.1) and there's no overlap. In replacing vboot1 function calls and structs with vboot2.0, now there are symbol collisions between vboot2.0 and vboot2.1. For example, both of them use a struct called vb2_signature, but the structs are defined differently. Functions which operate on those structs also overload. Rename the vb2.1 structs to start with vb21_ instead of vb2_. Do the same for vb2.1 functions which operate on vb2.1 data. BUG=chromium:611535 BRANCH=none TEST=make runtests Change-Id: I24defd87cbd9ef64239faf1a8e98ab2372d27539 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/347458 Reviewed-by: Daisuke Nojiri <dnojiri@google.com>
* vb21: Rename struct vb2_guid to struct vb2_idBill Richardson2015-03-101-4/+4
| | | | | | | | | | | | | | Since the ID structure isn't a true GUID anymore, let's call it something else. BUG=none BRANCH=none TEST=make runtests Change-Id: I96f511bd5587a94d2cc20764e26d7ef0096de04c Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/256182 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* vboot2: fix alignment issues on 32-bit architecturesBill Richardson2015-01-281-1/+2
| | | | | | | | | | | | | | | | | | We were assuming 8-byte alignment for buffers. That's not true on 32-bit architectures. We should make the alignment requirements explicit (and correct) for all architectures. BUG=chromium:452179 BRANCH=ToT CQ-DEPEND=CL:243380 TEST=manual USE=vboot2 FEATURES=test emerge-x86-alex vboot_reference Change-Id: I120f23e9c5312d7c21ff9ebb6eea2bac1e430e37 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/243362 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* vboot2: Get rid of extra '2' at end of new struct namesRandall Spangler2014-12-051-9/+9
| | | | | | | | | | | | | | | | | | | | Now that lib20 and lib21 are distinct, they can have overlapping struct names. This will be cleaner in the long run, since vboot 2.0 (lib20) is just a temporary stepping stone to vboot 2.1 (lib21). It would be a shame to need to carry around the overhead of that extra digit forever. No functional changes, just a lot of renaming. BUG=chromium:423882 BRANCH=none TEST=make runtests && VBOOT2=1 make runtests (works with/withoug VBOOT2 flag) And compile firmware for veyron_pinky Change-Id: I25f348fd31e32d08ca576836dfdd1278828765a1 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/233183 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* vboot2: Move knowledge of vboot 2.1 data structures inside lib21/Randall Spangler2014-12-041-0/+196
Code which compiles against fwlib2 no longer knows or cares about the new data structures. This should shrink fwlib2 a bit. This is part 3 of 4 changes which split vboot 2.0 struct handling (old vboot1 structs) from vboot 2.1 struct handling (new style structs). No functional changes; just shuffling around code. BUG=chromium:423882 BRANCH=none TEST=make runtests && VBOOT2=1 make runtests (works with/withoug VBOOT2 flag) And compile firmware for veyron_pinky. Change-Id: Ibccd7d1974e07f38b90c19c924ef3b1ffcb77d62 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/233020 Reviewed-by: Bill Richardson <wfrichar@chromium.org>