| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new quirk will allow the updater to easily switch the underlying
flash driver between the libflashrom and the external flashrom.
BUG=None
TEST=build and run test
BRANCH=None
Change-Id: I5b9da373b1e22a948e04d844973a5683adffe63c
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3534489
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The libflashrom is still different from the real flashrom program.
To easily debug and compare the execution results (especially for
devices under development), we want to allow the updater to
switch between the libflashrom and the external flashrom.
The real switch (either a quirk or a command line argument) will
be added in a follow up change.
BUG=None
TEST=build and run test
BRANCH=None
Change-Id: I3f3226fd555dc9e7c40838cd1474e0d018b27ccc
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3500339
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'write_system_firmware' and 'load_system_firmware' have too many
parameters that are already contained in the updater_config.
To simplify the interfaces, we should just pass the updater_config to
{write,load}_system_firmware, and merge the write_firmware_sections
(only handling emulation and deciding the diff image) to the
write_system_firmware.
Also moved the utility functions only used by *_system_firmware (for
example is_the_same_programmer and emulate_write_firmware) to the
updater_utils.c.
The emulate_write_firmware is also revised to handle a list of sections
directly (so we don't need to handle that in write_system_firmware).
BUG=None
TEST=make; build and run test.
BRANCH=None
Change-Id: I4d123d12e8057da82d6c301899472e3773f3266e
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3508121
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Per discussion, the 'custom_label_tag' is easier to read than
'customlabel_tag'. We should rename it before any real devices
have started using the different names.
BUG=b:169766857
TEST=make; build and run test
BRANCH=None
Change-Id: I3672e7b20bc85f79796470ba1a58c2896d26ff88
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3534491
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It should be VB2_NV_DISABLE_DEV_REQUEST, not VB2_NV_DIAG_REQUEST.
BUG=b:172339016
TEST=none
BRANCH=none
Change-Id: Id35ea2680dd55d830991cf118f4e9c97f52eb0cb
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3532539
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=still builds
BRANCH=none
Change-Id: I3b244461b86c8aeec4f33ad7205157c709e0d695
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3524288
Reviewed-by: Reka Norman <rekanorman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Meteor Lake platform, the pinctrl (gpiochip) driver label is
"INTC1083:00", hence declare it properly.
BUG=b:224325352
TEST=Test pending
Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I9c1583972e71ae472c8b3f360eda34611c8c8f0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3520099
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: Subrata Banik <subratabanik@chromium.org>
Commit-Queue: Subrata Banik <subratabanik@chromium.org>
Auto-Submit: Subrata Banik <subratabanik@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When checking the sections to update in the RW-recovery flow, we should
always check the availability before adding them to the list for
updating.
BUG=None
TEST=build and run test
BRANCH=None
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: Id714b1db736cbf4eef879566431e5a496f319cd4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3494671
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The updater should always only update the whole image when write
protection is disabled, or partial (RW) when write protection is
enabled. As a result, it should be better to always turn on -N
(--noverify-all) for two reasons: (1) faster partial write, and
(2) prevent failure due to other processors accessing the flash
in parallel.
- Faster partial write:
On recent x86 Chromebooks the flash size is getting bigger and bigger
(for example 32M on Brya) and the RW section size is much smaller
(8M on Brya). So we wasted a lot of time reading and verifying
sections that we don't care (64M versus 16M) if we don't turn on -N.
- Concurrent access:
On recent x86 devices the system flash is shared by two processors -
the CPU and the CSME. Before the ME is locked, CPU can see and access
all regions - including those managed by ME/CSME. As a result, when
the updater is changing the RW_SECTION, the CSME may be updating
CSE_RO or CSE_RW on its own. So if we don't turn on -N, the
verification will fail in CSE regions.
Also revised to only set FLASHROM_FLAG_VERIFY_AFTER_WRITE one time.
BUG=None
TEST=make; build and run tests.
BRANCH=None
Change-Id: I1ebff2d7f00b85037464eff4fa5d4573f867ce44
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3505290
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support new VPD name 'customlabel_tag' for the custom label program.
For shipped devices (firmware is already locked and write protected) we
still support the legacy name.
The quirk 'allow_empty_wl_tag' also renamed to
'allow_empty_customlabel_tag'.
This is usually not recommended, but given no devices have used this
quirk in the CBFS quirks, it should be fine to change the quirk name.
BUG=b:169766857
TEST=make; build and run test
BRANCH=None
Change-Id: Ia29051a4e829d853cc60488f286d575c20f52f20
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3503199
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Small refactor to make it easier to more towards
libflashrom. This makes the call site responsible for
setting up the path for ReadNorFlash().
BUG=b:207808292,b:220079643
BRANCH=none
TEST=`make cgpt`
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: I15fc57e5afca6206b60df92616fd4cdce63b03e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3469738
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Small refactor to make it easier to more towards libflashrom.
BUG=b:207808292,b:220079643
BRANCH=none
TEST=`make cgpt`
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: Ie0c7f4faee3052300b10ba2d1adce7876d7b821c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3469737
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C2D2 is used similarly to servo micro. Mirror the servo micro logic
accordingly.
BUG=b:220992685
TEST=futility update --servo over C2D2 with and with servo v4
BRANCH=None
Cq-Depend: chromium:3470605
Change-Id: I298fe5847abba0957fa5c2da4e1981a7da9e0428
Signed-off-by: Sam McNally <sammc@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3469746
Reviewed-by: Reka Norman <rekanorman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To get more message for debugging, we want to increase the verbosity on
each retry.
BUG=None
TEST=build and run tests
BRANCH=None
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: I85e0fc518113a18bb1aaa39db3f58329d94b5ecb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3500326
Reviewed-by: Subrata Banik <subratabanik@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:207808292,b:220079643
BRANCH=none
TEST=`make cgpt`
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: I367e44eed18c79a807bd428e50a3faf926833719
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3461097
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The write_firmware_sections now supports writing multiple sections in
one invocation so we can pass all RW sections to it for the recovery
update.
On Brya, the total execution time may be reduced from 4 mins to
1.5 mins.
BUG=b:221137867
TEST=build and run test
BRANCH=None
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: Ifbc67327a02096e027c1e2025485ebb17645a71d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3490387
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new function 'write_firmware_sections' so we can write update
sections in one write_system_firmware (e.g., flashrom) command.
BUG=b:221137867
TEST=build; and run test
BRANCH=None
Change-Id: Ia33ec5ac82e1c661457180ec45df6c02beae4ec3
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3490389
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When we have multiple regions to update, invoking flashrom_write_image
multiple times will take much longer because for each write it has to
read the whole flash, write and then verify whole flash (also timer
calibration and programmer init/shutdown every time).
As a result, we want to support writing multiple regions - just like
that flashrom can take arbitrary numbers of "-i REGION".
This change only extended flashrom_write_image, and the firmware updater
is calling flashrom_drv multiple times. That will be addressed in the
follow up changes.
BUG=b:221137867
TEST=build; and run test
BRANCH=None
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: Id335cc9f816f1384f1886422efa97fe2c7b81aec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3490388
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately the USE_FLASHROM build flag broke during a refactor
in commit f0af257a9b333b. This flag is needed for coreboot builds.
Resolve by putting relevant files under guards.
BUG=b:221234560,b:220833585
BRANCH=none
TEST=`USE_FLASHROM={0,1} make`
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: Ic10a3909bf070897cef7f1556deef57eba6c57f3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3493527
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Commit-Queue: Martin Roth <martinroth@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, Depthcharge prevents the kernel from being loaded if
NO_BOOT flag is set. This makes sense only when EC sync is enabled.
This patch makes VbSelectAndLoadKernel ignore NO_BOOT flag if
VB2_CONTEXT_EC_SYNC_SUPPORTED isn't set.
BUG=b:216317864
BRANCH=None
TEST=None
Change-Id: Ic501f430754947dfa8a2243dcb12d31232b18b75
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3433028
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we decide if the flash command can use the image_current as
the diff image by comparing if the target image pointer is identical to
the host image to write (cfg->image). This may not work properly if we
try to write a temporary firmware image object loaded separately.
A more correct way to is check if the image has the same programmer from
the diff image (e.g., image_current).
BUG=b:221137867
TEST=build and run futility tests.
BRANCH=None
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: Iee61cd9b47c0db4b87001bbb348f95a89495b975
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3490386
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To help debugging:
- Print equivalent flashrom commands when reading and writing.
- Print <sys-flash> instead of <none> in 'Current system:' message.
- Always print the detected model from libcrosid.
- After writing to flash, print a new line.
BUG=None
TEST=make; build and run test
BRANCH=None
Change-Id: I34a73ec1c968a98a9fca649c65863aa43ca39ca8
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3461090
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During the flashrom initialization sequence the return code is not
being checked therefore there's a potential that the code moves
forward with read/write operation even with outstanding error.
This CL checks the return code and bail with error.
BUG=b:217629892
TEST=Test futility update with multiple instances of flashrom running.
BRANCH=None
Signed-off-by: YH Lin <yueherngl@chromium.org>
Change-Id: I0768232f6af35290ad7b3d9f479ee299bf9400e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3485520
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'match by firmware name' should be deprecated. All new platforms
should use quirk instruction files (updater_quirks) from CBFS.
BUG=None
TEST=None (comments only)
BRANCH=None
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: Ib66cc903b15bf3fdb44db832a010d80c40bfbaa4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3458024
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'ec_partial_recovery' quirk is not very helpful today because the
two underlying functions - "EC RO software sync" and "update EC RO
without sysjump by flashrom" are either disabled or not well tested.
As a result we should change the quirk from "decide by runtime" to
"default disabled".
BUG=b:218612817
TEST=make; build and run test
BRANCH=None
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: I9022b88516e52cb89f2226523a754dc2a00b15da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3458023
Reviewed-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow for picking the default verbosity with a sentinel
value of -1.
BUG=b:207808292
BRANCH=none
TEST=none
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: Ia3a21e8647fe480c60ea80ecb060466e9d86110a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3461094
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Commit-Queue: Nikolai Artemiev <nartemiev@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bring sub-process and libflashrom wrapper implementations
under the common host/lib path to later be reconciled.
The WP implementation is left separated out due to the
lack of a libflashrom WP implementation which creates
circular dependencies for the moment.
BUG=b:207808292
BRANCH=none
TEST=none
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: Ic759c4e9828778a0ef1443b163224aef2c7cba54
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3461093
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:207808292
BRANCH=none
TEST=none
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: I49bd29dcfe12ad9845213d07bc6bee71980a8cd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3461092
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:207808292
BRANCH=none
TEST=none
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: Iaf94b5cc8c7b4f4b7859f10b8078e922bc1636d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3450057
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow custom programmers to be used instead of host for getting and
setting GBB flags via a --programmer/-p flag similar to the same flag
for futility. Also support --servo with the same semantics as the
futility flag - detecting the programmer to use from the current servod
instance mirroring the logic in futility. Only CCD is supported at this
stage.
When reading, include the FMAP section as well as the GBB section. For
writes over CCD, avoiding rescanning for the FMAP can save up to 1.8s.
BUG=None
TEST={get,set}_gbb_flags.sh --servo with and without servod running
BRANCH=None
Change-Id: Iecedf4c3d0cad6923aed4405ef4a72910f3f9f05
Signed-off-by: Sam McNally <sammc@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3455562
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This attempts to converge the signatures of host/lib/flashrom
with that of 'futility/updater_utils.h:struct firmware_image'.
with the eventual goal of converging the multiple flashrom
wrapper implementations.
BUG=b:207808292
BRANCH=none
TEST=`$ cros_run_unit_tests --board nocturne --packages vboot_reference`
Cq-Depend: chromium:3399963
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: I016dacbdca6f1108def0dbc608d83e0066a30023
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3301571
Reviewed-by: Sam McNally <sammc@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In early bring up, some devices may have problem when flashrom is
reading or writing to the system flash. To unblock dogfood process,
we want to have a special quirk to retry flashing.
BUG=b:213706510
TEST=make; build and run test
BRANCH=None
Change-Id: I58788f620fb32f7c886d1e5638f4a3605ea77953
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3452846
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The preserve_me quirk allows avoiding modifying the ME region while it
may be running. Its apply function attempts to skip itself when not
flashing the OS-bundled firmware by checking for whether an archive is
set, but this doesn't work since in the absence of an actual archive
file, a filesystem archive implementation is used instead.
While flashing over a non-host programmer the ME is not running and
therefore it is safe to update the ME region.
Add unit test cases for the preserve_me quirk applying successfully when
using the default host programmer and being skipped when using another
programmer.
BUG=b:213706510
TEST=futility update -p dummy... with preserve_me quirk skips the quirk;
chromeos-firmwareupdate with a preserve_me quirk applies the quirk
BRANCH=none
Change-Id: Ie5578c9b3cf7eba55626bb931589bf360fe28269
Signed-off-by: Sam McNally <sammc@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3450060
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update the defaultA=2 and defaultB=3 grub settings to
remove verification.
In change I930d0f3f1a3f8f54edd1dce7f8259e3c261af9a1 the default
options for grub were changed to be defaultA and defaultB instead
of 'set default=2'. Update the removal to support these new
configuration settings.
BRANCH=none
BUG=b:186240229
TEST=on a reven build run `/usr/share/vboot/bin/make_dev_ssd.sh --remove_rootfs_verification
--force`; reboot and confirm verity is disabled
Change-Id: I70ceed432c29865715c525a6ae13f0e7da8ee0ba
Signed-off-by: Jeffery Miller <jefferymiller@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3445175
Reviewed-by: Nicholas Bishop <nicholasbishop@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Nicholas Bishop <nicholasbishop@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When updating the legacy section, we have to check the existence of
'cros_allow_auto_update' in both 'from' and 'to' images, and only update
if they both have the correct tag file.
BUG=b:215175246,chromium:1169544
TEST=make; build and run test
BRANCH=None
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Change-Id: I81f62f42cf9a6f6f1931e05cd07131b569ad0cb0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3404063
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:204378599
TEST=None
BRANCH=None
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Cq-Depend: chrome-internal:4473134
Change-Id: I2316ec9e75e854352350e90055e717a258c43f6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3388968
Tested-by: Evan Benn <evanbenn@chromium.org>
Auto-Submit: Evan Benn <evanbenn@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Evan Benn <evanbenn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Command does not need to run under sudo and sudo will not be available
once we start running the test scripts under platform2_test.py.
BUG=b:207787495
BRANCH=none
TEST=`cros_run_unit_tests --board grunt --packages vboot_reference`
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Change-Id: I795519c4b45e410f5ddc3c55dceab1ae1de02dbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3428421
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some devices in early dogfood stage may need to skip verifying
flashed firmware contents, for example due to CSE updating itself.
This should not be a long term solution - only for debugging or
testing in early development.
BUG=b:213706510
TEST=build and test
BRANCH=none
Change-Id: I04a79f6762a0c556d82d0062e5cf5c9b3e0cfc4f
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3419417
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Alder Lake-N platform, the pinctrl (gpiochip) driver label is
"INTC1057:00", hence declare it properly.
BUG=b:213535859
TEST=run 'crossystem wpsw_cur' and see '0' rather than an error
on ADLRVP platform.
Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ie742a43cd37b37a35b16e68fe4be44f9bb08ec5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3404067
Reviewed-by: Subrata Banik <subratabanik@chromium.org>
Tested-by: Subrata Banik <subratabanik@chromium.org>
Auto-Submit: Subrata Banik <subratabanik@chromium.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Commit-Queue: Kangheui Won <khwon@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On recent Intel platforms with CSE, the ME/CSE may change the preserved
area (for example copying ME_RW_A/CSE_RW to CSE_RO) during firmware
update. As a result, we want to use the diff image instead of real
system firmware contents when updating.
BUG=b:213706510
TEST=build and run test
BRANCH=None
Change-Id: Ib75d9ebb707e240fcbb77ac72d2c08b8c6889532
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3404062
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Commit-Queue: YH Lin <yueherngl@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
hps uses ed25519 keys so generate a pair of that type.
BUG=b:214495498
TEST=./create_new_hps_key.sh
BRANCH=none
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Change-Id: I3f63ea5852b8e5959b7577e8b988284da043b449
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3394031
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Evan Benn <evanbenn@chromium.org>
Tested-by: Evan Benn <evanbenn@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The --gbb_flags supports changing GBB flags but the value will be
ignored if the device flash was erased (e.g., no valid GBB section).
To fix that we should check the 'to' and 'from' flash contents
separately when preserving GBB data.
BUG=b:216295706
TEST=build; emerge test
BRANCH=None
Change-Id: Ie02138dd4234b461ca1913bef1cabde8becf57c9
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3414190
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some special quirks (for example preserving ME) may want to use diff
image but still do verification, so we want to change 'fast_update'
config into two flags: 'do_verify' and 'use_diff_image'.
BUG=b:213706510
TEST=build
BRANCH=None
Change-Id: Ia0160918ac58110850dd7f622610398ebfb92b47
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3404061
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
create_new_hammer_like_keys.sh generates a key pair with hard-coded
filename "key_hammerlike.*". And we usually ask the croskeymanagers
team to manually rename it to the correct device name (e.g.
b:213403966). The manual step sometimes confuses people.
Modify the script to make create_new_hammer_like_keys.sh takes an extra
keyname argument and generates the correct filename at once.
BUG=b:213922329
TEST=1) normal usage
./create_new_hammer_like_keys.sh foo
2) error (two keyname provided)
./create_new_hammer_like_keys.sh foo bar
3) error (missing keyname)
./create_new_hammer_like_keys.sh
4) also check efs keygen
./create_new_ec_efs_key.sh
BRANCH=none
Change-Id: I2a2e24b77961ea2d744ac65d835446a74381e004
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3398389
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds Rust bindings to vboot_reference.
BRANCH=none
BUG=b:214081328
TEST=cargo build
Change-Id: I4f9df36a0de93c0617ead2a75ef2ca5fcf8f5652
Signed-off-by: Allen Webb <allenwebb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3390514
Reviewed-by: Mike Frysinger <vapier@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=builds
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: Ied809d3c2839f33d738d1938cafd6c634d54ee28
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3353558
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Commit-Queue: Nikolai Artemiev <nartemiev@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the API function crosid_get_firmware_manifest_key from libcrosid
instead of "mosys platform model" to get the firmware manifest key.
Note: this leaves inconsistent terminology around "model" and
"firmware manifest key", which is quite intentional at the moment,
since the model is still the firmware manifest key for the time
being. Should we decide to change that in the future, we can do
further renaming in futility.
BUG=b:213251232
BRANCH=none
TEST=chromeos-firmwareupdate on delbin
run recovery on delbin
Cq-Depend: chromium:3364974
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I306ae444849e327ba208f52e34b584b571ef6a3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3368704
Reviewed-by: Raul Rangel <rrangel@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use pkg-config to link with libcrosid when it's available.
Note that when futility is compiled from the coreboot tree, libcrosid
won't be available, at least at the moment, so expose -DUSE_CROSID to
the C code so we know when we have it available.
BUG=b:213251232
BRANCH=none
TEST=emerge-volteer -j vboot_reference
"lddtree /build/volteer/usr/bin/futility" lists libcrosid
Cq-Depend: chromium:3367251
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I8e69c5ce4570ac9df72440d0a34b6b03b5a36e77
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3368703
Reviewed-by: Raul Rangel <rrangel@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We don't need the MOUNT_ENCRYPTED_KEY_PATH after we replaced the stale
TPM simulator with the driver-level TPM simulator.
It's time to remove it.
BUG=b:203195852, b:174807059
BRANCH=none
TEST=crossystem clear_tpm_owner_request=1
Signed-off-by: Yi Chou <yich@google.com>
Change-Id: I7c1c9c16697b1bbda9adea13448fdb9cffd9cc7b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3358669
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Leo Lai <cylai@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The crossystem command would have potential race conditions when we
calling this command in parallel. Add a flock should prevent this
issue.
BUG=b:172876417
BRANCH=none
TEST=Firing multiple crossystem commands, and check result
Signed-off-by: Yi Chou <yich@google.com>
Change-Id: Ia9f8a73d5fd762c79088f350ea05d0dd540f3fc3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3358668
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Leo Lai <cylai@google.com>
|