| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, x86 platforms with vboot2 will backup VBNV in SPI flash
using mosys, which will in turn execute flashrom to preform the
underlying operation.
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 x86 only so it's an
easy and clean revert should something go wrong.)
BUG=chromium:1032351,chromium:1030473,chromium:789276
BRANCH=none
TEST=On octupus, write VBNV using crossystem and manually inspect
RW_NVRAM region in SPI flash.
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I9f945dca99ebd394abea1490fa25d3763834bfa1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218890
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Physical presence checks in VbUserConfirms are only invoked
when PHYSICAL_PRESENCE_KEYBOARD=0. Disable these tests when
PHYSICAL_PRESENCE_KEYBOARD=1.
BUG=chromium:943150
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: I0c32913549a856855918c54378e5d265851abe37
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2237086
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 8dac1697aef0114584d737e6a3027b55abdae5f0.
Reason for revert: Case sensitivity was turned off in https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2192537. This quirk is no longer needed. It could result in accidental overwriting with incompatible firmware.
Original change's description:
> futility: Adds platform check quirk for zork
>
> Adds a quirk for futility on zork boards.
> Zork boards before 13073 used lowercase for the firmware
> names which causes the compatible platform check fail.
>
> This adds the disable_compatible_platform_check quirk and
> enables it by default for zork boards.
>
> BUG=b:156119908, b:155941790
> TEST=flashed Google_trembyle.13066.0.0 using servo
> chromeos-firmwareupdater --force
> rebooted and confirmed Google_Trembyle.13073.0.0 was flashed
> BRANCH=none
>
> Change-Id: I6fc6bf5bb42b725b5e7c9d0166f945b9c123bab4
> Signed-off-by: Rob Barnes <robbarnes@google.com>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2191089
> Reviewed-by: Edward Hill <ecgh@chromium.org>
> Reviewed-by: Eric Peers <epeers@google.com>
> Commit-Queue: Edward Hill <ecgh@chromium.org>
Bug: b:156119908, b:155941790
Change-Id: I4688a380dbcd722e8875bf0b5331ecf797efd6a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2197277
Tested-by: Rob Barnes <robbarnes@google.com>
Tested-by: Bhanu Prakash Maiya <bhanumaiya@chromium.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Commit-Queue: Bhanu Prakash Maiya <bhanumaiya@chromium.org>
Commit-Queue: Rob Barnes <robbarnes@google.com>
Auto-Submit: Rob Barnes <robbarnes@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vbutil_kernel --verify didn't check if the size of the kernel body fit
the file it was in. Now it does.
BRANCH=None
BUG=None
TEST=make runtests
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I9cdfd50bd70b72650cdc0fd62bf59a394746ad84
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2225663
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When multiple servo boards are connected to the host, we usually want to
select the right servo by specifying its port, get the servo serial
number, and pass that to flashrom programmer.
The new --servo_port (or environment variable SERVOD_PORT) now allows
developers to flash firmware via specific servod using futility updater
easily:
futility update --servo_port 9998 -i PATH_TO/image.bin
BRANCH=None
BUG=None
TEST=make runtest; sudo futility update --servo_port 9998 -i image.bin
Change-Id: Ic302f841abf745801995ff233fc209726ed039c8
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2228258
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The recent format changes to the kernel TPM NVRAM space weren't
reflected in the chromeos-tpm-recovery utility yet. This patch fixes
that. Since this may require upgrading from the old to the new format
(or even the other way around), we also have to fix the longstanding
limitation of not recreating TPM spaces for TPM 2.0. We still cannot do
that for the firmware TPM space, but at least we can add it for the
kernel one.
BRANCH=none
BUG=chromium:1020578,b:155149943
TEST=Ran on a Trogdor
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Iaf9bc6b29f76cfeaab90ae4f99099735c4f9441b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2227260
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unit tests paired with CL:2186958.
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
Cq-Depend: chromium:2228256
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ife471db3f1f2e945f1517e865b22cf0d0fdfe451
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2217549
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split out screen tests with individual test items.
Add three macros which record line numbers:
DISPLAYED_EQ, DISPLAYED_PASS, and DISPLAYED_NO_EXTRA.
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: I712e009658fecad66553423c2d05e8e7c9df7e08
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2228254
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Broken recovery mode should not access to_dev screen.
BUG=b:146399181
TEST=CC=x86_64-pc-linux-gnu-clang;
make clean && make runtests
BRANCH=none
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: I3e5802c14968aafe40d25e69505c518c0c5b45d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2228256
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Finish implementing phone recovery screen step 1, and
implement step 2. (Step 3 is in initramfs.)
BUG=b:146399181
TEST=make clean && make runtests
BRANCH=none
Change-Id: I3b18aa0d6c5ec93cb9b69fec7976db434270db79
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2220820
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement disk recovery screens for all the 3 steps.
BRANCH=none
BUG=b:146399181
TEST=USE="menu_ui" emerge-nami depthcharge
Change-Id: Iea8fe4650cecb63ea519084ec8a71325ba4e3ebb
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2211981
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement language selection screen, and add language item to all the
other screens. Add a default screen init function default_screen_init()
to initialize the default selection to the second item if the first item
is the language selection.
BRANCH=none
BUG=b:146399181, b:144968920
TEST=make runtests
TEST=USE="menu_ui" emerge-nami depthcharge
Cq-Depend: chromium:2193151, chromium:2192508
Change-Id: I3251b0095ec29ec26cc27745b1089e60894c892c
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2196095
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unit tests paired with CL:2168072.
BUG=b:146399181, b:156448738
TEST=make clean && make runtests
TEST=make clean && DETACHABLE=1; make runtests
TEST=make clean && PHYSICAL_PRESENCE_KEYBOARD=1; make runtests
BRANCH=none
Cq-Depend: chromium:2214457
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ic6b109c514e1582d7eb29040135aeaa884b243be
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2198274
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have two different mock inputs currently, and soon to be three.
Since the input-solving order should not be strictly defined, it is
difficult to write complicated scenarios under current approach. We
cannot make sure if the ui_loop implementation exits earlier and
ignores certain mock inputs.
This CL synchronizes mock inputs with an iteration counter. We can
write detailed scenarios by assigning the inputs iter-by-iter.
BUG=b:146399181, b:156448738
TEST=make clean && make runtests
TEST=make clean && DETACHABLE=1; make runtests
TEST=make clean && PHYSICAL_PRESENCE_KEYBOARD=1; make runtests
BRANCH=none
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Change-Id: Ia839a6614eb0453b9f64075298a89a2db59d4070
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2217532
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extract print_passed() and print_failed() from test_eq(), and use them
consistently in all testing functions in test_common.h.
BRANCH=none
BUG=none
TEST=make runtests
Change-Id: I1d4dbf13c9ae1a8130ea7af2733044d0556fa974
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2217547
Reviewed-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the returned value is not an error (such as VB2_REQUEST_*), do not
call vb2api_fail() from VB2_TRY() to request recovery.
During EC sync, instead of explicitly setting VB2_NV_RECOVERY_REQUEST in
nvdata to request recovery, utilize vb2api_fail() instead to try the
other AP slot before giving up on EC sync and going into recovery.
In addition, remove the retry of EC RO sync for the following reasons.
EC sync rarely fails, and even if it does, it's not very likely to be a
transient problem that disappears on the next attempt. Besides, the RO
sync is just a debug feature that only people who have a servo attached
and can manually reflash should be using. Therefore, the retry is
removed and hence we no longer need to restore the recovery request in
nvdata.
BRANCH=none
BUG=chromium:1075488
TEST=make runtests
Change-Id: I9ad8e5e0886679a9a342449553170317b010237b
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2145272
Reviewed-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...also inflate my personal CL stats.
BUG=None
TEST=None
BRANCH=master
Signed-off-by: George Engelbrecht <engeg@chromium.org>
Change-Id: I4af2d8b2aa42b4e6d4d4ea36a6ca73a340aa4814
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2220336
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: George Engelbrecht <engeg@google.com>
Tested-by: George Engelbrecht <engeg@google.com>
Auto-Submit: George Engelbrecht <engeg@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also add the 2api.h include for vboot2-style stubs.
BUG=b:124141368
TEST=make clean && make runtests
BRANCH=none
Change-Id: Id6522ea139126adce6cee5ba225ab3eb78f31b7e
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218539
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create VB2_ERROR_EX_SET_VENDOR_DATA error code for use in
VbExSetVendorData callback.
BUG=b:124141368, chromium:988410
TEST=make clean && make runtests
BRANCH=none
Cq-Depend: chromium:2218538
Change-Id: I9d75a608185e475837d9cb4a53b943fd2dae6438
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2218537
Tested-by: Joel Kitching <kitching@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move VBERROR_PERIPHERAL_BUSY to vboot2 namespace as:
VB2_ERROR_EX_AUXFW_PERIPHERAL_BUSY
BUG=b:124141368, chromium:988410
TEST=make clean && make runtests
BRANCH=none
Change-Id: Iebc7d73e3a87a8bd4d999be56ad23d6b77d9785c
Signed-off-by: Joel Kitching <kitching@google.com>
Cq-Depend: chromium:2158865
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2158512
Reviewed-by: Joel Kitching <kitching@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Tested-by: Joel Kitching <kitching@chromium.org>
|