diff options
author | Joel Kitching <kitching@google.com> | 2019-05-23 15:33:54 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-06-07 22:40:03 +0000 |
commit | 3eb00efa4eb30e02d1b3197dafc5975fdcbe5914 (patch) | |
tree | a60cece3b500976279a32bb7e71d4ba993d4400e /firmware/include | |
parent | 96d5a58cbe65d762c64dc0e8f5ecc7af397015a4 (diff) | |
download | vboot-3eb00efa4eb30e02d1b3197dafc5975fdcbe5914.tar.gz |
vboot: rewrite GBB functions and API
Old vboot1-style GBB accessor functions were awkwardly located
within region-init.c.
Rewrite GBB accessor functions for vboot2, and formally expose
HWID retrieval function via vboot2 API. workbuf is used for
key retrieval functions, while a buffer provided by the caller
is used for HWID retrieval function.
Reintroduce vboot_display_tests to `make runtests` test suite.
Move GBB tests from vboot_display_tests to vb2_gbb_tests.
Properly propagate vb2_workbuf objects within the function call
stack (vb2_load_partition).
BUG=b:124141368, chromium:954774
TEST=Build and flash to eve, check that Chrome OS boots
TEST=Build with CL:1627469 applied, check HWID
TEST=make clean && make runtests
BRANCH=none
Change-Id: I398d1329f0b092de35aac73d98dfd9aee6e4e7de
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1584488
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Jason Clinton <jclinton@chromium.org>
Diffstat (limited to 'firmware/include')
-rw-r--r-- | firmware/include/gbb_access.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/firmware/include/gbb_access.h b/firmware/include/gbb_access.h deleted file mode 100644 index 09a88fa0..00000000 --- a/firmware/include/gbb_access.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - * - * Access to portions of the GBB using the region API. - */ - -#ifndef VBOOT_REFERENCE_GBB_ACCESS_H_ -#define VBOOT_REFERENCE_GBB_ACCESS_H_ - -#include "vboot_api.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -struct vb2_context; -struct VbPublicKey; - -/** - * Read the root key from the GBB - * - * @param ctx Vboot context - * @param keyp Returns a pointer to the key. The caller must call - * free() on the key when finished with it. - * @return VBERROR_... error, VBERROR_SUCCESS on success, - */ -VbError_t VbGbbReadRootKey(struct vb2_context *ctx, - struct VbPublicKey **keyp); - -/** - * Read the recovery key from the GBB - * - * @param ctx Vboot context - * @param keyp Returns a pointer to the key. The caller must call - * free() on the key when finished with it. - * @return VBERROR_... error, VBERROR_SUCCESS on success, - */ -VbError_t VbGbbReadRecoveryKey(struct vb2_context *ctx, - struct VbPublicKey **keyp); - -/** - * Read the hardware ID from the GBB - * - * @param ctx Vboot context - * @param hwid Place to put HWID, which will be null-terminated - * @param max_size Maximum size of HWID including terminated null - * character (suggest 256). If this size is too small - * then VBERROR_INVALID_PARAMETER is returned. - * @return VBERROR_... error, VBERROR_SUCCESS on success, - */ -VbError_t VbGbbReadHWID(struct vb2_context *ctx, char *hwid, uint32_t max_size); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif |