| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL enabled the pre-boot diagolostic tools entry in recovery mode.
BRANCH=none
BUG=b:176947486
TEST=CQ
TEST=FEATURES=test P2_TEST_FILTER='*' emerge-zork vboot_reference
TEST=manually build, flash FW to device, and confirm minidiag works
Signed-off-by: Meng-Huan Yu <menghuan@chromium.org>
Change-Id: I8500cbaaa4e8d0f1aa668d56d38095ecdcf50aaf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2617391
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some devices may have flashed firmware with different platform name in
their early stage (especially in the first build of leading devices),
so we do want to provide an explicit way (not just --force) to skip
checking platform name.
The change CL:2059621 does not help because the loaded system
firmware looks good.
This is implemented as a quirk so we can enable it using a CBFS quirk
file, making it easier to be deployed by auto update.
BRANCH=None
BUG=None
TEST=make runtests
Change-Id: I888d5848921d31c9b7cba1b96c42d38fda71927e
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2573999
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we used a flag in preamble to prevent HW acceleration for SHA
hashing. However we started to use kernel TPM flag for RSA part since we
can use the flag in preamble only after we verified preamble.
No need to keep both for same objective, so deprecate old flag and
change code to use TPM flag.
BUG=b:166038345
BRANCH=zork
TEST=CC=x86_64-pc-linux-gnu-clang make runtests
TEST=boot Ezkinil, check HW acceleration is used for SHA
Signed-off-by: Kangheui Won <khwon@chromium.org>
Change-Id: I81b174dbe285fa3f68a22667b6af14a52b06b112
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2566866
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:146399181, b:167643628
TEST=make clean && make runtests
TEST=Build and flash to device
BRANCH=none
Cq-Depend: chromium:2512739
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: Ia8d95451d55142fbe9acaa6e49de9b5abe134083
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2512740
Reviewed-by: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support multi-line title for log screens, we need to support
different size of log box in each screen. Therefore, pass the screen and
locale information to vb2ex_prepare_log_screen() so that the number of
lines per page can be determined.
BUG=b:165187866
TEST=emerge-asurada depthcharge
BRANCH=none
Cq-Depend: chromium:2522156
Change-Id: I652d6261ed559a948e7bd578da3ec81d54374039
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2522416
Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If an iteration takes longer than KEY_DELAY_MS, no extra delay.
Otherwise, delay until the iteration time reaches KEY_DELAY_MS.
BUG=b:168776970
BRANCH=none
TEST=Build locally
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ia78dbe1cc87d08c02f99f4fc9269929c12c18b77
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2424373
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Do not check if delay is aborted every time since we already have
an individual test item.
- Do not save the last return value of vb2ex_mtime() to allow us to use
vb2ex_mtime() elsewhere.
- Use fuzzy match for `delay finished` test items.
BUG=b:156448738
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: Ic211955637c67dc35ffd4c12194a8ccb77e1bf9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2508104
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add several constants in 2ui_private.h for testing:
- KEY_DELAY_MS
- DEV_DELAY_SHORT_MS
- DEV_DELAY_NORMAL_MS
- DEV_DELAY_BEEP1_MS
- DEV_DELAY_BEEP2_MS
BUG=b:156448738
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: I7349d5214a90699fda67135329d7a6b93022bb27
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2513418
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For test/vb2_ui_tests.c:
- Rename mock_get_timer_last to mock_get_timer_last_ms.
- Rename mock_time to mock_time_ms.
- Rename mock_time_start to mock_time_start_ms.
For 2lib/2ui.c and 2lib/2ui_screen.c:
- Rename start_time to start_time_ms in struct vb2_ui_context.
- Rename elapsed to elapsed_ms in developer_mode_action().
BUG=b:156448738
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: Icabe04003f0dc95f41c9ed8b8e2292f1f64e86bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2513417
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The firmware updater now looks at CBFS 'FW_MAIN_A' (RW A) and if a text
file 'updater_quirks' is found, the contents will be fetched to setup
default quirks.
This helps sharing same customization across multiple firmware images
(for different models) shared by same unibuild OS image. Without that,
we have to maintain a large list of hard-coded model names in firmware
updater source.
BRANCH=none
BUG=b:169284414
TEST=make runtests
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: I938bffe9f16bc3adee0dc3efb6976efe581c6d8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2426093
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support loading quirks from external files, we want to skip tab (\t)
and new line characters (\n, \r).
BRANCH=none
BUG=b:169284414
TEST=make runtests
Change-Id: If314d6cf36907837ce9c36b73337976ee0c6fad1
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2467305
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
Commit-Queue: Karthikeyan Ramasubramanian <kramasub@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add three macros in 2api.h for bitmask operations:
- VB2_SET_BIT(mask, index)
- VB2_CLR_BIT(mask, index)
- VB2_GET_BIT(mask, index)
These macros will be used in corresponding depthcharge CLs.
Split disabled_item_mask into:
- disabled_item_mask: Disabled style, but still visible and selectable.
- hidden_item_mask: Not visible.
Ignore selecting on disabled menu items.
Set appropriate disabled_item_mask for page up/down buttons in log
screen.
Revise tests of hidden_item_mask and add unit tests of disabled_item_mask.
BUG=b:163301076, b:146399181
BRANCH=none
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
TEST=CC=x86_64-pc-linux-gnu-clang; DIAGNOSTIC_UI=1;
make clean && make runtests
TEST=Build locally, navigate to debug info screen with <TAB>,
select page up or page down, and observe that nothing happens.
Cq-Depend: chromium:2432168
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I1607af53f6e2b5c1cde568cb24606314051d2380
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2426154
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Save parameters `timer_disabled` and `error_code` in mocked
vb2ex_displayed_ui calls to check whether the consecutive calls are
duplicate or not.
The unit tests of these parameters will be added in following CLs.
BRANCH=none
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
TEST=FEATURES=test PKGDIR=/build/puff/test-packages
/mnt/host/source/chromite/bin/parallel_emerge
--sysroot=/build/puff --jobs=32 vboot_reference
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I2b7c9b6b05d2427e938394ff9d0769fbde81f773
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2449310
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use packed structures to avoid unexpected error about padding.
BUG=b:156448738, b:170186754
BRANCH=none
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=FEATURES=test PKGDIR=/build/puff/test-packages
/mnt/host/source/chromite/bin/parallel_emerge
--sysroot=/build/puff --jobs=32 vboot_reference
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ibdcffe81d92db2880c53282a313ffa678af7d43d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2454911
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add vb2ex_hwcrypto_modexp support to accelerate only calculation part of
RSA and we can handle the rest. Instead of relying on opaque hardware
accleration for all RSA verification process, this will enable us to
maintain our security level while enhancing overall speed of
verification.
BRANCH=zork
BUG=b:169157796
TEST=make runtests
Signed-off-by: Kangheui Won <khwon@chromium.org>
Change-Id: I6f9fc919c4215964158815a58a9f1b338c2a76a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2444809
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Force to reacquire a newer firmware log snapshot every time when the
user enters the firmware log screen.
Re-entering (e.g. back from language selection or debug info tab) will
still show the cached firmware log string.
BUG=b:146399181, b:168442372
TEST=make clean && make runtests
TEST=Build locally, navigate to the firmware log screen,
go back, and enter the firmware log screen again.
BRANCH=none
Cq-Depend: chromium:2409742
Change-Id: I8c3eea23446c58603ce698a86f1aca4b264ebb0e
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2411761
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CL:2353775 made the functions tested by vb2_keyblock_fuzzer and
vb2_preamble_fuzzer look at secdata, which broke the fuzzer because they
don't initialize secdata the way a normal boot would. This patch makes
the fuzzers initialize both firmware and kernel secdata explicitly (and
nvdata as well for good measure, although I think it's technically not
needed).
BRANCH=None
BUG=chromium:1125143,chromium:1124172
TEST=None
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Id9aaa4d44a20455133adc4c2bc524895629edfb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2402423
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:163883397
BRANCH=None
TEST=make runtests
TEST=egrep -r -i -I '(sane|insane)'
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I109207575e2c00d6aa3b0ed17de7f699087a9658
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2369464
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce alternate boot functionality both via keyboard shortcut
("Ctrl+L") to directly boot into the default alternate bootloader,
and via menu ("Alternate bootloader" on dev screen) to show a screen
listing available bootloaders.
BUG=b:146399181, b:161092974
TEST=make clean && make runtests
BRANCH=puff, zork
Cq-Depend: chromium:2339040
Signed-off-by: Joel Kitching <kitching@google.com>
Change-Id: I28f157936017719dc95656db147967f5e61a1407
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2335017
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:156692539, b:156693348
TEST=emerge-hatch vboot_reference
TEST=unittest passed:
( export CC=x86_64-pc-linux-gnu-clang DEBUG=1 MENU_UI=1 DIAGNOSTIC_UI=1
MINIMAL=1 TPM2_MODE= MOCK_TPM=; make clean &&
make -j32 test_setup && make runtests; echo $? )
Cq-Depend: chromium:2322286, chromium:2328704, chromium:2336239
Cq-Depend: chromium:2361823, chromium:2361582
Signed-off-by: Meng-Huan Yu <menghuan@chromium.org>
Change-Id: I8b875b09bd5bcdb65f08c11945b046d2b3c3a113
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2372022
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Always show page up/down buttons in log screen.
Beep if users select the page up button on the first page or the page
down button on the last page.
BRANCH=puff, zork
BUG=b:146399181, b:163301076
TEST=emerge-puff depthcharge
TEST=emerge-zork depthcharge
TEST=navigate to the debug info screen by <TAB>
Cq-Depend: chromium:2361582
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I29a567554f9283ea3fca0f58fb31c7056523c2a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2361823
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:156692539, b:156693348
TEST=emerge-hatch vboot_reference
TEST=unittest passed:
( export CC=x86_64-pc-linux-gnu-clang DEBUG=1 MENU_UI=0 DIAGNOSTIC_UI=0
MINIMAL=1 TPM2_MODE= MOCK_TPM=; make clean &&
make -j32 test_setup && make runtests; echo $? )
( export CC=x86_64-pc-linux-gnu-clang DEBUG=1 MENU_UI=1 DIAGNOSTIC_UI=0
MINIMAL=1 TPM2_MODE= MOCK_TPM=; make clean &&
make -j32 test_setup && make runtests; echo $? )
( export CC=x86_64-pc-linux-gnu-clang DEBUG=1 MENU_UI=0 DIAGNOSTIC_UI=1
MINIMAL=1 TPM2_MODE= MOCK_TPM=; make clean &&
make -j32 test_setup && make runtests; echo $? )
( export CC=x86_64-pc-linux-gnu-clang DEBUG=1 MENU_UI=1 DIAGNOSTIC_UI=1
MINIMAL=1 TPM2_MODE= MOCK_TPM=; make clean &&
make -j32 test_setup && make runtests; echo $? )
Cq-Depend: chromium:2193314, chromium:2328704
Signed-off-by: Meng-Huan Yu <menghuan@chromium.org>
Change-Id: I4f3c64ce53b14437cb14d3c1109e14608d082141
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2318590
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement firmware log screen which can be accessed from advanced
options menu.
The screen displays a snapshot for the firmware log using the same
layout of debug info screen.
BRANCH=puff, zork
BUG=b:146399181, b:146105976
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
TEST=USE="menu_ui" emerge-puff depthcharge
TEST=USE="menu_ui" emerge-zork depthcharge
TEST=select "advanced options",
and navigate to firmware log screen
Cq-Depend: chromium:2334490
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I3cb5800d71925aa20ca4d5636172885e23fd0099
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2328241
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Developers may want to use the new GBB flags when flashing a firmware
image. That can be done by --factory, but it's also more convenient to
have a new parameter for overriding the flags with a new value.
BRANCH=none
BUG=b:166569397
TEST=make runtests
Change-Id: If9dce9b1f2fbb27655ad2a111ba75ab83375fb7a
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2382991
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add vb2ex_hwcrypto_rsa_verify support for RSA verification.
If firmware implements the function it will used instead of SW
implementation in vboot.
Also separate hwcrypto stubs to 2stub_hwcrypto.c for depthcharge and coreboot.
Depthcharge needs stubs but fails to compile 2stub.c
BRANCH=none
BUG=b:163710320, b:161205813
TEST=make runtests
TEST=check hwcrypto is allowed/disallowed depending on nvmem flag
Change-Id: I85573e7cff31f32043db4b0a6b24b642856024e3
Signed-off-by: Kangheui Won <khwon@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2353775
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, VB2_SECDATA_KERNEL_FLAGS controls experimental features
like phone recovery (and its UI), diagnostics entry. All of those
are under recovery screen. In order to allow later update pushes to
enable specific features in write-protected RO, we should not set
those flags in recovery path. Otherwise, it will always toggle back
and forth when booting RO recovery path vs. normal boot path.
BRANCH=puff
BUG=b:165181118
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
TEST=Cherry-pick locally to ToT of firmware-puff-13324.B with
chromium:2360066 to manually check flags on Kaisa device.
Change-Id: I7ec45b4ecfa6d50781cec2690dbc88894c734073
Signed-off-by: Chun-Ta Lin <itspeter@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2361983
Tested-by: Chun-ta Lin <itspeter@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Chun-ta Lin <itspeter@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will replace the usage of "mosys nvram vboot {read,write}" on x86
platforms, and all ARM platforms except veyron (chromebooks only) and
nyan_kitty (which use VBNV storage in the ChromeOS EC, deprecated for
new platforms). These affected ARM devices will be going AUE sometime
this summer, and we can expect to remove the mosys usage in crossystem
later this year.
The code to find the active VBNV in SPI flash was modeled to match the
logic in mosys (see mosys/lib/vbnv/vbnv_flash.c).
BUG=chromium:1032351,chromium:1030473,chromium:789276
BRANCH=none
TEST=provided unit tests
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I4f42af2f9a6b0703302635f8d8ebb2d7599d9847
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218889
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Lightweight wrapper around flashrom, exposing two APIs:
flashrom_read(programmer, region, data_out, size_out)
flashrom_write(programmer, region, data, size)
|region| can be NULL, in which case operate on the whole flash chip.
The intended usage of this wrapper library is to read/write VBNV from
SPI flash directly, avoiding the call thru mosys (which has deprecated
the command). Bringing this logic into crossystem directly will also
help with expanding VBNV to 64-bytes.
BUG=chromium:1032351,chromium:1030473,chromium:789276
BRANCH=none
TEST=provided unit tests
Change-Id: I3997bd03a2db7e58e4e76fc200c637dd3b5b20a4
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218888
|