summaryrefslogtreecommitdiff
path: root/firmware/lib/vboot_audio.c
diff options
context:
space:
mode:
authorJoel Kitching <kitching@google.com>2019-05-21 12:20:38 +0800
committerchrome-bot <chrome-bot@chromium.org>2019-05-28 21:10:45 -0700
commitde2cae6b4d6ae864f2c90e6be73f683bad5f2f2f (patch)
tree023d1581f9054c6a54b9631be45f5277b721a23c /firmware/lib/vboot_audio.c
parent236bfb0bc3bd0aa37bd06702c25993446f9b6dba (diff)
downloadvboot-de2cae6b4d6ae864f2c90e6be73f683bad5f2f2f.tar.gz
vboot: save GBB header in workbuf during firmware verification
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>
Diffstat (limited to 'firmware/lib/vboot_audio.c')
-rw-r--r--firmware/lib/vboot_audio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/lib/vboot_audio.c b/firmware/lib/vboot_audio.c
index e2a2655e..ba0f98c2 100644
--- a/firmware/lib/vboot_audio.c
+++ b/firmware/lib/vboot_audio.c
@@ -25,7 +25,7 @@ static int beep_count; /* Number of beeps so far */
*/
void vb2_audio_start(struct vb2_context *ctx)
{
- struct vb2_shared_data *sd = vb2_get_sd(ctx);
+ struct vb2_gbb_header *gbb = vb2_get_gbb(ctx);
open_time = VbExGetTimer(); /* "zero" starts now */
beep_count = 0;
@@ -34,7 +34,7 @@ void vb2_audio_start(struct vb2_context *ctx)
* Use a short developer screen delay on the first audio if indicated
* by GBB flags.
*/
- if ((sd->gbb_flags & VB2_GBB_FLAG_DEV_SCREEN_SHORT_DELAY) &&
+ if ((gbb->flags & VB2_GBB_FLAG_DEV_SCREEN_SHORT_DELAY) &&
(audio_open_count++ == 0)) {
VB2_DEBUG("vb2_audio_start() - using short dev screen delay\n");
audio_use_short = 1;