| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mosys used to have code (below), which led me to believe that we
always try and leave the last entry unfilled:
memset(blank, 0xff, VBNV_BLOCK_SIZE);
for (index = 0; index < len / VBNV_BLOCK_SIZE; index++) {
unsigned int offset = index * VBNV_BLOCK_SIZE;
if (!memcmp(blank, &data[offset], VBNV_BLOCK_SIZE))
break;
}
if (index == 0) {
lprintf(LOG_ERR, "VBNV is uninitialized\n");
return -1;
} else if (index >= len) { <---- SEE NOTE
lprintf(LOG_ERR, "VBNV is full\n"); <--- unreachable
return -1;
} else {
return index - 1;
}
The statement at "SEE NOTE" will always be false, so this code fooled
me to believe that we consider VBNV without a row of 0xFF*16 to be
empty.
And so I implemented and wrote unit tests for what I believed the
correct behavior to be :/
Anyway, this is causing us issues since AP firmware does not implement
it that way. So allow the last row to be filled.
BUG=chromium:1112578
BRANCH=none
TEST=unit tests
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ib3da78eddef69a688d081cdb5391a25000dac9d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2402385
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
(cherry picked from commit 176e01ded3bcefb6cb8baa984a158d42562bb1e9)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2410559
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce new prototype for HW RSA accleration. This is not used
on anywhere yet but will unblock coreboot work to support HW RSA.
BRANCH=none
BUG=b:163710320, b:161205813
TEST=make runtests; emerge-zork coreboot depthcharge
Change-Id: Ic4b93f32410efdd06bd012efe58749b6ef0692c6
Signed-off-by: Kangheui Won <khwon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2364338
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Google is working to change its source code to use more inclusive
language. To that end, replace the term "blacklist" & "whitelist"
with inclusive alternatives.
chrome-internal:3214766, chrome-internal:3214767, chrome-internal:3214831
will be checked in separately. They refer to a pinned vboot_reference.
So, this patch won't affect the signer until the pin is moved.
BUG=b:163883397
BRANCH=None
TEST=grep -ir "white*list"
TEST=grep -ir "black*list"
TEST=make runtests
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: Iff98b55713b3c7381ba092ff14b50141b8422cf2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2353421
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Google is working to change its source code to use more inclusive
language. To that end, replace the term "sanity" with inclusive
alternatives.
BUG=b:163883397
BRANCH=None
TEST=grep -ir sanity
TEST=make runtests
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I708a044d89050c442f14fb11a8ae5e98490d56af
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2353420
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Display a error dialog box while user confirms with untrusted keyboard.
BUG=b:144969091, b:161866932
BRANCH=puff
TEST=PHYSICAL_PRESENCE_KEYBOARD=1; emerge-puff depthcharge
Cq-Depend: chromium:2345837
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I2b0fdc217bbaa23ac71a41bf400c412be634ec0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2346455
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:162747154
BRANCH=none
TEST=verify that update runs for rev1, but not rev0 without --force
TEST=verify that update runs for both rev1 and rev0 with --force
Signed-off-by: Bob Moragues <moragues@chromium.org>
Change-Id: I1594d6a4c83d8a0c13494f8f108225618612db8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2360590
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix vboot_api_kernel4_tests with MENU_UI=1 by mocking UI functions for
menu UI.
BRANCH=none
BUG=b:146399181, b:156448738
TEST=MENU_UI=0 DIAGNOSTIC_UI=0 make runtests
TEST=MENU_UI=0 DIAGNOSTIC_UI=1 make runtests
TEST=MENU_UI=1 DIAGNOSTIC_UI=0 make runtests
TEST=MENU_UI=1 DIAGNOSTIC_UI=1 make runtests
Change-Id: Ie1bf4296a757bd1a65c7d0e17f954db4a0dafc3f
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2336206
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The entry `Launch diagnostics` in recovery screen will set
VB2_NV_DIAG_REQUEST and reboot.
BRANCH=none
BUG=b:155848434
TEST=( export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DIAGNOSTIC_UI=0
MINIMAL=1 TPM2_MODE= MOCK_TPM=; make clean &&
make -j32 test_setup && make runtests; echo $? )
TEST=( export CC=x86_64-pc-linux-gnu-clang DEBUG=1 DIAGNOSTIC_UI=1
MINIMAL=1 TPM2_MODE= MOCK_TPM=; make clean &&
make -j32 test_setup && make runtests; echo $? )
TEST=LOCALES="en" USE="menu_ui minidiag" emerge-nami chromeos-bmpblk
vboot_reference depthcharge chromeos-bootimage
TEST=Unset by
&= ~VB2_SECDATA_KERNEL_FLAG_DIAGNOSTIC_UI_DISABLED manually;
trigger recovery mode on device;
visually confirmed `Launch diagnostics` is shown;
select, reboot and confirm behavior from serial output:
"Unset diagnostic request (undo display init)".
Cq-Depend: chromium:2282643, chromium:2282664, chromium:2289814
Change-Id: I34af282edee66c5b9943e2d11fb514bac9ccddd8
Signed-off-by: Chun-Ta Lin <itspeter@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2282867
Tested-by: Chun-ta Lin <itspeter@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Diagnostic UI is currently not ready to ship. Disable
the UI (including both entry point and the UI itself)
until it is ready.
Also remove unused mock_presence from vboot_api_kernel4_tests.
BUG=b:155848434, b:162486211
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I5cad7d40b2f52015f17f930a4d061c9cdf976a49
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2328985
Tested-by: Chun-ta Lin <itspeter@chromium.org>
Commit-Queue: Chun-ta Lin <itspeter@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the update target is same as the active image, the firmware updater
will do nothing on vboot2. However, if the system already have
fw_try_next set to other slot (for example after multiple updates
applied without rebooting) then the next boot will not pick the right
firmware. So we have to ensure fw_try_next is set to right value.
In the meantime, if fw_try_count and fw_result are not configured at the
same time, the system may start "trying" again and increase the chance
to fail.
To fix that, we should clear trial cookies when there is no update, just
like chromeos-setgoodfirmware.
BUG=b:162866548
TEST=make runtests
BRANCH=None
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: I41ecac445000a850d050d77f0f694ee431926424
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2340172
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:162747154
BRANCH=none
TEST=verify that update runs for rev1, but not rev0
Signed-off-by: Bob Moragues <moragues@chromium.org>
Change-Id: I19e88a3046c6e98968650b6d7b1296a1a47c1470
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2334360
Reviewed-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The debug info screen can be accessed from advanced option screen.
BRANCH=none
BUG=b:146399181, b:144969088
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=USE="menu_ui" emerge-nami depthcharge
select "advanced options",
observe its layout,
and navigate to debug info screen
Cq-Depend: chromium:2301571
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I1fed968770a2681c28d49869676fb9b4f1d46494
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2301629
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement debug info screen with multiple pages.
The debug info screen can be accessed using TAB as keyboard shortcut.
The menu navigation will be added in a separate CL.
The screen has one textbox for displaying one page of debug info,
and three buttons: page up, page down, and back.
BRANCH=puff
BUG=b:146399181, b:144969088
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=USE="menu_ui" emerge-nami depthcharge
press tab, observe the debug info on the screen
Cq-Depend: chromium:2251685
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I6bc0a49c4d69817825f35435b643b006823b5c03
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2251868
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DIAGNOSTIC_UI is incompatible with the new menu_ui ("Groot").
Disallow diagnostic UI under the condition of using MENU_UI.
BUG=b:146399181, b:160748354
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: Idc09e37a72d355baf7fa42ade7cdfecb3d41eabb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2319415
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently the file android_file_contexts has a different name for ARCVM
with _vm suffix. Choose _vm if the container one is not found.
BUG=b:161828692
TEST=sign_official_build.sh base recovery_image.bin mykey signed.bin
BRANCH=none
Signed-off-by: Victor Hsieh <victorhsieh@chromium.org>
Change-Id: I8a93d8e1dd5b824f319d7de804f8f74825166a97
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2323647
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some error such as VB2_UI_ERROR_DEV_EXTERNAL_BOOT_FAILED only requires a
beep sound to notify the user. No dialog box will be shown for these
errors.
Instead of defining them in the vb2_ui_error enum and ignore them in
vb2ex_display_ui() in depthcharge, add a new field 'error_beep' to
vb2_ui_context and use it for playing error beep sound in the UI loop.
Then these beep-only errors can be removed from the enum.
Also remove VB2_UI_ERROR_DEV_INTERNAL_NOT_ALLOWED because it is not used
everywhere.
BRANCH=puff
BUG=b:146399181, b:161375587
TEST=emerge-puff depthcharge
TEST=b/161375587 is not reproducible
Cq-Depend: chromium:2299925
Change-Id: Ia90d1c8a164334d4cfec84281722eb6f2623b111
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2299968
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents linker errors regarding multiple definitions.
Change-Id: I62d6132c20ca2b9620a9f3b1539a1a0109c5aa26
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2318026
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was only used by smaug which went EOL a while ago and we've
already deleted supporting logic.
BUG=None
TEST=CQ passes
BRANCH=None
Change-Id: Ia639c7da3c70c62ee102f11d510ffaa928ab244a
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2309221
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit cd78ae54a2f7ccec9ef0216b633d1b4626d14af0.
Reason for revert: broke snapshot builders
BUG=chromium:1108724
TEST=None
Original change's description:
> Makefile: Add dumpRSAPublicKey to SDK utilities
>
> This utility is used in key generation, so it really belongs in the SDK.
> However, some autotests currently also want to generate keys on the DUT.
> So let's just install it to both.
>
> BRANCH=none
> BUG=none
> TEST=sudo emerge
>
> Signed-off-by: Julius Werner <jwerner@chromium.org>
> Change-Id: I8b69b284d2a1c15f1fb17e1bb7be43a6215cd42d
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2298661
> Reviewed-by: Joel Kitching <kitching@chromium.org>
Bug: none
Change-Id: Ia868c8c5f4a7269e25ef38a51157bbd90ac24064
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2315562
Reviewed-by: Wu-Cheng Li <wuchengli@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Wu-Cheng Li <wuchengli@chromium.org>
Commit-Queue: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:161828692
TEST=sign_official_build.sh base recovery_image.bin mykey signed.bin
TEST=sign_android_unittests.sh
BRANCH=none
Signed-off-by: Victor Hsieh <victorhsieh@chromium.org>
Change-Id: I158cd0c23198ffe8773b5882ba214b3ca4d26cae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2310758
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This utility is used in key generation, so it really belongs in the SDK.
However, some autotests currently also want to generate keys on the DUT.
So let's just install it to both.
BRANCH=none
BUG=none
TEST=sudo emerge
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I8b69b284d2a1c15f1fb17e1bb7be43a6215cd42d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2298661
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Good security practice. Set to 077; resultant file permissions are:
-rw-------
BUG=b:160717634
BRANCH=none
TEST=unit tests
Change-Id: Ib3b853c824be4c98e7b9ddd31797104ec4ab67a9
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2302962
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we reboot the AP (a.k.a. warm-reboot) to transition to dev
mode in legacy_menu_ui; and reboot the EC (a.k.a. cold-reboot) in
menu_ui and legacy_clamshell_ui.
This patch makes legacy_menu_ui also reboot the EC.
BUG=b:154228771
BRANCH=none
TEST=make runtests
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: Ie48c8ef5e8744102c8dbafb7929523c54b14d81d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2293050
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We appear to intend to supply --gc-sections all the time, but the
calling environment may provide its own LDFLAGS which will override
this.
BUG=none
TEST=build for both SDK and target; watch (with V=1) that --gc-sections
is really supplied
Signed-off-by: Brian Norris <briannorris@chromium.org>
Change-Id: Icdcdc3e730e3898b6058f2e3e750a7cdda87e74b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2283843
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are linker commands, not compiler (even though we use CC as LD).
Use LDLIBS consistently, and don't provide CFLAGS.
This improves clarity and consistency, even if it still doesn't truly
separate CC and LD.
BUG=none
TEST=build
Cq-Depend: chromium:2285152
Signed-off-by: Brian Norris <briannorris@chromium.org>
Change-Id: Ie54fafdccab5b9c942fc2cc38009c75f3d46a5e4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2281964
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move TPM callback definitions from vboot_api.h to 2api.h.
BUG=b:124141368, chromium:968464
TEST=make clean && make runtests
BRANCH=none
Cq-Depend: chromium:2282023
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: Iad9da9fd3b6786609148d08b88f2e62ac3dee627
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2282322
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, if we see an error box displayed on the screen, and we hit
return, not only will we exit the error box, but we will also process
the key (ie: return) on the background screen and advance to another
screen. Correcting this by setting key to 0, thus skipping all the
actions on the background screen in ui_loop() after exiting the error
box.
BUG=b:144969091
BRANCH=puff
TEST=dut-control power_state:rec
press ctrl-d
press return
make sure we exit the error box only and don't advanced to the
next screen
Signed-off-by: Shelley Chen <shchen@google.com>
Change-Id: I64f67bb175b4a67a885b368334fb19f4cf288883
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2278925
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Shelley Chen <shchen@chromium.org>
Commit-Queue: Shelley Chen <shchen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Group TPM-related API functions together in the same section.
BUG=b:124141368, chromium:968464
TEST=make clean && make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: Ic7fb8b90c3c68a568d75f8c98738bf8cea744622
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2282321
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an argument 'timer_disabled' to vb2ex_display_ui(), which will be
used when drawing dev mode screen to show the appropriate screen
descriptions.
BRANCH=none
BUG=b:146399181, b:157871585
TEST=make runtests
TEST=emerge-puff depthcharge
Cq-Depend: chromium:2236550
Change-Id: I48b46838f482bce612106b840476f5f941cc1166
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2241492
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's some code that is architecture specific, but looking at
it, it's code for Chrome OS devices that just happens to be
split along ISA lines.
When building on systems that we don't ship crossystems integration for,
these parts are replaced by stubs that always return error conditions,
which allows building on unsupported ISA (such as POWER).
The issue was reported at https://ticket.coreboot.org/issues/145
where a coreboot user wanted to build a vboot-enabled coreboot
configuration (which builds futility for the signing part) on a
POWER host system, which failed because we lack an implementation
of the crossystem interfaces for POWER.
BUG=none
BRANCH=none
TEST=Built upstream coreboot with a vboot-enabled target inside
qemu-user-ppc64. Doing so works with these patches applied
while it failed without them.
Change-Id: I4aaeb56d4521c426a520bc9a1bb49497bec86c35
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2270096
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a stack storing previous screen states. When the user clicks
"Back" or presses ESC, revert to the previous state.
In order to deal with the possibility of a UI cycle (repeatedly
selecting the same sequence of screens) which would eventually
use up all available memory, re-use existing target screen states
within the stack. In other words, when switching to a specific
screen which already exists in the stack, pop until that screen
is reached, rather than creating a duplicate stack entry.
BUG=b:146399181, b:158256196
TEST=make clean && make runtests
BRANCH=none
Change-Id: I6fbebc2abb11b26d95d4fcf841eb195b3d589396
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2214617
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding an enum parameter to vb2ex_display_ui to facilitate printing
errors to the screen. Currently, errors are only printed to the
serial console. Also adding in beep if an error is displayed.
BUG=b:144969091,b:158635317,b:158639298,b:146399181
BRANCH=None
TEST=Boot into dev warning screen and try to hit ctrl-u when no USB is
plugged in. Ensure error beep occurs.
Ensure in dev mode. Boot into recovery and press ctrl-d.
Ensure that error message is printed to the screen and beep occurs.
make runtests
Cq-Depend: chromium:2243513
Change-Id: I548d624532ad8816497c37a726275b33171e28dc
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2243196
Tested-by: Shelley Chen <shchen@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Shelley Chen <shchen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new flag VB2_SECDATA_KERNEL_FLAG_PHONE_RECOVERY_UI_DISABLED to
vb2_secdata_kernel_flags to separate phone recovery functionality from
UI instructions. Also add vb2api_phone_recovery_ui_enabled() to control
the UI behavior.
BRANCH=none
BUG=b:156532222
TEST=make runtests
Cq-Depend: chromium:2260155
Change-Id: Ib91a206e680ba2cb47762d8a5c0c0ce146918b7d
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2259632
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add power off options to screens.
BRANCH=none
BUG=b:146399181, b:145098577
TEST=make runtests
TEST=USE="menu_ui" emerge-nami depthcharge
Cq-Depend: chromium:2237367
Change-Id: I356c56361a4282b456c3a4661e518a84944e983b
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2237366
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide makeshift debug info functionality while implementation
of the proper screen is in progress.
BUG=b:146399181, b:144969088
TEST=Build and flash; check <TAB> functionality
TEST=make clean && make runtests
BRANCH=none
Cq-Depend: chromium:2253732
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I0a738f731361d1c344c8fc8f5ecdef5b892f5ba7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2253733
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Shelley Chen <shchen@chromium.org>
Commit-Queue: Shelley Chen <shchen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add polling screens for booting from external disk in dev mode.
BRANCH=none
BUG=b:146399181, b:158973903
TEST=make runtests
TEST=emerge-puff depthcharge
TEST=1. Enter developer mode screen
2. Select "Boot from external disk", then screen changes to
DEVELOPER_BOOT_EXTERNAL
3. Plug in invalid usb, then screen changes to
DEVELOPER_INVALID_DISK
4. Unplug usb, then screen changes back to
DEVELOPER_BOOT_EXTERNAL
5. Plug in valid usb, then device boots successfully
Cq-Depend: chromium:2245066
Change-Id: I633f16ca0d92eaf27eb3b7630ee61b2044942741
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2246298
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=make
BRANCH=none
Signed-off-by: David Benjamin <davidben@chromium.org>
Change-Id: I4193d01bf9e65aff1567d4d00ae38811b61ad4c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2252761
Commit-Queue: Joel Kitching <kitching@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently this had perror to print the error message, but we can get
rid of this and the constructor function reasonably if we switch to
VB2_DEBUG.
This was changed since the Loonix team cannot rely on glibc-specific
behaviors, and passing argv to constructor functions is
glibc-specific. See the notes on cl/316913250 for a little bit of
background.
BUG=none
BRANCH=none
TEST=unit tests
Change-Id: I5de76306d5a8615fdc3afcfb772a2eb32557aa87
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2251039
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This relands CL:2218891, which was reverted as the "mkbp" case was
forgotten, and lit all sorts of stuff on fire when the CQ skipped
hardware tests and the lab was accidentally soaked in gasoline.
The devices which this affected are re-enabled in the lab, the CQ is
now configured to enable hardware tests, so let's land it again ;)
BUG=chromium:1032351,chromium:1030473,chromium:789276
BRANCH=none
TEST=On scarlet and nyan_kitty, read and write using crossystem
Change-Id: Ife4d17eeca484a2784f7e2b2f7c22fef27b9d083
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2251049
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add beep tests for testing the beep duration and frequency.
BUG=b:146399181, b:156448738
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=CC=x86_64-pc-linux-gnu-clang; DETACHABLE=1;
make clean && make runtests
TEST=CC=x86_64-pc-linux-gnu-clang;
PHYSICAL_PRESENCE_KEYBOARD=1;
make clean && make runtests
BRANCH=none
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ifb3231a43195e51900139a98ab2696cee244a009
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2249261
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unit tests paired with CL:2192863.
BUG=b:146399181, b:156448738
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=CC=x86_64-pc-linux-gnu-clang; DETACHABLE=1;
make clean && make runtests
TEST=CC=x86_64-pc-linux-gnu-clang; PHYSICAL_PRESENCE_KEYBOARD=1;
make clean && make runtests
BRANCH=none
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I40bb9fbe111a1ab6e6123bc18af0753100bfb08b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2228255
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=none
TEST=make runtests
TEST=emerge-puff depthcharge
Cq-Depend: chromium:2241263
Change-Id: I4ebfadda3a41c09662f241f04c251784716784e3
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2241418
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to ensure that the TO_DEV action function does not
trigger TO_DEV confirmation for the PHYSICAL_PRESENCE_KEYBOARD=1
case, use trusted DOWN and ENTER keys to navigate and press the
"Cancel" button. If this is erroneously picked up by the TO_DEV
action function, then a transition to developer mode will occur.
This hole in test coverage was discovered by CL:2234678.
BUG=b:146399181
TEST=PHYSICAL_PRESENCE_KEYBOARD=0 make runtests
TEST=PHYSICAL_PRESENCE_KEYBOARD=1 make runtests
BRANCH=none
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: Id8db074e4e9398a2f7fbfe348059c2c195bc8d90
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2237088
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fmap_base utility no longer needed since b:157897361
BUG=chromium:1091253
BRANCH=none
TEST=Compiled, cros_workon_make test,
and cros deploy to kindred device to confirm
there was no fmap_parameter.
Change-Id: Idc89c82555531030beaf8f84ce483a5f49a86fbe
Signed-off-by: Aaron Massey <aaronmassey@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2241386
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We caused a boot-speed regression as we are currently verifying the
entire flash chip after any write.
Flashrom has an option --fast-verify which verifies only the region
written, which is significantly faster. It also looks like this is
the way mosys used to handle flashrom writes, so we can align with the
old behavior this way.
BUG=chromium:1091903
BRANCH=none
TEST=unit tests, and boot speed regression went away (on octopus)
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: If8d2288cb0c08e8644b6e05f7b174c3c21542f94
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2242738
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename enumerators of the vb2_dev_default_boot_target enum as follows,
because the term USB is not quite accurate (we can also boot from an SD
card).
VB2_DEV_DEFAULT_BOOT_TARGET_DISK
--> VB2_DEV_DEFAULT_BOOT_TARGET_INTERNAL
VB2_DEV_DEFAULT_BOOT_TARGET_USB
--> VB2_DEV_DEFAULT_BOOT_TARGET_EXTERNAL
Also perform similar renaming for the following.
enum vb2_nv_param:
VB2_NV_DEV_BOOT_USB
--> VB2_NV_DEV_BOOT_EXTERNAL
enum vb2_secdata_fwmp_flags:
VB2_SECDATA_FWMP_DEV_ENABLE_USB
--> VB2_SECDATA_FWMP_DEV_ENABLE_EXTERNAL
constants:
VB2_NV_DEV_FLAG_USB
--> VB2_NV_DEV_FLAG_EXTERNAL
functions:
vb2_dev_boot_usb_allowed
--> vb2_dev_boot_external_allowed
BRANCH=none
BUG=none
TEST=make runtests
Change-Id: Iad16fcf34d76da08c6d8a81e150c7fde927c743b
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2237622
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 9a923c7dba003a5ddbc55937469c975689effa62.
Reason for revert: https://crbug.com/1093191
Original change's description:
> crossystem: arm: switch to VBNV using flashrom from mosys
>
> Most ARM platforms will store VBNV in SPI flash by calling out to
> mosys, which in turn calls out to flashrom.
>
> The set of parent CLs to this commit port this functionality from
> mosys directly to vboot's host libraries. This CL switches to use the
> new functionality.
>
> (The CL to switch is provided as a separate CL for ARM only so it's an
> easy and clean revert should something go wrong.)
>
> BUG=chromium:1032351,chromium:1030473,chromium:789276
> BRANCH=none
> TEST=On scarlet, read and write VBNV using crossystem
>
> Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
> Change-Id: I1949522b665170ebeb35f3c46177f1957980d6a3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218891
> Reviewed-by: Joel Kitching <kitching@chromium.org>
Bug: chromium:1032351, chromium:1030473, chromium:789276
Change-Id: I3ccb6c6653e24e61072ee9227e870a2f211cd114
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2237617
Reviewed-by: Shik Chen <shik@chromium.org>
Commit-Queue: Shik Chen <shik@chromium.org>
Commit-Queue: Stimim Chen <stimim@chromium.org>
Tested-by: Stimim Chen <stimim@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add vb2api_use_short_dev_screen_delay() to vboot2 API.
BRANCH=none
BUG=b:146399181, b:157871585
TEST=make runtests
Change-Id: Ice4852a7505e8dba73fa2026e8d433b8e487f556
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2235292
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Publicize vb2_get_dev_boot_target() as
vb2api_get_dev_default_boot_target(), and move enum vb2_dev_default_boot
to 2api.h as enum vb2_dev_default_boot_target.
BRANCH=none
BUG=b:146399181, b:157871585
TEST=make runtests
TEST=emerge-puff depthcharge
Change-Id: I8336e63cc273c32a41e6b1f2aad886c3940a6aef
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2234788
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most ARM platforms will store VBNV in SPI flash by calling out to
mosys, which in turn calls out to flashrom.
The set of parent CLs to this commit port this functionality from
mosys directly to vboot's host libraries. This CL switches to use the
new functionality.
(The CL to switch is provided as a separate CL for ARM only so it's an
easy and clean revert should something go wrong.)
BUG=chromium:1032351,chromium:1030473,chromium:789276
BRANCH=none
TEST=On scarlet, read and write VBNV using crossystem
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I1949522b665170ebeb35f3c46177f1957980d6a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218891
Reviewed-by: Joel Kitching <kitching@chromium.org>
|