mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-24 18:25:10 +00:00
vboot2: Get rid of extra '2' at end of new struct names
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>
This commit is contained in:
committed by
chrome-internal-fetch
parent
6f1b82ac14
commit
308d254092
@@ -16,19 +16,19 @@
|
||||
#include "2rsa.h"
|
||||
#include "vb2_common.h"
|
||||
|
||||
int vb2api_fw_phase3_2(struct vb2_context *ctx)
|
||||
int vb2api_fw_phase3(struct vb2_context *ctx)
|
||||
{
|
||||
int rv;
|
||||
|
||||
/* Verify firmware keyblock */
|
||||
rv = vb2_load_fw_keyblock2(ctx);
|
||||
rv = vb2_load_fw_keyblock(ctx);
|
||||
if (rv) {
|
||||
vb2_fail(ctx, VB2_RECOVERY_RO_INVALID_RW, rv);
|
||||
return rv;
|
||||
}
|
||||
|
||||
/* Verify firmware preamble */
|
||||
rv = vb2_load_fw_preamble2(ctx);
|
||||
rv = vb2_load_fw_preamble(ctx);
|
||||
if (rv) {
|
||||
vb2_fail(ctx, VB2_RECOVERY_RO_INVALID_RW, rv);
|
||||
return rv;
|
||||
@@ -42,8 +42,8 @@ int vb2api_init_hash2(struct vb2_context *ctx,
|
||||
uint32_t *size)
|
||||
{
|
||||
struct vb2_shared_data *sd = vb2_get_sd(ctx);
|
||||
const struct vb2_fw_preamble2 *pre;
|
||||
const struct vb2_signature2 *sig = NULL;
|
||||
const struct vb2_fw_preamble *pre;
|
||||
const struct vb2_signature *sig = NULL;
|
||||
struct vb2_digest_context *dc;
|
||||
struct vb2_workbuf wb;
|
||||
uint32_t hash_offset;
|
||||
@@ -54,13 +54,13 @@ int vb2api_init_hash2(struct vb2_context *ctx,
|
||||
/* Get preamble pointer */
|
||||
if (!sd->workbuf_preamble_size)
|
||||
return VB2_ERROR_API_INIT_HASH_PREAMBLE;
|
||||
pre = (const struct vb2_fw_preamble2 *)
|
||||
pre = (const struct vb2_fw_preamble *)
|
||||
(ctx->workbuf + sd->workbuf_preamble_offset);
|
||||
|
||||
/* Find the matching signature */
|
||||
hash_offset = pre->hash_offset;
|
||||
for (i = 0; i < pre->hash_count; i++) {
|
||||
sig = (const struct vb2_signature2 *)
|
||||
sig = (const struct vb2_signature *)
|
||||
((uint8_t *)pre + hash_offset);
|
||||
|
||||
if (!memcmp(guid, &sig->guid, sizeof(*guid)))
|
||||
@@ -96,7 +96,7 @@ int vb2api_init_hash2(struct vb2_context *ctx,
|
||||
return vb2_digest_init(dc, sig->hash_alg);
|
||||
}
|
||||
|
||||
int vb2api_check_hash2(struct vb2_context *ctx)
|
||||
int vb2api_check_hash(struct vb2_context *ctx)
|
||||
{
|
||||
struct vb2_shared_data *sd = vb2_get_sd(ctx);
|
||||
struct vb2_digest_context *dc = (struct vb2_digest_context *)
|
||||
@@ -106,7 +106,7 @@ int vb2api_check_hash2(struct vb2_context *ctx)
|
||||
uint8_t *digest;
|
||||
uint32_t digest_size = vb2_digest_size(dc->hash_alg);
|
||||
|
||||
const struct vb2_signature2 *sig;
|
||||
const struct vb2_signature *sig;
|
||||
|
||||
int rv;
|
||||
|
||||
@@ -115,7 +115,7 @@ int vb2api_check_hash2(struct vb2_context *ctx)
|
||||
/* Get signature pointer */
|
||||
if (!sd->hash_tag)
|
||||
return VB2_ERROR_API_CHECK_HASH_TAG;
|
||||
sig = (const struct vb2_signature2 *)(ctx->workbuf + sd->hash_tag);
|
||||
sig = (const struct vb2_signature *)(ctx->workbuf + sd->hash_tag);
|
||||
|
||||
/* Must have initialized hash digest work area */
|
||||
if (!sd->workbuf_hash_size)
|
||||
|
||||
Reference in New Issue
Block a user