| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This attempts to converge the signatures of host/lib/flashrom
with that of 'futility/updater_utils.h:struct firmware_image'.
with the eventual goal of converging the multiple flashrom
wrapper implementations.
BUG=b:207808292
BRANCH=none
TEST=`$ cros_run_unit_tests --board nocturne --packages vboot_reference`
Cq-Depend: chromium:3399963
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: I016dacbdca6f1108def0dbc608d83e0066a30023
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3301571
Reviewed-by: Sam McNally <sammc@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The preserve_me quirk allows avoiding modifying the ME region while it
may be running. Its apply function attempts to skip itself when not
flashing the OS-bundled firmware by checking for whether an archive is
set, but this doesn't work since in the absence of an actual archive
file, a filesystem archive implementation is used instead.
While flashing over a non-host programmer the ME is not running and
therefore it is safe to update the ME region.
Add unit test cases for the preserve_me quirk applying successfully when
using the default host programmer and being skipped when using another
programmer.
BUG=b:213706510
TEST=futility update -p dummy... with preserve_me quirk skips the quirk;
chromeos-firmwareupdate with a preserve_me quirk applies the quirk
BRANCH=none
Change-Id: Ie5578c9b3cf7eba55626bb931589bf360fe28269
Signed-off-by: Sam McNally <sammc@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3450060
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Command does not need to run under sudo and sudo will not be available
once we start running the test scripts under platform2_test.py.
BUG=b:207787495
BRANCH=none
TEST=`cros_run_unit_tests --board grunt --packages vboot_reference`
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Change-Id: I795519c4b45e410f5ddc3c55dceab1ae1de02dbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3428421
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2lib used vb2_api_allow_recovery() to differentiate between manual and
non-manual recovery in 2kernel and UI related areas.
With introducing the ctx->boot_mode, we could decide if it is a manual
recovery or a broken screen (a.k.a non-manual recovery in the original
design) once in vb2api_fw_phase1 and use this boot mode instead for
further justifications.
Also deprecate the sd flag VB2_SD_FLAG_MANUAL_RECOVERY and use the boot
mode instead to determine if it is a manual recovery boot.
BUG=b:181931817
BRANCH=none
TEST=make clean && make runtests
TEST=emerge coreboot vboot_reference depthcharge
Cq-Depend: chromium:3282875
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ief4ff6cf82285c5857f0051c1f348ad0f269b4a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3121926
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In depthcharge, display availability is checked as part of performing
AUX FW update. In vboot tests, display availability is checked as part
of checking for the AUX FW update. Match the test behavior with the
implementation in depthcharge.
BUG=b:210127173
BRANCH=None
TEST=Ensure that all the tests passed successfully using the following
command:
cros_workon_make --board=dedede vboot_reference --test
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: Ifc58f94bd64c3a90f80e40d97de8938a04dcba6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3346284
Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Commit-Queue: Bob Moragues <moragues@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit f0ba3fe277fdc623565eab0725aed743e24a1a44.
Reason for revert: We can try another reland after the coreboot
CL https://review.coreboot.org/c/coreboot/+/58253 is
downstreamed and the guybrush psp_verstage.bin is signed again.
Original change's description:
> Revert "2api: Add vb2_boot_mode in vb2_context denoted the current boot mode"
>
> This reverts commit 2cf76574dbf57c70da3a835f2a45d5619dc058f5.
>
> Reason for revert: b:202258389
>
> Original change's description:
> > 2api: Add vb2_boot_mode in vb2_context denoted the current boot mode
> >
> > Add enum vb2_boot_mode which denotes the most relevant boot mode between
> > normal, manual recovery, broken recovery, diagnostic, and developer.
> >
> > The boot mode constant stores in vb2_context, is exposed externally, and
> > decided in vb2api_fw_phase1.
> >
> > Split out the logic of manual recovery and broken screen. (The broken
> > recovery is a recovery boot with !vb2api_allow_recovery)
> >
> > Add the fifth boot mode, diagnostic boot mode
> >
> > A boot could match more the one boot mode, this api will pick the most
> > relevant boot mode based on the following order:
> > 1. Manual recovery boot
> > 2. Broken recovery boot
> > 3. Diagnostics boot
> > 4. Developer boot
> > 5. Normal boot
> >
> > This constant is used in:
> > * lib/vboot_api_kernel.c: VbSelectAndLoadKernel()
> > * lib/vboot_kernel.c: replace the original vb2_boot_mode
> > * coreboot/bootmode for adding elogs
> >
> > Also bump the vb2sd minor version from 0 to 1.
> >
> > BUG=b:185551931, b:177196147, b:181931817
> > BRANCH=none
> > TEST=CC=x86_64-pc-linux-gnu-clang;
> > make clean && make runtests
> > TEST=emerge coreboot vboot_reference depthcharge
> >
> > Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
> > Change-Id: I421e4d51c261ba2bdec996a5fb2ebccb33513fa4
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2944250
> > Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
>
> Bug: b:185551931, b:177196147, b:181931817
> Change-Id: Ic184a24f5b580bcaf40d75045476ae77c674dd3d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3209725
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Bhanu Prakash Maiya <bhanumaiya@google.com>
Bug: b:185551931, b:177196147, b:181931817
Change-Id: Ie480bf76eb0164f6e498b72e0533cd5c5762d6f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3274699
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Tested-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Hsuan Ting Chen <roccochen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit b9644352d7717d4f564be90aac6c41bef583d930.
Reason for revert: We can try another reland after the coreboot
CL https://review.coreboot.org/c/coreboot/+/58253 is
downstreamed and the guybrush psp_verstage.bin is signed again.
Original change's description:
> Revert "2lib/2api: Deprecate vb2ex_ec_trusted()"
>
> This reverts commit 7c73bb07fd3ca45ce650b993a9c6a5850ddb2707.
>
> Reason for revert: b:202258389
>
> Original change's description:
> > 2lib/2api: Deprecate vb2ex_ec_trusted()
> >
> > coreboot will support check the EC_IN_RW during verstage_main(), which
> > performs the equivalent tasks as vb2ex_ec_trusted().
> >
> > In the previous CL, we remove the check of vb2ex_ec_trusted(), so the
> > whole implementation of this function among vboot_reference and
> > depthcharge could be deprecated and removed.
> >
> > BUG=b:181931817
> > BRANCH=none
> > TEST=CC=x86_64-pc-linux-gnu-clang;
> > make clean && make runtests
> > TEST=emerge coreboot vboot_reference depthcharge
> >
> > Cq-Depend: chromium:3139956
> > Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
> > Change-Id: I4f592d7dec2480475762e1336791cbb34fa143ba
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3139539
> > Reviewed-by: Julius Werner <jwerner@chromium.org>
> > Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
>
> Bug: b:181931817
> Change-Id: Ia127ce89b7f9413db9fd6ca4561ad06efb36d7e1
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3211006
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Bhanu Prakash Maiya <bhanumaiya@google.com>
Bug: b:181931817
Cq-Depend: chromium:3275254
Change-Id: I2c4db28b5800e5756f6f12b8bf69924f373a5c58
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3274698
Tested-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Hsuan Ting Chen <roccochen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch extends create_new_keys.sh to generate two additional key
pairs to use for AP RO verification signing. Both new pairs are
RSA4096/SHA256.
The script was ran to generate a new set of keys and the produced AP
RO verification key pairs were copied into tests/devkeys.
BRANCH=none
BUG=b:141191727
TEST=re-signed guybrush AP firmware image following the process
described in cmd_gscvd.c comments, created a Cr50 image
incorporating the new root public key hash, updated the DUT AP
and Cr50 firmware and observed successful AP RO validation.
Change-Id: I03cba1446fc5ffdfef662c5ce1ea3e61950477d4
Signed-off-by: Vadim Bendebury <vbendeb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3297447
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, CL:3168437 introduced a new problem when booting with a
broken TPM: secdata accessors no longer return failure but instead just
abort when booting in normal mode and continue when we're in recovery
mode. The problem is that when accessing secdata very early in
vb2api_fw_phase1(), we have not decided whether we're booting in
recovery mode yet. If vb2_secdata_firmware_init() fails, we will call
vb2api_fail() and then continue knowing that vb2_check_recovery() will
later see the recovery reason in NVRAM and decide to boot directly into
recovery from here. But if the code in-between accesses secdata, the
VB2_CONTEXT_RECOVERY_MODE flag is technically not yet set, so our
secdata accessor thinks we are booting in normal mode and something
terrible happened (because it shouldn't be possible to boot in normal
mode when secdata_init failed), so it aborts.
In order to try to solve this problem in a more general way, introduce a
new VB2_SD_STATUS_RECOVERY_DECIDED status flag that gets set once we
reach the point where we have conclusively decided whether we are
booting into recovery mode and set the appropriate context flags. Any
code using VB2_REC_OR_DIE() before that point will play it safe and
assume that we may still go into recovery mode, so we shouldn't abort.
BRANCH=none
BUG=none
TEST=none
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ic3daa8dac932286257cbceebfff8712d25c3a97a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3301540
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BOOT_EXTERNAL_ON_DEV was not used anymore, so it was removed from the
Makefile and source code.
BUG=b:206031372
BRANCH=none
TEST=make runtests
TEST=emerge-guybrush depthcharge
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I463a77f2de8f59954704495708025321ca1571d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3289345
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Jakub Czapiga <czapiga@google.com>
Commit-Queue: Jakub Czapiga <czapiga@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove function VbExIsShutdownRequested, since this function is not used
in vboot anymore after UI code is centralized.
Remove VB_SHUTDOWN_* macros since they are not used in vboot now. These
macros will be added in depthcharge in the dependent CL.
BUG=b:172339016
TEST=DEBUG=1 make -j test_setup && make -j runtests
BRANCH=none
Cq-Depend: chromium:3142698
Signed-off-by: edisonhello <edisonhello@google.com>
Change-Id: I024b34212a5c9e42b880d51d21c7a90a6170b3c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3143814
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support booting from the non-active miniOS partition in recovery UI,
add minios_flags argument to VbTryLoadMiniOsKernel. Currently there is
only one flag: VB_MINIOS_FLAG_NON_ACTIVE. When it is set, we will
attempt to boot from the non-active partition only.
BUG=b:200750322
TEST=make runtests
BRANCH=none
Cq-Depend: chromium:3219727
Change-Id: I6221f10c09de2487e89e6113981bc9e9755d67f4
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3219901
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Jae Hoon Kim <kimjae@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7c73bb07fd3ca45ce650b993a9c6a5850ddb2707.
Reason for revert: b:202258389
Original change's description:
> 2lib/2api: Deprecate vb2ex_ec_trusted()
>
> coreboot will support check the EC_IN_RW during verstage_main(), which
> performs the equivalent tasks as vb2ex_ec_trusted().
>
> In the previous CL, we remove the check of vb2ex_ec_trusted(), so the
> whole implementation of this function among vboot_reference and
> depthcharge could be deprecated and removed.
>
> BUG=b:181931817
> BRANCH=none
> TEST=CC=x86_64-pc-linux-gnu-clang;
> make clean && make runtests
> TEST=emerge coreboot vboot_reference depthcharge
>
> Cq-Depend: chromium:3139956
> Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
> Change-Id: I4f592d7dec2480475762e1336791cbb34fa143ba
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3139539
> Reviewed-by: Julius Werner <jwerner@chromium.org>
> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Bug: b:181931817
Change-Id: Ia127ce89b7f9413db9fd6ca4561ad06efb36d7e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3211006
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Bhanu Prakash Maiya <bhanumaiya@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 2cf76574dbf57c70da3a835f2a45d5619dc058f5.
Reason for revert: b:202258389
Original change's description:
> 2api: Add vb2_boot_mode in vb2_context denoted the current boot mode
>
> Add enum vb2_boot_mode which denotes the most relevant boot mode between
> normal, manual recovery, broken recovery, diagnostic, and developer.
>
> The boot mode constant stores in vb2_context, is exposed externally, and
> decided in vb2api_fw_phase1.
>
> Split out the logic of manual recovery and broken screen. (The broken
> recovery is a recovery boot with !vb2api_allow_recovery)
>
> Add the fifth boot mode, diagnostic boot mode
>
> A boot could match more the one boot mode, this api will pick the most
> relevant boot mode based on the following order:
> 1. Manual recovery boot
> 2. Broken recovery boot
> 3. Diagnostics boot
> 4. Developer boot
> 5. Normal boot
>
> This constant is used in:
> * lib/vboot_api_kernel.c: VbSelectAndLoadKernel()
> * lib/vboot_kernel.c: replace the original vb2_boot_mode
> * coreboot/bootmode for adding elogs
>
> Also bump the vb2sd minor version from 0 to 1.
>
> BUG=b:185551931, b:177196147, b:181931817
> BRANCH=none
> TEST=CC=x86_64-pc-linux-gnu-clang;
> make clean && make runtests
> TEST=emerge coreboot vboot_reference depthcharge
>
> Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
> Change-Id: I421e4d51c261ba2bdec996a5fb2ebccb33513fa4
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2944250
> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Bug: b:185551931, b:177196147, b:181931817
Change-Id: Ic184a24f5b580bcaf40d75045476ae77c674dd3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3209725
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Bhanu Prakash Maiya <bhanumaiya@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add enum vb2_boot_mode which denotes the most relevant boot mode between
normal, manual recovery, broken recovery, diagnostic, and developer.
The boot mode constant stores in vb2_context, is exposed externally, and
decided in vb2api_fw_phase1.
Split out the logic of manual recovery and broken screen. (The broken
recovery is a recovery boot with !vb2api_allow_recovery)
Add the fifth boot mode, diagnostic boot mode
A boot could match more the one boot mode, this api will pick the most
relevant boot mode based on the following order:
1. Manual recovery boot
2. Broken recovery boot
3. Diagnostics boot
4. Developer boot
5. Normal boot
This constant is used in:
* lib/vboot_api_kernel.c: VbSelectAndLoadKernel()
* lib/vboot_kernel.c: replace the original vb2_boot_mode
* coreboot/bootmode for adding elogs
Also bump the vb2sd minor version from 0 to 1.
BUG=b:185551931, b:177196147, b:181931817
BRANCH=none
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=emerge coreboot vboot_reference depthcharge
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I421e4d51c261ba2bdec996a5fb2ebccb33513fa4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2944250
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
coreboot will support check the EC_IN_RW during verstage_main(), which
performs the equivalent tasks as vb2ex_ec_trusted().
In the previous CL, we remove the check of vb2ex_ec_trusted(), so the
whole implementation of this function among vboot_reference and
depthcharge could be deprecated and removed.
BUG=b:181931817
BRANCH=none
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=emerge coreboot vboot_reference depthcharge
Cq-Depend: chromium:3139956
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I4f592d7dec2480475762e1336791cbb34fa143ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3139539
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add VbTryLoadMiniOsKernel() to vboot API, which boots from a miniOS
recovery kernel located on internal disk. In this boot path, an attempt
is made to verify and boot this kernel. Recovery proceeds from within
the miniOS kernel by downloading a recovery image over the network. No
USB disk is used in the process.
For more information, see go/nbr-firmware.
BUG=b:188121855, b:186682292
TEST=make clean && make runtests
BRANCH=none
Change-Id: Ic4d1fe5642a2bf71c51c78fd7830ad2b6e9eebeb
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2856364
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL is a revert to CL:300621.
In that CL, we adjusted the order of checking dev switch
(vb2_check_dev_switch) and move it after the check for recovery step
(vb2_check_recovery). The reason of that adjustment was because
vb2_check_dev_switch might return very early if the TPM is broken and
it failed to retrieve the secdata.
However, retrieving the secdata becomes a function which cannot fail
nowadays and it is not necessary to handle that scenario of the early
return in vb2_check_dev_switch. So we adjust them back to the original
order.
We also remove the related outdated unit tests in vb2_api_tests.c
BUG=none
BRANCH=none
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Iada8092e73ed9282242b1d67d101c836860e13c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3168437
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test uses sha-ni extension, so it crashes on platforms without
sha-ni. Add cpuid checks to avoid that.
BUG=b:162551138
BRANCH=none
TEST=run test on Haswell, which doesn't have sha-ni
Signed-off-by: Kangheui Won <khwon@chromium.org>
Change-Id: I6e18843a723d022c67832ef970d4dc470c1aadce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3140849
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since all the screens and tests are already moved to depthcharge
in previous CLs, remove all internal UI functions and tests from
vboot.
BUG=b:172339016
TEST=DEBUG=1 make -j test_setup && make -j runtests
BRANCH=none
Signed-off-by: edisonhello <edisonhello@google.com>
Change-Id: Ifbd005a5761e5c354e010fc70487a63cd17cf4b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3139540
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL is a part of centralizing ui codes. The removed screens and unit
tests will be added in depthcharge.
Remove diagnostics menu, diagnostics storage and memory checking screens.
Remove unit tests for above screens and menu.
BUG=b:172339016
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=0; \
make -j test_setup && make -j runtests
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=1; \
make -j test_setup && make -j runtests
BRANCH=none
Cq-Depend: chromium:3138687
Signed-off-by: edisonhello <edisonhello@google.com>
Change-Id: I5eb1bee6a5f1aedb77298acbddab20156c1c086e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3139537
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL is a part of centralizing ui codes. The removed screens and unit
tests will be added in depthcharge.
Remove developer menu and its action function.
Remove developer mode, developer to norm, developer boot external,
developer invalid disk, developer select altfw screens.
Remove unit tests for above screens and menu.
BUG=b:172339016
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=0; \
make -j test_setup && make -j runtests
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=1; \
make -j test_setup && make -j runtests
BRANCH=none
Cq-Depend: chromium:3132550
Signed-off-by: edisonhello <edisonhello@google.com>
Change-Id: I45332f8e059eba612231362cc56a70da1336c7c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3132504
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL is a part of centralizing ui codes. The removed screens and unit
tests will be added in depthcharge.
Remove manual recovery menu and its action function.
Remove recovery select, recovery phone step *, recovery disk step *,
recovery invalid screens.
Add vb2ex_manual_recovery_ui declaration.
Remove unit tests of above screens, menu and actions.
BUG=b:172339016
TEST=Hayato booted into developer mode
TEST=Hayato showed manual recovery screen
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=0; \
make -j test_setup && make -j runtests
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=1; \
make -j test_setup && make -j runtests
BRANCH=none
Cq-Depend: chromium:3099529
Signed-off-by: edisonhello <edisonhello@google.com>
Change-Id: I330098200d45d094d4faab90b96355b5b19e3fea
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3116108
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove broken recovery screen in vboot, and migrate to depthcharge.
Remove broken recovery related tests in vboot.
BUG=b:172339016
TEST=Hayato booted into developer mode
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=0; \
make -j test_setup && make -j runtests
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=1; \
make -j test_setup && make -j runtests
BRANCH=none
Cq-Depend: chromium:3116129
Change-Id: I7d830e992d9ae1703befba570dfbe3061319b9fe
Signed-off-by: edisonhello <edisonhello@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3060559
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prepare for copying UI functions to depthcharge.
Rename UI functions which will be copied to depthcharge in vboot
in order to avoid linking time error after copying the functions.
BUG=b:172339016
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=0; \
make -j test_setup && make -j runtests
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=1; \
make -j test_setup && make -j runtests
TEST=Hayato booted into developer mode
BRANCH=none
Change-Id: I840de3121dc2ccd8f6d05ec8a1538c3761f806da
Signed-off-by: edisonhello <edisonhello@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3060558
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the EC is trusted if any of the conditions are met:
* The ctx flag VB2_CONTEXT_EC_TRUSTED is set.
* vb2ex_ec_trusted() returns trusted.
With introducing the boot mode area in ctx, the vb2ex_ec_trusted will be
deprecated and the VB2_CONTEXT_EC_TRUSTED will become the only condition
to decide if EC is trusted.
This CL clears the flag while EC jumps to RW, which is the prerequisite
before landing the coreboot changes.
Also update the tests of ec_sync()
BRANCH=none
BUG=b:181931817
TEST=emerge-trogdor coreboot vboot_reference depthcharge
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I4711093353f5a92157c4c00c859c01f08fc3607f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3139538
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The compiler is too zealous when deciding which addresses are allowed
to be accessed. While it is correct in principal, in some controlled
cases the code indeed needs to calculate addresses which are beyond
the structures boundaries.
This patch modifies the code to placate the compiler.
BRANCH=none
BUG=none
TEST='make run2tests' inside chroot does not fail to compile and
passes.
Change-Id: Iba99714da569a5f28ae95939e93ee1d09da20caa
Signed-off-by: Vadim Bendebury <vbendeb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3133544
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CL:2917623 changes the behavior when failing to boot from internal disk
in developer UI. However, it causes the device to potentially enter a
reboot loop (b/197216832).
Instead of either triggering recovery or returning an error from the UI
loop, change the behavior to showing an error message in a dialog box
and staying in the UI. This is similar to the behavior when booting from
an invalid external disk, where an error screen will be shown to the
user.
Add VB2_UI_ERROR_INTERNAL_BOOT_FAILED to vb2_ui_error enum.
BUG=b:197216832, b:197911901
TEST=make runtests
BRANCH=none
Cq-Depend: chromium:3123160
Change-Id: Ic5ace55fc8b93ba0836e5722b7c5011fd490c35e
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3124395
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attempts to access array of fixed size beyond the boundary now trigger
compilation warnings, even though there is room beyond the array
boundary in due to data layout.
Let's modify the code to declare the array size explicitly to calm the
compiler.
Also needed to add en explicit return value in a function where all
returns happened inside a case statement.
BRANCH=none
BUG=none
TEST='make run2tests' does not fail to compile any more and succeeds
running tests.
Change-Id: Ib2158145233a0e8641c5b9b95499928f18390a8d
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3120000
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since all flags are initialized as 0 in vb2api_init(),
some flag unset operations are not needed.
Edit few comments to make it more accurate.
BUG=none
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1; \
make -j32 test_setup && make -j32 runtests;
BRANCH=none
Signed-off-by: edisonhello <edisonhello@google.com>
Change-Id: I0129f43342598195800ff671b965100d3d568564
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3066803
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check vb2api_allow_recovery before actual changes in
vb2api_enable_developer_mode.
Add new API error type VB2_ERROR_API_ENABLE_DEV_NOT_ALLOWED in
vb2_error_t.
Add spaces in the output message of vb2_misc_tests for indentation.
BUG=b:172339016
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=0; \
make -j32 test_setup && make -j32 runtests;
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=1; \
make -j32 test_setup && make -j32 runtests;
TEST=Hayato booted into developer mode
BRANCH=none
Change-Id: Ifebdd01ca87cf944c394907eca73a09fc3bf5457
Signed-off-by: edisonhello <edisonhello@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3056240
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add test_fail function that will check whether the result value is
not 0.
Add TEST_FAIL macro that will call test_fail.
BUG=none
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1; \
make -j32 test_setup && make -j32 runtests;
BRANCH=none
Change-Id: I4dfe6a887780f70fbcb753828cfb5500ed810b72
Signed-off-by: edisonhello <edisonhello@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3060562
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Publicize vb2api_enable_developer_mode, vb2api_allow_recovery and
VbTryLoadKernel, and modify corresponding parts in tests.
Create vb2api_disable_dev_request, vb2api_request_diagnostics for
wrapping vb2_nv_set(ctx, VB2_NV_DISABLE_DEV_REQUEST, 1) and
vb2_nv_set(ctx, VB2_NV_DIAG_REQUEST, 1).
BUG=b:172339016
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=0; \
make -j32 test_setup && make -j32 runtests;
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=1; \
make -j32 test_setup && make -j32 runtests;
TEST=Hayato booted into developer mode
BRANCH=none
Change-Id: I0211a63ed58ce862ee3e17b4835c675544f773a4
Signed-off-by: edisonhello <edisonhello@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3053541
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add DEV_BOOT_ALLOWED, DEV_BOOT_ALTFW_ALLOWED,
DEV_BOOT_EXTERNAL_ALLOWED in ctx->flags, which can be used by
external functions. These flags will be filled in
VbSelectAndLoadKernel, before calling any menu function.
In 2ui.c and 2ui_screen.c, all function calls to vb2_dev_boot_*allowed
are replaced with corresponding flags in ctx->flags.
Remove the parts of mocking these functions in unit tests, and set
ctx->flags instead in reset_common_data.
BUG=b:172339016
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=0; \
make -j32 test_setup && make -j32 runtests;
TEST=export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DETACHABLE=1; \
make -j32 test_setup && make -j32 runtests;
TEST=Hayato booted into developer mode
BRANCH=none
Signed-off-by: edisonhello <edisonhello@google.com>
Change-Id: Ida9f03557a92a1522d631fc04b281ce85f5049c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3041498
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These don't really belong together. We can get two cleaner test
files by splitting them apart.
This CL is part of a series to merge vboot1 and vboot2.0
kernel verification code; see b/181739551.
BUG=b:181739551, b:172337800, b:124141368
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: Idaa4c36214cc98bffdc50bdb5c071673829250ee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3039164
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DIAGNOSTIC_UI is indirectly decided by the diag_payload and minidiag use
flag from depthcharge.
But with introducing the diagnostic boot mode, coreboot also needs to
build minidiag utility functions and enable this building flag.
Therefore we consider to deprecate DIAGNOSTIC_UI and always build them.
For diag_payload:
It is for a diagnostic tool which based on legacy UI and deprecated
For minidiag:
Mini-diag is set default enabled for newer devices, and we could still
use kernel secdata in runtime if we decide to disable it on certain
platforms.
In conclusion, deprecating DIAGNOSTIC_UI will not affect newer devices.
BUG=b:190796342, b:181931817
BRANCH=none
TEST=emerge-volteer depthcharge
TEST=emerge-volteer coreboot
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
Cq-Depend: chromium:3004223
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I0d804bcd9d31d3952c744a1926ac59cde7b7f841
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3006114
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
miniOS requires a distinct kernel data key, whose dev key pair
is added in this CL as minios_kernel_data_key.vb{pub,priv}k.
A distinct keyblock is also required. The keyblock should set
the kernel keyblock flag MINIOS_1. Other keyblocks are modified
appropriately to set MINIOS_0. Keyblocks were generated using
the following commands:
$ futility vbutil_keyblock
--flags 23
--datapubkey tests/devkeys/ec_data_key.vbpubk
--signprivate tests/devkeys/ec_root_key.vbprivk
--pack tests/devkeys/ec.keyblock
Keyblock file: tests/devkeys/ec.keyblock
Signature valid
Flags: 23 !DEV DEV !REC !MINIOS
Data key algorithm: 7 RSA4096 SHA256
Data key version: 1
Data key sha1sum: 5833470fe934be76753cb6501dbb8fbf88ab272b
$ futility vbutil_keyblock
--flags 23
--datapubkey tests/devkeys/firmware_data_key.vbpubk
--signprivate tests/devkeys/root_key.vbprivk
--pack tests/devkeys/firmware.keyblock
Keyblock file: tests/devkeys/firmware.keyblock
Signature valid
Flags: 23 !DEV DEV !REC !MINIOS
Data key algorithm: 7 RSA4096 SHA256
Data key version: 1
Data key sha1sum: e2c1c92d7d7aa7dfed5e8375edd30b7ae52b7450
$ futility vbutil_keyblock
--flags 27
--datapubkey tests/devkeys/recovery_kernel_data_key.vbpubk
--signprivate tests/devkeys/recovery_key.vbprivk
--pack tests/devkeys/recovery_kernel.keyblock
Keyblock file: tests/devkeys/recovery_kernel.keyblock
Signature valid
Flags: 27 !DEV DEV REC !MINIOS
Data key algorithm: 11 RSA8192 SHA512
Data key version: 1
Data key sha1sum: e78ce746a037837155388a1096212ded04fb86eb
$ futility vbutil_keyblock
--flags 43
--datapubkey tests/devkeys/minios_kernel_data_key.vbpubk
--signprivate tests/devkeys/recovery_key.vbprivk
--pack tests/devkeys/minios_kernel.keyblock
Keyblock file: tests/devkeys/minios_kernel.keyblock
Signature valid
Flags: 43 !DEV DEV REC MINIOS
Data key algorithm: 8 RSA4096 SHA512
Data key version: 1
Data key sha1sum: 65441886bc54cbfe3a7308b650806f4b61d8d142
$ futility vbutil_keyblock
--flags 23
--datapubkey tests/devkeys/kernel_data_key.vbpubk
--signprivate tests/devkeys/kernel_subkey.vbprivk
--pack tests/devkeys/kernel.keyblock
Keyblock file: tests/devkeys/kernel.keyblock
Signature valid
Flags: 23 !DEV DEV !REC !MINIOS
Data key algorithm: 4 RSA2048 SHA256
Data key version: 1
Data key sha1sum: d6170aa480136f1f29cf339a5ab1b960585fa444
$ futility vbutil_keyblock
--flags 26
--datapubkey tests/devkeys/installer_kernel_data_key.vbpubk
--signprivate tests/devkeys/recovery_key.vbprivk
--pack tests/devkeys/installer_kernel.keyblock
Keyblock file: tests/devkeys/installer_kernel.keyblock
Signature valid
Flags: 26 DEV REC !MINIOS
Data key algorithm: 11 RSA8192 SHA512
Data key version: 1
Data key sha1sum: e78ce746a037837155388a1096212ded04fb86eb
BUG=b:188121855
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I5b3e4def83ff29ca156b3c84dfcb8398f4985e67
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2965485
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Subsequent code can potentially access the *log variable after
being set by vb2ex_diag_get_storage_test_log.
BUG=none
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I9c8ed20efecbb4eaff8a8fcdf1f467f7df5147a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2917624
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Store kparams as a pointer in vboot_api_kernel.c, rather than a
full struct passed around as a "buffer copy".
This CL is part of a series to merge vboot1 and vboot2.0
kernel verification code; see b/181739551.
BUG=b:181739551
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I7be7280761564c35e928bc947177b3fce61d6215
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2856360
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Latest x86 processors have SHA256 extension which can accelerate hash
computation in vboot.
This is especially helpful on low-end devices where sha256 computation
takes 70ms-90ms, with this CL it is reduced to 10ms.
BUG=b:162551138
BRANCH=zork
TEST=build and boot, check cbmem -t
TEST=run vb2_sha256_x86_tests on dirinboz
Signed-off-by: Kangheui Won <khwon@chromium.org>
Change-Id: I50e123048d54d5061e8d8e0e0ae804a416130948
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2639457
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Raul E Rangel <rrangel@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On load kernel failure, only call vb2api_fail when in normal
mode.
Previously, the behaviour here was to only call when attempting
to load a kernel from a fixed disk. This maps to (1) normal
mode, and (2) developer mode when booting from an internal disk.
Excluding (2) creates a more consistent experience in developer
mode, and also prepares for a world where recovery kernels might
exist on disk.
This CL is part of a series to merge vboot1 and vboot2.0
kernel verification code; see b/181739551.
BUG=b:181739551, b:188121855
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: Ic2c55a073b036be98f4ce9b2e0c7fb3209de74c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2917623
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move disk validity check to static function is_valid_disk().
If multiple disk types are selected (e.g. REMOVABLE | FIXED),
is_valid_disk() will now check that exactly *one* of those flags
is selected by VbDiskInfo.flags.
Also, split disk flags into two 16-bit sections:
- Disk selection in the lower 16 bits (where the disk lives)
- Disk attributes in the higher 16 bits (extra information about
the disk needed to access it correctly)
This CL is part of a series to merge vboot1 and vboot2.0
kernel verification code; see b/181739551.
BUG=b:181739551
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: Icf76ab6e92cca40810071def66aed13cdb3a7ec7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2872251
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
LoadKernelParams struct is identical to
VbSelectAndLoadKernelParams. Remove it, and use the public
interface internally.
This CL is part of a series to merge vboot1 and vboot2.0
kernel verification code; see b/181739551.
BUG=b:181739551
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I8b820d18c1e9a66404a7a091aa3ccc1b050a559d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2846282
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pass VbDiskInfo struct into LoadKernel, rather than copying all
of its members into LoadKernelParams. Remove the unused members
from LoadKernelParams.
This CL is part of a series to merge vboot1 and vboot2.0
kernel verification code; see b/181739551.
BUG=b:181739551
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I60957426388c88b16e570b717addb5eaf65b5e4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2846281
Reviewed-by: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Relocate currently-in-use kernel struct functions out
of lib20 namespace, and into:
* 2struct.c for functions required at runtime
* host_common.c for functions required by host
Relocate firmware struct functions from 2common.c
into 2struct.c
vb2_common.h may be deleted as a result.
This CL is part of a series to merge vboot1 and vboot2.0
kernel verification code; see b/181739551.
BUG=b:181739551
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: Ic162d9633b6112ddc4a819b3e58d313dc484f304
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2825269
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0902a08d74f090b747f59de616abfdf2131b1ae3.
Reason for revert: This causes issues with booting, at least on the guybrush platform.
BUG=b:187953058
TEST=See OS boot failures with this patch in place. Remove patch and guybrush boots fine again.
Original change's description:
> vboot/vboot_kernel: update keyblock flag mismatch logic
>
> A keyblock flag mismatch should cause keyblock verification to
> fail regardless of whether a valid keyblock is required (i.e.
> self-signed keyblock case).
>
> This CL is part of a series to merge vboot1 and vboot2.0
> kernel verification code; see b/181739551.
>
> BUG=b:181739551
> TEST=make clean && make runtests
> BRANCH=none
>
> Signed-off-by: Joel Kitching <kitching@google.com>
> Change-Id: I47096ab7fcf0fbd47a46a9a92a5406e9aa9b3596
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2846251
> Reviewed-by: Julius Werner <jwerner@chromium.org>
> Tested-by: Joel Kitching <kitching@chromium.org>
> Commit-Queue: Joel Kitching <kitching@chromium.org>
Bug: b:181739551
Change-Id: Ie778fd669bc072ba526d2082a3418208d6b28472
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2891607
Auto-Submit: Martin Roth <martinroth@google.com>
Tested-by: Martin Roth <martinroth@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A keyblock flag mismatch should cause keyblock verification to
fail regardless of whether a valid keyblock is required (i.e.
self-signed keyblock case).
This CL is part of a series to merge vboot1 and vboot2.0
kernel verification code; see b/181739551.
BUG=b:181739551
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I47096ab7fcf0fbd47a46a9a92a5406e9aa9b3596
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2846251
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change replaces --diff and --fast-verify for the supported
equivalent flashrom options
BRANCH=none
BUG=b:186479007
TEST=tryjobs
Change-Id: I614ba71c606dbe4e3a1b4988df845bcbbd61dd01
Signed-off-by: Daniel Campello <campello@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2853623
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add helper functions to check and set ui error code. The ui error
handling shouldn't catch the requests but only the error.
Add vb2_is_error() to 2api.h. This function is for checking if the
return value is an error or not.
BRANCH=none
BUG=b:157625765
TEST=make clean && CC=x86_64-pc-linux-gnu-clang make runtests
Signed-off-by: Chung-Sheng Wu <chungsheng@google.com>
Change-Id: I5c9a34dadf749f3b5364860a1a034bfefe0a61f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2780821
Tested-by: Chung-Sheng Wu <chungsheng@chromium.org>
Commit-Queue: Chung-Sheng Wu <chungsheng@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement the ui for storage self-test.
BUG=b:173364332
TEST=make clean && CC=x86_64-pc-linux-gnu-clang make runtests
BRANCH=none
Cq-Depend: chromium:2641906
Signed-off-by: Chung-Sheng Wu <chungsheng@google.com>
Change-Id: Ieb3a24e0bf19f4e62de41cccd1138719dbc65e7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2626566
Tested-by: Chung-Sheng Wu <chungsheng@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Meng-Huan Yu <menghuan@chromium.org>
Commit-Queue: Chung-Sheng Wu <chungsheng@chromium.org>
|