| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:282585789
BRANCH=none
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: I263ea5a68da3be4fdb07bfd0197645180d32ed3f
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4542040
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid indirection.
BUG=b:282585789
BRANCH=none
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: I2ad99a61b801b856f53743c0ed4e00289ede5deb
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4541780
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid indirection.
BUG=b:282585789
BRANCH=none
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: I5391c349ff60569e4dcc6c1c4605ccb9901c290b
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532320
Commit-Queue: Nikolai Artemiev <nartemiev@google.com>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unused param.
BUG=b:282585789
BRANCH=none
TEST=none
Change-Id: I57f4a2f30965b078ab1482dd8eb31ddc29a1a5f4
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532322
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:282585789
BRANCH=none
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: I8fdc14236a478cc1ad0f39e091b19223cb3d9470
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532321
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid confusing indirections.
BUG=b:282585789
BRANCH=none
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: I5fdc01affcce2399955b594abf98c7550815b56b
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532319
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function relates to the EC path.
BUG=b:282585789
BRANCH=none
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: I0da0df25f659404bd639a863a68a2b717d593d1d
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532318
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:282585789
BRANCH=none
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: I3da2da752cc45a34b25616fea225654abe60a214
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532317
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:282585789
BRANCH=none
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: Ic3ba500b45cdc9098808aca69eb852ec317d094b
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4532316
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scope fmap header to loop construct.
Also do not exit(1) on error branches, return error codes.
BUG=b:268397597
TEST=`emerge-nissa vboot_reference`.
Change-Id: I0190cb55740a21cbf9a74929fa6dd612f398d350
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4313543
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:268397597
BRANCH=none
TEST=`emerge-nissa vboot_reference`.
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: I21935ef6733d345949ffd1d8964aa9805318109a
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4531328
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:268397597
BRANCH=none
TEST=`emerge-nissa vboot_reference`.
TEST=`$ cros_run_unit_tests --host --packages="vboot_reference flashrom"`.
TEST=`$ cros_run_unit_tests --board=nissa --packages="vboot_reference flashrom"`.
Change-Id: I0033d52fb14ece7397451ba6283592c726833a94
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4531327
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:268397597
BRANCH=none
TEST=`emerge-nissa vboot_reference`.
TEST=`$ cros_run_unit_tests --host --packages="vboot_reference flashrom"`.
TEST=`$ cros_run_unit_tests --board=nissa --packages="vboot_reference flashrom"`.
Change-Id: I86035534ba6318bad29c8cb43c3b72e2f984e953
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4531326
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:268397597
BRANCH=none
TEST=`emerge-nissa vboot_reference`.
TEST=`$ cros_run_unit_tests --host --packages="vboot_reference flashrom"`.
TEST=`$ cros_run_unit_tests --board=nissa --packages="vboot_reference flashrom"`.
Change-Id: I3eb8810a7c5efd7042f422bb772567daf87e803c
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4531325
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous function parameter names were cryptic at best.
BUG=b:268397597
TEST=`emerge-nissa vboot_reference`.
Change-Id: I6f384db9fcfc855caf229fef338117f47b46cea3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4313542
Reviewed-by: Sam McNally <sammc@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Write proper functions that consume and return values.
Allow code to be maintainable and extensible. Fix types where
required while here as well.
BUG=b:268397597
BRANCH=none
TEST=`emerge-nissa vboot_reference`.
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: I9a615506685b45d0c05936aa83ee3c5b08f8c04a
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4313545
Reviewed-by: Sam McNally <sammc@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Write proper functions that consume and return values.
Allow code to be maintainable and extensible. Fix types required while
here as well. Deal with odd func recursion with const opt param.
BUG=b:268397597
TEST=`emerge-nissa vboot_reference`.
TEST=`$ cros_run_unit_tests --host --packages="vboot_reference flashrom"`.
TEST=`$ cros_run_unit_tests --board=nissa --packages="vboot_reference flashrom"`.
Change-Id: I09245ce703054369b8fad960927f68fb5c386cf1
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4313541
Commit-Queue: Sam McNally <sammc@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes a few locations where specific maliciously crafted
input could cause an arithmetic overflow to bypass a size check. In none
of those instances is the data being parsed actually untrusted for our
use case, so there was no real security risk here. This is just extra
hardening.
BUG=chromium:1441030,b:280378929
TEST=Booted CoachZ
Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I65f2d483f1e67686b7a22f0f7eb3ce5c3eabfdfa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4505019
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AP RO verification in the case of non-factory flows wishes
to determine the WP configuration values needed to calculate
the SR configuration data as defined by the firmware image.
Since we already do this to configure WP correctly on the
DUT using FW derived values parsed from the WP_RO region
within the FMAP we can simply print the offset and length.
BUG=b:281888335
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: Iafa0cc4193453cc67952aa4ff1f1554ac1861882
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4520486
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The kunimitsu/glados family uses a PD MCU. These include lars, sentry,
caroline, and chell. The kunimitsu family reaches AUE 2023-Jun-01. As
part of removing cros_ec out of flashrom drop which support for this
subtype so then EOL it from futility too.
BUG=b:262782150,b:280268486
BRANCH=none
TEST=`cros_run_unit_tests --board=nissa --packages="vboot_reference flashrom"`.
Cq-Depend: chromium:4453124, chromium:4486860
Change-Id: I111492c7386dec012419cb0581e302e7e1f1719e
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4486657
Reviewed-by: Sam McNally <sammc@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check HW WP status as well as SW WP status by default.
A new `--ignore-hw` flag makes it possible to only check SW WP.
BUG=b:268574030
BRANCH=none
TEST=todo
Change-Id: I4a45499ceda52a1e00e7e33742b0bb48d235550b
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4413354
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AP RO verification tooling requires a understanding of the
underlying flashchip information. Provision support in the
flash subcommand to report back this data from the flashrom
driver.
BUG=b:276981092
BRANCH=none
TEST=on Nissa ```
localhost ~ # futility flash --flash-i{nfo}
Warning: Setting BIOS Control at 0xdc from 0x8b to 0x89 failed.
New value is 0x8b.
Flash vendor: Winbond
Flash name: W25Q256JV_M
Flash vid-pid: 0xef00007019
Flash size: 0x02000000
```.
Cq-Depend: chromium:4401775, chromium:4401776
Change-Id: I58e818f06def4904693f61c6967d70b16c62fa37
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4402370
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Jakub Czapiga <czapiga@google.com>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently `futility update --manifest` requires either -i/--image or
-a/--archive to be passed. There is no way to show the EC manifest
without also passing an AP image.
Extend the command by allowing `futility update --manifest -e FILE`.
Here are a few examples of valid commands:
* futility update --manifest --archive PATH
* futility update --manifest --image FILE
* futility update --manifest --image FILE --ec_image FILE
* futility update --manifest --ec_image FILE
BUG=none
TEST=make DISABLE_NDEBUG=1 futil -j
TEST=sudo emerge vboot_reference
TEST=futility update --manifest -e FILE
BRANCH=none
Change-Id: I267b90a3e5ff2891b519702558d173bb2e970052
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4413335
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yidi Lin <yidilin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=None
BUG=None
TEST=make runtests
Disallow-Recycled-Builds: test-failures
Change-Id: I86f0f4ea383b5fff8390a0510bc5c88bda414f2b
Signed-off-by: Jakub Czapiga <czapiga@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4370239
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clean up many other instances of 'bios.bin' littered everywhere over
time.
BUG=b:65745723
BRANCH=none
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
Change-Id: Ie5916d003ba0a5873ce04ec96f48cd45c8253aab
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4402371
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix many mistyping of indexers and other itermediate variables.
BUG=b:268397597
TEST=`emerge-nissa vboot_reference`.
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`.
Change-Id: I49cc0e1a3e5d455c7f473e31cba528e8f227dfb6
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4349562
Reviewed-by: Sam McNally <sammc@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Sam McNally <sammc@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:268397597
TEST=`emerge-nissa vboot_reference`.
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`.
Change-Id: I3effc8651511a5b51f0948ba213bb5a00c49f55e
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4349561
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix grammatical issues in ERROR() usage and over usage of contractions.
Now errors shall now be prefixed with "ERROR:" and the function name.
BUG=b:268397597
TEST=`emerge-nissa vboot_reference`.
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`.
Change-Id: Ieac1f312c2e02133228ba4560197d009aed0324c
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4349560
Reviewed-by: Sam McNally <sammc@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a --unlock_me option which unlocks the Intel ME before flashing by:
- Unlocking the FLMSTR values in the descriptor.
- Disabling GPR0 in the descriptor.
This will be used in factory to support Flexible EOM.
BRANCH=None
BUG=b:273168873
TEST=Flash locked yaviks firmware with --unlock_me. Read firmware back
and check that FLMSTR values are unlocked and GPR0 is disabled.
Change-Id: Ie29f3c997c82a1bc58fe62f568f257e9dc375d94
Signed-off-by: Reka Norman <rekanorman@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4374965
Tested-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Commit-Queue: Reka Norman <rekanorman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents architectural changes required to make futility to
make it fast and robust while providing limited to no tangible
value.
BUG=b:226477133
BRANCH=none
TEST=none
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Change-Id: Ie0ea715fcf60cfb5b2b25037f4421c2dc70c0e5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4147407
Reviewed-by: Sam McNally <sammc@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix grammatical issues in ERROR() usage and over usage of contractions.
Now errors shall now be prefixed with "ERROR:" and the function name.
BUG=b:268397597
TEST=`emerge-nissa vboot_reference`.
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`.
Change-Id: Iba811c4d4714b9af1a3982613b74ca43958d7934
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4349559
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use C99 features to scope indexer to loop constructs and
local itermediates within more constrained lexical
scopes. Be canonical in predicates of branch conditions.
Use const correctness. Apply clang-format where reasonable
BUG=b:268397597
TEST=`emerge-nissa vboot_reference`.
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`.
Change-Id: I8ce232f791a95a668ab5017cff628c199c36e917
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4349558
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new subcommand for getting/setting flash properties such as
the flash size and writeprotect configuration.
The operations provided by `futility flash` require less information
from the user and are less error prone than the equivalents provided by
`flashrom`.
For example, --wp-enable automatically choses the protection range based
on the firmware image and --wp-status gives a warning if the protection
range does not match the RO firmware region.
BUG=b:268574030
BRANCH=none
TEST=`futility flash --{flash-size,wp-enable,wp-disable,wp-status}`
Co-authored-by: Edward O'Callaghan <quasisec@google.com>
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Change-Id: I36d7468616a5bcdf3c4542d48652bd24c3377a61
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4279661
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace shell-script C with actual library calls to copy
file content. Don't die, dying is bad. Use '0660' as the
default dest file perm mask over the default system umask
inherited form the environment applied to the source file
permissions. Add error handling so we have a idea what
happened.
BUG=b:268397597
TEST=`emerge-nissa vboot_reference`.
TEST=`cros_run_unit_tests --host --packages vboot_reference`.
TEST=`cros_run_unit_tests --board nissa --packages vboot_reference`.
Change-Id: Ibe4745dbad20504a1ff7e39e10cbf18ed1831354
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4313546
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:270287312
TEST=With atlas DUT + servo_v4p1 + cr50_ccd + servo_micro:
$ dut-control -o servo_type # servo_v4p1_with_servo_micro_and_ccd_cr50
$ dut-control cpu_fw_spi # unknown value but control does exist
$ dut-control ccd_cpu_fw_spi # error from control not existing
$ futility read --servo -v ap-fw.bin # succeeds
With atlas DUT + servo_micro:
$ dut-control -o servo_type # servo_micro
$ dut-control cpu_fw_spi # unknown value but control does exist
$ dut-control ccd_cpu_fw_spi # error from control not existing
$ futility read --servo -v ap-fw.bin # succeeds
With atlas DUT + servo_v4p1 + cr50_ccd:
$ dut-control -o servo_type # servo_v4p1_with_ccd_cr50
$ dut-control ccd_cpu_fw_spi # off
$ futility read --servo -v ap-fw.bin # succeeds
Change-Id: I18e890aaa6c3fa63f2108840b8c344a6adc5a561
Signed-off-by: Matthew Blecker <matthewb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4315198
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Expose more information about WP state from the flashrom_drv WP status
function.
The more detailed WP information is required to properly validate the
system WP configuration.
BUG=b:268574030
TEST=futility update
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Change-Id: If79b7d8cc68a0583cbf1f7049ac7a2dec088fdd0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4301750
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check write-protect status before attempting to write to SPI flash.
BUG=b:238694831,b:260531154
BRANCH=none
TEST=```
[..]
SPI Configuration is locked down.
FREG0: Flash Descriptor region (0x00000000-0x00000fff) is read-write.
FREG1: BIOS region (0x003a0000-0x01ffffff) is read-write.
FREG2: Management Engine region (0x00001000-0x0039ffff) is read-write.
OK.
Found Winbond flash chip "W25Q256JV_M" (32768 kB, Programmer-specific) on host.
ERROR: write_to_flash: You must disable write protection before setting flags.
```
Cq-Depend: chromium:4303349
Change-Id: I46d72a8867292599bf1a7287d63c62999df41c8e
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4161094
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some commands like 'cros ap flash' may pass '-p host' to the futility
updater, making the updater consider itself running in the remote DUT
mode.
Other futility commands sharing the flash arguments (e.g.,
handle_flash_argument) work on files by default and only do flashing if
'-p' is specified, but that is not the case for the updater. So we
should double check the programmer before deciding the DUT type.
BUG=b:271115449
TEST=FEATURES=test emerge vboot_reference
BRANCH=None
Change-Id: I5be6e4382acffced0ef9cd94f6ede9e9d3fe2efa
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4300000
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The platform_ver property was expected to be within 0..INT_MAX before
the implementation changed from mosys to crossystem (CL:4029537).
So we should return 0 instead of -1 on error.
BUG=b:271115449
TEST=make; run test
BRANCH=None
Change-Id: I772ff53a4a13e17e6cfe8099768dba64b8736ec5
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4297882
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It maybe the case that the caller wishes to not clobber
the current flags set and merely just OR on the new bits.
BUG=b:270074866
TEST=```
# futility gbb --flash --get --flags
# futility gbb --flash --set --flags=(+|-)0x1
# futility gbb --flash --get --flags
as expected.
```
Change-Id: Ibd56dff986d2075b7b220c531e66b224d488b6e6
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4273505
Auto-Submit: Edward O'Callaghan <quasisec@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For commands such as `futility gbb --set --flags=0x140`, futility first
reads the GBB section from the flash, modifies the section, and then
writes back the section to the flash. The write, however, requires
another search of the FMAP section, in order to locate the GBB section
in the flash.
This unnecessary search can be avoided by reading the FMAP section
together with the GBB section. The FMAP data will be stored in the image
buffer, so that the FMAP layout can be retrieved directly from the
buffer for subsequent writes.
This will also prevent the misleading warnings from showing up:
Failed to read fmap from buffer.
WARNING: flashrom_write_image: could not read fmap from image, r=1,
falling back to read from rom
BUG=b:260531154
TEST=emerge-corsola vboot_reference
TEST=make runtests
TEST=No warnings and errors were shown with
`futility gbb --set --flash --flags=0x140`
BRANCH=none
Change-Id: I50029ae5d9c5ecb347f47e980e7c3b772ecc0f18
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4251504
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to CL:3490388, support flashrom read for multiple regions.
BUG=b:260531154
TEST=emerge-corsola vboot_reference
BRANCH=none
Change-Id: I1f75832f882004e879bc299be6862db089c2b71d
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4251503
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Detect if we are going to update a remote DUT (by checking if the flash
parameter has been changed), and ignore all the local system properties
if needed.
This should help 'updating a Chromebook from a Chromebox via servo' to
behave the same as updating from a non-ChromeOS Linux desktop.
BUG=b:247428499,b:255617349
TEST=make; run test
BRANCH=None
Change-Id: I4aa0e98efa21179708d8b593fc619b7f7b65f418
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4181582
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support local and remote DUTs, we need to always pass the updater
configuration (including flash programmer information) for DUT related
calls.
No functional changes but this is required for DUT detection in the
future.
BUG=b:247428499,b:255617349
TEST=make; run test
BRANCH=None
Change-Id: I91bdc95f3073d1e94030246790db83645fbd63ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4235306
Auto-Submit: Hung-Te Lin <hungte@chromium.org>
Commit-Queue: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Hung-Te Lin <hungte@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove quirks defined for boards derived from rambi, storm, strago, and
veyron. Also updated reference design names for the derived platforms.
BUG=None
TEST=make; run test
BRANCH=None
Change-Id: I71f391cc7ef7ceff8ae6a93be599390910aba20c
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4235305
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As CL:4211436 mentioned, all vboot1 boards are now AUE and it is time to
drop vboot1 logic to simplify the updater.
BUG=b:124141368,b:172342538
TEST=make; run test
BRANCH=None
Change-Id: Ice445158abd2b6465dad7cade10ce88b46d3c981
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4235302
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From b:255617349#comment133, the --wp-* commands should work with any
servo, including servo-micro; so we should pass the right DUT programmer
(e.g., cfg->image.programmer) instead of PROG_HOST when
retrieving software write protection status (WPSW).
BUG=b:255617349
TEST=make; run test
BRANCH=None
Change-Id: Iff5a105da8bed06bbd714a72a7d06d2b64b3dcd4
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4235303
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When developers (or the lab) runs 'futility update' on a Chromebox to
update a remote DUT connected via servo, the updater will incorrectly
recognize the Chromebox as the 'host' = 'system' = 'DUT', selecting
wrong config and setting wrong cookies.
To fix that, we want to isolate and refactor how we identify and access
'host' and 'DUT'. The first step is to rename and move the 'system
property' related functions to 'dut properties' in the `updater_dut.c`.
No functional changes in this patch.
Only renamed functions and moved the implementation to different places.
BUG=b:247428499,b:255617349
TEST=make; run test
BRANCH=None
Change-Id: I5c1f9bb67a14fbcdd80958597290a2789f4c2dac
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4181581
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:265861606
BRANCH=None
TEST=futility gbb --get --flash --flags --hwid --digest --rootkey=/tmp/rootkey --bmpfv=/tmp/bmpfv --recoverykey=/tmp/recoverykey
TEST=futility gbb --get --flags --hwid --digest --rootkey=/tmp/rootkey2 --bmpfv=/tmp/bmpfv2 --recoverykey=/tmp/recoverykey2 /tmp/bios
TEST=diff the above
TEST=confirm that it is quicker (3s vs 26s on one dut)
Change-Id: I398e40a1cc50a6921e0385277fc03d0b7fa7c9b8
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4170147
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow flashrom_read_image to take a parameter to read only a region.
BUG=b:265861606
BRANCH=None
TEST=unit
Change-Id: I835ca341c00b21286721f65c3e009a76753b6628
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/4170146
Tested-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
|