| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CL:1877066 introduced shared data status VB2_SD_STATUS_EC_SYNC_COMPLETE,
but incorrectly saved it in shared data flags.
BRANCH=hatch
BUG=chromium:1057517
TEST=make runtests
Change-Id: Idc993304760c419f80c6b160b30763142cf47234
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2082756
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Error codes are renamed as follows:
VBERROR_INVALID_BMPFV
--> VB2_ERROR_UI_INVALID_ARCHIVE
VBERROR_NO_IMAGE_PRESENT
--> VB2_ERROR_UI_MISSING_IMAGE
Also remove unnecessary paddings 0x1000 for UI errors.
BRANCH=none
BUG=b:124141368, chromium:988410
TEST=emerge-nami depthcharge
Cq-Depend: chromium:2082833
Change-Id: I8b7743d9ceecde6c9e3e88109422a99594ad6aab
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2082759
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the name is somewhat inaccurate, and since we want to make
it slightly clearer that it should not be used, remove
NEED_VB20_INTERNALS in favour of directly using a separate header
file. The new header file is called vb2_internals_please_do_not_use.h.
BUG=b:124141368, chromium:957880
TEST=make clean && make runtests
BRANCH=none
Change-Id: Icf67eed2d9ae3448387f6c1fbae1501ff6fa5d52
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2055601
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:124141368
TEST=make clean && make runtests
BRANCH=none
Change-Id: I48b390be1d7d9d4e17caddb883eed6eda3bd4ae6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2073212
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It only needs to contain VbSharedDataHeader definition, and it
can be made private to vboot_reference now.
Move kernel verification-related structs to vboot_kernel.h.
Also, since the related constants VBSD_LF_CHECK_* are being
removed in this CL, deprecate the RO_INVALID_RW_CHECK_MIN
recovery reason, which was originally dismantled in CL:1863624.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ie6937cda6c3ba987031ba770ec9f1fb0ffa9cf3a
Cq-Depend: chromium:2070292, chromium:2073461, chrome-internal:2634199
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2066302
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
VbSelectAndLoadKernel no longer takes a vboot1-style VBSD data
structure. Conversion of vboot 2->1 data structure is moved
into an API function called vb2api_export_vbsd() for use by
depthcharge. VbSharedDataHeader type is now opaque to the
caller, and only a raw data buffer is exposed.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: Id11f663f6e3296e947c519581d428b0c8fb60be5
Cq-Depend: chromium:2056343
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2054270
Reviewed-by: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A newer clang version has an optimization that is breaking
vboot_reference unit tests. The root cause appears to be:
Many functions inside unit tests are supposed to override
the functions defined in the main library but the main
library functions are not defined as weak.
Fix by marking some of the overridden function by
test_mockable which is already used for some of the functions.
This is similar to a prior bug 723906 where unit tests
were broken after binutils upgrade.
BUG=chromium:1055151
TEST=unit tests passed with ToT clang
Change-Id: Ib9f16e1af59632b6a82411656ebba75e26b5d211
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2069806
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only purpose of this function is to get the physical presence
switch. Rename it appropriately, and migrate function header
into 2api.h.
BUG=b:124141368, chromium:1035761
TEST=Build locally
BRANCH=none
Change-Id: Ice3e3a362ca2d2e3aa18c60a129f67d5139daf04
Cq-Depend: chromium:2069629
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2069628
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CL:2044954 moved clear recovery request into vboot_api_kernel.
We'd like to leave the subcode so that we can pipe it through
as a UMA statistic. But it's breaking FAFT at the moment.
Unconditionally clear it until we have a more detailed design.
BUG=b:124141368, b:35576380
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ib90c746779ca58e0d0100bb0b42a29c2b5a100dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2063198
Reviewed-by: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: EricR Lai <ericr_lai@compal.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate to using vboot2 shared data fields for storing
kernel rollback versions:
kernel_version_tpm_start(1) --> kernel_version_secdata(2)
kernel_version_tpm(1) --> kernel_version(2)
kernel_version_lowest(1) --> [removed]
Also remove VBSD from tests which no longer need it.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: I26c2ccede5fba52e1477b625ef5fc6181f60aadf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2053179
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of go/vboot2-oprom-cleanup, VB2_NV_OPROM_NEEDED was
renamed to VB2_NV_DISPLAY_REQUEST. Remove the old name since
it is no longer in use.
BUG=b:124141368, b:124192753, chromium:948529
TEST=make clean && make runtests
BRANCH=none
Change-Id: I72fb652043936f310e595eacadf6ad3f911187b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2059505
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Under normal circumstances, data should be committed by
depthcharge after execution flow leaves VbSelectAndLoadKernel
API call.
Since depthcharge needs to be able to respond with the
appropriate vb2api_fail call for specific data commit
errors anyways, this logic is moved directly into
vb2ex_commit_data in CL:2053765.
Remove the vb2_commit_data wrapper as was originally
intended. vboot code may now directly call
vb2ex_commit_data and depend on depthcharge to call
vb2api_fail appropriately.
BUG=b:124141368, chromium:972956, chromium:1006689
TEST=make clean && make runtests
BRANCH=none
Change-Id: I55bdb3274210869d4ad1411837b6ef6c579dccad
Cq-Depend: chromium:2053765
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2037906
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create vb2_internals_please_do_not_use.h to replace
NEED_VB20_INTERNALS.
NEED_VB20_INTERNALS will be removed in a separate
commit in order to give coreboot code a chance to
switch over to using the new header file.
BUG=b:124141368, chromium:957880
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ide3f69d45e4ebbd2b12d03ccffd1e3d8bb68aa5f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2055600
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This API function should be used rather than directly
accessing vb2_shared_data.recovery_reason.
BUG=b:124141368, chromium:1038260, chromium:957880
TEST=make clean && make runtests
BRANCH=none
Change-Id: I92c8f9a654400be69885a691b39c4b9e4e2031c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2055662
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add debug information to vboot_display:
- vb2_context.flags
- vb2_shared_data.flags
- vb2_shared_data.status
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: I641f5a5cac041d0b9aac580e3216fb4153369fa7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2055661
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since CL:1651221, the vb2_packed_key "kernel_subkey" field
in VbSharedDataHeader is no longer used. Replace the field
with a reserved field of the same size, so that we can remove
the awkward relative 2struct.h header include.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ic755ae102cd3928f1dbec8f1e76f723a4411c2a4
Cq-Depend: chrome-internal:2576432
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2054269
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the specific recovery reason is not needed, just use
(ctx->flags & VB2_CONTEXT_RECOVERY_MODE) to determine whether
or not we are in recovery mode.
BUG=b:124141368
TEST=make clean && make runtests
BRANCH=none
Change-Id: I37f1bc066d970a51dfd7ef38cba519c00e1e764f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2053252
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since CL:1651221, the kernel subkey is stored in vb2_shared_data
and vboot2 workbuf. Update vboot_display.c to read from this
location accordingly.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: Id287ff595bc394d23837e946c0f711b79d2f19ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2051892
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stop setting mode flags (developer or recovery)
in VbSelectAndLoadKernel; this has already been
done in firmware verification.
BUG=b:124141368, chromium:994060
TEST=make clean && make runtests
BRANCH=none
Change-Id: I659f406e0182f809ad46c92a2597b05f685d45dd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2054265
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a function-local copy of VbSharedDataKernelCall rather
than using the memory built-in to VBSD. Stop making any
reference to vboot1 VBSD from LoadKernel.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: I5dabfb33a0eb05c1f40509dcf00a4c5751af1ef5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2053182
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use vboot2 variant VB2_SD_FLAG_KERNEL_SIGNED instead of
vboot1 VBSD flag VBSD_KERNEL_KEY_VERIFIED. Export the
flag back to vboot1 at the end of VBSLK.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ie7516195b95a9ef2ca254616c9486991b1a418fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2053181
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CL:1940398 brought us towards the goal of deferring clearing
recovery requests until kernel verification stage. However,
now we are modifying recovery requests from multiple locations
in kernel verification code -- namely, also on the BROKEN screen
in UI code.
Integrate the logic into a function called vb2_clear_recovery to
be called from VbSelectAndLoadKernel.
Add tests to ensure that recovery requests get properly updated
*before* entering the UI.
BUG=b:124141368, b:35576380
TEST=make clean && make runtests
BRANCH=none
Change-Id: I5b0f4f7556c045ccc0d0739acc2668905a2a93e9
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2044954
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes the old check for developer keys from the firmware
verification path and instead inserts a similar (but faster) check into
vb2api_kernel_phase1(). This has the advantage that we can export the
check function to the calling firmware which could use it to display
this information in a more user-visible manner.
BRANCH=None
BUG=None
TEST=Booted in normal and recovery mode with developer keys, confirmed
they were recognized.
Change-Id: I00af0d10e31b2789574c8e4f1875ccd8d01eb0d5
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2038245
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to crbug.com/1033815, rename files and entry point functions
for two legacy UIs. Ideally, these UIs will be deprecated after the
detachable UI revamp (b:146399181) is done.
common:
- rename vboot_ui_common.{c,h} to vboot_ui_legacy_common.{c,h}
LEGACY_CLAMSHELL_UI:
- rename vboot_ui.c to vboot_ui_legacy_clamshell.c
- rename vboot_ui_wilco.c to vboot_ui_legacy_wilco.c
- rename VbBootRecovery() to VbBootRecoveryLegacyClamshell()
- rename VbBootDiagnostic() to VbBootDiagnosticLegacyClamshell()
- rename VbBootDeveloper() to VbBootDeveloperLegacyClamshell()
LEGACY_MENU_UI:
- rename vboot_ui_menu.c to vboot_ui_legacy_menu.c
- rename vboot_ui_menu_private.h to vboot_ui_legacy_menu_private.h
- rename VbBootRecoveryMenu() to VbBootRecoveryLegacyMenu()
- rename VbBootDeveloperMenu() to VbBootDeveloperLegacyMenu()
BRANCH=none
BUG=b:146399181,chromium:1033815
TEST=USE="legacy_clamshell_ui" emerge-nami vboot_reference
TEST=USE="legacy_menu_ui" emerge-nami vboot_reference
Change-Id: I70dafbab0070b19ed963d2a4ba63a95f4a0f3224
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2008980
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After introducing VB2_DIE() recently, practical use has shown that we
pretty much always want to check for recovery mode first, and avoid a
hard abort in that case. This patch introduces a very similar macro that
includes that extra check so we don't have to open-code it all over the
place.
BRANCH=None
BUG=None
TEST=make runtests
Change-Id: I16e744859ba7a5c68269e06c7e7d071f3bfae67e
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2038244
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These structs and functions need to stick around for futility
to use, but they are no longer supported in firmware code.
Rename host/lib21/include/* files to end in 21 instead of 2.
BUG=b:124141368, chromium:968464
TEST=make clean && make runtests
BRANCH=none
Change-Id: I01e181e2f03553d60724fbdc826f5ada63777303
Cq-Depend: chromium:1969172
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1963621
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only keep vboot 2.1 code that futility uses.
BUG=b:124141368, chromium:968464
TEST=make clean && make runtests
BRANCH=none
Change-Id: Iee45d7a0f7c6a6d4b27997b2eff3117a12a48dcf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1961715
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify logic for new vendor data configuration workflow.
Current workflow contains little to no instruction for
navigating vendor data workflow. UI is generally very scarce.
New workflow aims to provide more instruction on how to proceed to
next steps, escape from the workflow and boot normally, and
a new YES/NO selection screen during the final confirmation
phase of the workflow.
BUG=b:138812835
BRANCH=none
TEST=emerge-sarien depthcharge, chromeos-bootimage, flash firmware image
on Sarien
and test workflow
Cq-Depend: chromium:1925665, chrome-internal:2180149
Change-Id: I3d7081f348a7dd68d10d1eba4879a359ccbdd6e5
Signed-off-by: Pranay Shoroff <pshoroff@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1926508
Commit-Queue: Mathew King <mathewk@chromium.org>
Tested-by: Mathew King <mathewk@chromium.org>
Reviewed-by: Mathew King <mathewk@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When developer mode is disabled by the VB2_SECDATA_FWMP_DEV_DISABLE_BOOT
flag, the error message will be redrawn per 20 ms even if no key is
pressed. This patch reduces unnecessary redraw by moving the drawing
inside enter_to_norm_menu(), which will be called only when changing
screens.
BRANCH=kukui
BUG=chromium:1048094,chromium:1049029
TEST=emerge-nami vboot_reference
Cq-Depend: chromium:2040844
Change-Id: I0e892086b25fc94800534c5a37bcab8b70a5fcd9
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2035056
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vb2api_kernel_phase1 was previously written to read the GBB
headers, locate the recovery key, and then load it. GBB headers
are now saved directly on workbuf in firmware phase. Simply use
the vb2_gbb_read_recovery_key function to retrieve the key.
Update LoadKernel to read kernel subkey from vboot2 workbuf.
Update tests/verify_kernel.c to write subkey to vboot2 workbuf.
BUG=b:124141368, chromium:954774, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ia85013da34bdab68bf486014a3401d48c95b3472
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1651221
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of clearing recovery requests early on in firmware
verification, defer this task until kernel verification has
begun.
If the system is rebooted for any non-vboot-related reason when
entering recovery mode (e.g. FSP initialization), the recovery
request will still be available in nvdata.
Additionally, relocate the reboot triggered by memory training
into VbSelectAndLoadKernel.
BUG=b:124141368, b:35576380
TEST=make clean && make runtests
BRANCH=none
Change-Id: I787e45c7ed4f2bebf570bb9c1a8e9e371f2a040b
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1940398
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=none
TEST=none
Change-Id: I04e0151655a9331750f5f5becfae2638c8e3ed17
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2037146
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the compile time constant PHYSICAL_PRESENCE_KEYBOARD passed
(CL:2004267), replace the usage of the flag VBSD_BOOT_REC_SWITCH_VIRTUAL
with PHYSICAL_PRESENCE_KEYBOARD. Also deprecate
VBSD_BOOT_REC_SWITCH_VIRTUAL because it is no longer needed.
BRANCH=none
BUG=chromium:1038259, chromium:943150
TEST=make runtests
Cq-Depend: chromium:2004267
Change-Id: I091825cf1367571bb50dec84dda6e44ed4d2bb19
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2037269
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactored wilco-specific functions related to setting
serial numbers to their own file and diagnostic UI feature
BUG=b:138812835
BRANCH=None
TEST=emerge-drallion vboot_reference, flashed drallion and tested vendor
data setting
Related to chromium:1983248, chromium:1926508, chrome-internal:2180149
Change-Id: I02b2a62943ea60af007b6fc084b74e990062f3c3
Signed-off-by: Pranay Shoroff <pshoroff@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1999050
Reviewed-by: Mathew King <mathewk@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Tested-by: Mathew King <mathewk@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Error codes are renamed as follows:
VBERROR_INVALID_SCREEN_INDEX
--> VB2_ERROR_UI_INVALID_SCREEN
VBERROR_SCREEN_DRAW
--> VB2_ERROR_UI_DRAW_FAILURE
In addition, add new error code VB2_ERROR_UI_DISPLAY_INIT.
BRANCH=none
BUG=none
TEST=emerge-nami depthcharge
Cq-Depend: chromium:2002310
Change-Id: I1381762fbe1a9bb0c76e7e7d64a0732799c3bf0f
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2002309
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Directly use the __attribute__ ((fallthrough)) instead of
a macro.
This was suggested in CL:1772474.
BUG=chromium:997709
TEST=CQ
BRANCH=None
Change-Id: Ifcdcd3822eddea41aeb88f4a55bd09aa483f6054
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2031766
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
My goal in CL:1963614 was to write struct vb2_hash such that it can
match the exisiting binary representation of the CBFS hash attribute,
but no longer be dependent on endianness. Unfortunately I screwed up...
if you want to match the binary representation of a big-endian integer
for small numbers, the important byte you're interested in is the *last*
one, not the first.
Thankfully we still have time to fix the issue before this struct is
really used anywhere, so this patch does that and adds a test to double
check I got it right this time.
Also clarify comments about how vboot is allowed to use this struct a
bit to match the indended usage I'm planning in coreboot. In doing that
I realized that you actually don't want to make it easy to sizeof() the
|bytes| portion of the struct (because functions shouldn't rely on that
size anyway, they should only touch what's valid for a given hash
algorithm), so taking that out which also makes it a little more
comfortable to work with the struct.
BRANCH=none
BUG=none
TEST=make runtests
Change-Id: I7e1a19f36d75acb69e5d1bfa79700c9d878f9703
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2019952
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch enables the -Wformat warning and tags vb2ex_printf() with the
appropriate attribute so the compiler recognizes it as a printf variant.
This shows a bunch of (sometimes pretty bad) issues in existing code
that are hereby fixed.
Cannot enable -Wformat-security yet since a lot of code still uses
non-constant format strings and it's unclear whether we can/want to
change that in all circumstances (e.g. stuff like DoError()).
BRANCH=None
BUG=None
TEST=make runtests
Change-Id: I917a4982a97a668a5c0f793f7c771573f2bd3949
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2013857
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use vboot2 flag as source of truth for NVDATA_V2,
DEV_MODE_ENABLED, and NOFAIL_BOOT.
Mark vboot1 flags LF_DEV_SWITCH_ON and NOFAIL_BOOT
as deprecated.
Fix up spacing of vboot1 flags in vboot_struct.h.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: I6af8cd97ade8284e198f966d1b86f57101fcd070
Cq-Depend: chromium:2011415
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2011416
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In vboot 2 design, secdata spaces are read/written by the vboot
caller, and not by vboot itself. We still need to maintain a
vb2ex_commit_data callback for edge cases, such as when the vboot
UI prompts the user to reboot.
BUG=b:124141368, chromium:972956
TEST=Build locally, flash and boot eve,
check logs for secdata writes and locks
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ib3b628549185749a290dd65e297f2e19adecbc66
Cq-Depend: chromium:1958012
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1958070
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recovery reason should be passed into vboot kernel verification
API using vboot 2 data structures. Upon arrival, translate to
vboot 1 data structures for legacy purposes.
Also switch to using vboot 2 recovery_reason field in other parts
of vboot code.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ic590db46d57ffbd8829f8f3ad784ea46184ceabc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2008534
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With CL:1988245, vb2_context flag VB2_CONTEXT_EC_SYNC_SUPPORTED is set
in depthcharge. Set VBSD_EC_SOFTWARE_SYNC in shared data based on the
presence of VB2_CONTEXT_EC_SYNC_SUPPORTED.
BRANCH=none
BUG=chromium:1038259, chromium:1042135
TEST=FEATURES=test emerge-nami vboot_reference
Cq-Depend: chromium:1988245
Change-Id: Ia1dd57858234bbc43f25517f416b7506c1b7919a
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1988246
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The vboot 1 flags are not used in userspace, so they may be
deprecated. The vboot 2 flags are converted to use compile-time
options instead.
BUG=b:124141368, chromium:1038259
TEST=make clean && make runtests
BRANCH=none
Change-Id: I0bd63a6f4dd0f29d416beacb966c99b16b5efabd
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2004256
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Auxfw sync used to be guarded by both VB2_GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC
and VB2_CONTEXT_EC_SYNC_SUPPORTED. Now that the EC and AUXFW sync are
fully decoupled, there are scenarios where it may make sense to do auxfw
sync independent of EC sync, such as early bringup.
BUG=chromium:1041879
BRANCH=none
TEST=make runtests
Change-Id: I07948b0317119231ec0287d663a3d8b92259fd6b
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2004942
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename GBB flag FAFT_KEY_OVERRIDE to RUNNING_FAFT.
Add a comment to clarify its use.
BUG=b:124141368, chromium:965914
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ib90de7a0d22b39898fc84be8c16ff34ea1d3b504
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1977902
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I'm prototyping some coreboot code to closer integrate vboot with CBFS
(per-file hashing and that stuff). While doing that, I noticed that it
would be neat to have a standardized serializable representation for any
kind of vboot hash. We already have something like that in CBFS
attributes, but if we want to use it more generally it makes more sense
to put it in vboot. This patch adds a suitable structure defintion to
2sha.h and two utility functions that can be used to work with it.
Also add alloca() because I need it and fix the return types of
vb2_..._size(), because those are just plain wrong.
BRANCH=None
BUG=None
TEST=make runtests
Change-Id: I4b535ad43704693463fb114d6a81d2b5689a87b9
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1963614
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also clean up a few lines setting unneeded flags and fields in
tests, and add conditionals to check for VBSD in vboot_display.c.
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: I84438d00777516354529b1e6ee4d04f7947ff971
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1992856
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds owners for TPM Lightweight Communications Library (TLCL)
inside vboot_reference.
BUG=none
TEST=none
Change-Id: Ife7af0fad31d5f7811a5fc80d34baccf3a4f8c35
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1654006
Tested-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Andrey Pronin <apronin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use vboot 2 flags for checking whether dev mode is enabled, and
whether manual recovery was requested.
VBSD_BOOT_DEV_SWITCH_ON --> VB2_SD_FLAG_DEV_MODE_ENABLED
VBSD_BOOT_REC_SWITCH_ON --> VB2_SD_FLAG_MANUAL_RECOVERY
BUG=b:124141368, chromium:1038260
TEST=make clean && make runtests
BRANCH=none
Change-Id: Idb439f658391f46170704a0fd614853054e1c64d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1992852
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace VbSharedDataHeader flag VBSD_EC_EFS with compile-time macro
EC_EFS.
BRANCH=none
BUG=chromium:1038259
TEST=FEATURES=test emerge-nami vboot_reference
Cq-Depend: chromium:1985550
Change-Id: I0c4dc9b096daf3343881df5bd4181b410979eb0d
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1985548
Reviewed-by: Joel Kitching <kitching@chromium.org>
|