Commit Graph

7 Commits

Author SHA1 Message Date
Randall Spangler
49e517d818 vboot: use vb2_safe_memcmp instead of SafeMemcmp
No need to have two implementations of this now.

BUG=chromium:611535
BRANCH=none
TEST=make runtests; emerge-kevin coreboot depthcharge

Change-Id: I18bac928eb09971c37f3e1d7cbfd2009999b1f31
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/400899
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2016-10-29 00:57:07 +00:00
Bill Richardson
0c3ba249ab Massive refactoring of external header files.
This reduces the number of exported header files to the minimum needed by
the existing userspace utilities and firmware implementations.

BUG=chromium:221544
BRANCH=none
TEST=manual, trybots
CQ-DEPEND=CL:47019,CL:47022,CL:47023

  sudo FEATURES=test emerge vboot_reference
  FEATURES=test emerge-$BOARD \
                vboot_reference \
                chromeos-cryptohome \
                chromeos-installer \
                chromeos-u-boot \
                peach-u-boot \
                depthcharge

Change-Id: I2946cc2dbaf5459a6c5eca92ca57d546498e6d85
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47021
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2013-04-02 14:12:52 -07:00
Gabe Black
ac8805e7e9 Get rid of some crufty macros.
These were macros that were never used, or that were only set to one thing and
could be substituted up front.

I left in code guarded by the HAVE_ENDIAN_H and HAVE_LITTLE_ENDIAN macros even
though those are never defined because they guard a reportedly significantly
faster implementation of some functionality, at least according to a comment
in the source. It would be a good idea to enable that code path and see if it
really does make a big difference before removing it entirely.

BUG=None
TEST=Built for Link, Daisy, and the host with FEATURES=test. Built depthcharge
for Link and booted in normal mode.
BRANCH=None

Change-Id: I934a4dd0da169ac018ba07350d56924ab88b1acc
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/45687
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
2013-03-19 16:55:44 -07:00
Stefan Reinauer
66264b5d97 Move Memset from vboot_reference to vbexport/u-boot
All memory operations (except the "safe ones") live in the firmware
so the fast operations can be used. Except Memset. This CL changes that
problem.

This CL needs https://gerrit.chromium.org/gerrit/#change,10992 and a
similar change in H2C.

BUG=chrome-os-partner:6313
TEST=run coreboot/u-boot on Stumpy

Change-Id: Ic961ebbb45470c8fc1316490b902759dcf221deb
Reviewed-on: https://gerrit.chromium.org/gerrit/10993
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2011-11-02 12:59:54 -07:00
Randall Spangler
f02bbb4635 Add tests for utility.h and sysincludes.h macros
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: Id0a834c2b234d5f9cbbb37a69426e2b97c734d0a
Reviewed-on: http://gerrit.chromium.org/gerrit/6608
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-24 14:38:02 -07:00
Randall Spangler
1f5d53f7bd Add tests for vboot_reference stateful_util.c
BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: I5d55be2dfead0c5d7af72841cbd6c65485685cd6
Reviewed-on: http://gerrit.chromium.org/gerrit/6596
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-24 13:50:51 -07:00
Randall Spangler
a3454fcaa4 Add unit tests for utility.c
Also fixes returned value from Memset().  And SafeMemcmp() should
return 0 (equal) if comparing 0 bytes, to match the behavior of memcmp().

BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: Id43e70eecf04815216e1fd952271af35e0a66396
Reviewed-on: http://gerrit.chromium.org/gerrit/6539
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
2011-08-23 15:30:59 -07:00