diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2014-06-24 12:26:39 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-06-25 01:31:51 +0000 |
commit | fc17308c39d23fe64959854dc5a858429b37539f (patch) | |
tree | f11b062edbae88672514949e5165afd52b8ca184 /firmware/2lib/include/2misc.h | |
parent | 25c95d0774b122c28276251961d7cbe9b6f34d41 (diff) | |
download | vboot-fc17308c39d23fe64959854dc5a858429b37539f.tar.gz |
vboot2: Scramble the GBB magic number
Compiling in the GBB magic number as is causes any tools that search for the
number to fail. This patch allows firmware to embed XOR'ed signature.
TEST=Booted Nyan in normal mode. FAFT:firmware_DevMode passes.
BUG=none
BRANCH=none
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: Id18905a9969af3db24151e7c51332d0e94405108
Reviewed-on: https://chromium-review.googlesource.com/205416
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'firmware/2lib/include/2misc.h')
-rw-r--r-- | firmware/2lib/include/2misc.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/firmware/2lib/include/2misc.h b/firmware/2lib/include/2misc.h index d90399a4..d6f48e86 100644 --- a/firmware/2lib/include/2misc.h +++ b/firmware/2lib/include/2misc.h @@ -23,6 +23,14 @@ static __inline struct vb2_shared_data *vb2_get_sd(struct vb2_context *ctx) { } /** + * Validate gbb signature (the magic number) + * + * @param sig pointer to the signature bytes to validate + * @return VB2_SUCCESS if valid or VB2_ERROR_GBB_MAGIC otherwise. + */ +int vb2_validate_gbb_signature(uint8_t *sig); + +/** * Initialize a work buffer from the vboot context. * * This sets the work buffer to the unused portion of the context work buffer. |