| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems this field is only accessed by TPM2_ContextSave command, didn't
affect the format of data and only led to faster increase of object
context ids. It is unclear if it is related to TPM_RC_OBJECT_MEMORY
errors.
BUG=b:242870497
TEST=TCG test
------------------------------- Test Environment -----------------------
Test Suite Version: 2.1a
Operating System: Linux
TDDL Version: SocketTDDL
---------------------------------- Test Object -------------------------
TPM Vendor: CROS
TPM Firmware Version: 2de0a64 8
TPM Spec Version: 1.16
Vendor Specific Info: xCG , fTPM, ,
Tested Spec Version: 1.16
------------------------------ Test Result Summary ---------------------
Test executed on: Fri Aug 19 10:04:45 2022
Performed Tests: 248
Passed Tests: 248
Failed Tests: 0
Errors: 0
Warnings: 0
========================================================================
Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com>
Change-Id: I81c4e8ffbb79c709b046f4db57d86d6007d3574d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3842207
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Code-Coverage: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new ap_ro_integrity_check return codes. The existing AP_RO_PASS (1)
return code doesn't verify the GBB. Rename it to
AP_RO_PASS_UNVERIFIED_GBB. Shimless RMA should only treat
AP_RO_PASS (6) as a pass. Nothing returns this right now.
This CL also adds AP_RO_IN_PROGRESS(7). AP_RO_IN_PROGRESS is used if AP
RO verification is ongoing. AP_RO_FAIL_CLEARED will be used in a
followup CL.
old:
1 - AP_RO_PASS
new:
1 - AP_RO_PASS_UNVERIFIED_GBB
...
6 - AP_RO_PASS
7 - AP_RO_IN_PROGRESS
This saves 8 bytes since it also shortens a print message. The remaining
space changes from 5804 to 5812 bytes.
BUG=b:234497234
TEST=make buildall -j; make -C extra/usb_updater/ gsctool
Change-Id: I9f8b45f5564d453cbb4386b318b65d977d8b3f73
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3828596
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit c1f5a5481f1121e2f408055f04906205b779dc91.
Reason for revert: b:242249503
```
gsctool.c:2382:2: error: duplicate case value
2382 | case AP_RO_UNSUPPORTED_NOT_TRIGGERED:
| ^~~~
gsctool.c:2373:2: note: previously used here
2373 | case AP_RO_UNSUPPORTED_NOT_TRIGGERED:
| ^~~~
```
Original change's description:
> apro: add new return codes
>
> Add new ap_ro_integrity_check return codes. The existing AP_RO_PASS (2)
> return code doesn't verify the GBB. Rename it to
> AP_RO_PASS_UNVERIFIED_GBB. Shimless RMA should only treat
> AP_RO_PASS (7) as a pass. Nothing returns this right now.
> This CL also adds AP_RO_FAIL_CLEARED(8) and AP_RO_IN_PROGRESS(9).
> AP_RO_IN_PROGRESS is used if AP RO verification is ongoing.
> AP_RO_FAIL_CLEARED will be used in a followup CL.
>
> old:
> 2 - AP_RO_PASS
>
> new:
> 2 - AP_RO_PASS_UNVERIFIED_GBB
> ...
> 7 - AP_RO_PASS
> 8 - AP_RO_FAIL_CLEARED
> 9 - AP_RO_IN_PROGRESS
>
> This saves 8 bytes since it also shortens a print message. The remaining
> space changes from 5804 to 5812 bytes.
>
> BUG=b:234497234
> TEST=make buildall -j
>
> Change-Id: I8d19a411c2534236c9defa82291872420c19a15b
> Signed-off-by: Mary Ruthven <mruthven@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3805819
> Reviewed-by: Andrey Pronin <apronin@chromium.org>
> Commit-Queue: Andrey Pronin <apronin@chromium.org>
Bug=b:234497234, b:242249503
Change-Id: I63ebc6a1343410e3b2a5ab0684a8a533553ec1ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3826713
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Auto-Submit: Judy Hsiao <judyhsiao@google.com>
Tested-by: Judy Hsiao <judyhsiao@google.com>
Owners-Override: Judy Hsiao <judyhsiao@google.com>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Commit-Queue: Andrey Pronin <apronin@chromium.org>
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new ap_ro_integrity_check return codes. The existing AP_RO_PASS (2)
return code doesn't verify the GBB. Rename it to
AP_RO_PASS_UNVERIFIED_GBB. Shimless RMA should only treat
AP_RO_PASS (7) as a pass. Nothing returns this right now.
This CL also adds AP_RO_FAIL_CLEARED(8) and AP_RO_IN_PROGRESS(9).
AP_RO_IN_PROGRESS is used if AP RO verification is ongoing.
AP_RO_FAIL_CLEARED will be used in a followup CL.
old:
2 - AP_RO_PASS
new:
2 - AP_RO_PASS_UNVERIFIED_GBB
...
7 - AP_RO_PASS
8 - AP_RO_FAIL_CLEARED
9 - AP_RO_IN_PROGRESS
This saves 8 bytes since it also shortens a print message. The remaining
space changes from 5804 to 5812 bytes.
BUG=b:234497234
TEST=make buildall -j
Change-Id: I8d19a411c2534236c9defa82291872420c19a15b
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3805819
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Commit-Queue: Andrey Pronin <apronin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This utility currently uses the outdated servo controls `servo_v4_type`
and `servo_v4_role`. These were replaced with `root.dut_connection_type`
and `servo_pd_role` respectively. This commit updates this utility to
use the updated controls
BUG=none
TEST=Flash Cr50 FW on a DeWatt device
Signed-off-by: Robert Zieba <robertzieba@google.com>
Change-Id: Ic24215725a09ce464c39fa1ffc8c2b3965a9738f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3811889
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DO NOT LAND IN RELEASE BRNACHES.
Add chargen to tot images, so we can verify c2d2 and servo micro
functionality with tot cr50 images.
BUG=b:240718978
TEST=run chargen
Change-Id: I98bc344a2914f311a056904a7fc5b650b22c40d0
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3805824
Commit-Queue: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cr50 branch doesn't have uart_buffer_full. It has uart_buffer_room.
Update chargen to use uart_buffer_room instead of uart_buffer_full, so
it'll work with cr50.
BUG=b:240718978
TEST=none
Change-Id: I5f9a5d8a3cdc15db7a7ca66d54f7997dce165fd9
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3805823
Commit-Queue: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ChromiumOS instead of Chromium OS and drop "All rights reserved.".
BUG=b:230609017
TEST=None
Change-Id: I55bf56261a7695a5b52ce61b46d6fb2695495d87
Signed-off-by: Alex Klein <saklein@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3791656
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Binutils 2.36 seems to have a bug which is addressed in 2.37.
https://sourceware.org/bugzilla/show_bug.cgi?id=27412
This is a temporarily fix.
BUG=b:238039591
TEST=make hosttests
Signed-off-by: Vadim Sukhomlinov <sukhomlinov@google.com>
Change-Id: I78551ec9eac5eb7e6fad2da8eb734c5a895d3a3c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3760892
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Auto-Submit: Vadim Sukhomlinov <sukhomlinov@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add -no-pie link flag to disable position independent code
in more places.
This is needed since GCC will be configured to use
position independent code by default.
BUG=b:236984388
TEST=CQ
BRANCH=none
Signed-off-by: Manoj Gupta <manojgupta@google.com>
Change-Id: I41ab27779218e84c5891a286a43c7b51776eed0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3727781
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3759129
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Auto-Submit: Manoj Gupta <manojgupta@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disable position independent code generation explicitly.
This is needed since GCC will be configured to use
position independent code by default.
BUG=b:236984388
TEST=CQ
BRANCH=none
Signed-off-by: Manoj Gupta <manojgupta@google.com>
Change-Id: I9cfc3c0e47b23b0282e06fd482441f979d19622d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730964
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Auto-Submit: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3759128
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new compiler version does not like mixing up arrays and pointers,
BRANCH=none
BUG=none
TEST=compilation succeeds inside and outside chroot, gsctool updates
succeed with Ti50
Signed-off-by: Vadim Bendebury <vbendeb@google.com>
Change-Id: Ia507d27315bf601450a7d9b45cf20f98f4833a05
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3710276
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The flag is being deleted, see b/234557583 and crrev.com/c/3697556.
BUG=b:234557583
TEST=none
Change-Id: Iad05e425db5b7301d83ec83af8eed9f006a02ab1
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3697266
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the Cr50 tree there is no really output devices other than console
where base64 encoding output could be sent, and there is no use for
decoding function yet.
Add the encoding function implementation, make it possible to send
output to console by default and optionally to a passed in function.
Add test to verify proper encoding.
BUG=b:234745585
TEST='make run-base64' succeeds.
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Change-Id: Ibc10681632bc649320d602e319e4f634b4b3a1d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3701141
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:235079109
TEST=none
Change-Id: Ia0892309b9586737b518d9b037b083e0b3231b34
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3691319
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a format for u2fd-corp attestation to u2f_attest, and corresponding
test case in u2f_test.py
BUG=b:233147441
TEST=make buildall -j
TEST=u2f_test.py
Change-Id: I4d12345fd0531a4be091c05670215444fe38e706
Signed-off-by: Howard Yang <hcyang@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3670107
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Build CR50_DEV, CRYPTO_TEST, and CRYPTO_TEST red board images in make
buildall, so make buildall will find failures in all cr50 images we use.
BUG=none
TEST=make buildall ; ls build/cr50* shows all of the new cr50
directories. The ec images in those directories have 'DBG' and 'CT'
strings in their versions.
Change-Id: I19cee37a6c9fe255d44700e3bb8d616f8b8fc875
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3628193
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Scribe code is not compiled often, it has bitrot a bit due to tool
upgrades. This patch restores the scribe build correctness.
BUG=none
TEST=scribe build does not fail any more.
Signed-off-by: Vadim Bendebury <vbendeb@google.com>
Change-Id: I335c7903258b14ff731e7c345a36194395baf5d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3668651
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to ensure that versions before 0.0.15 upgrade to 0.0.15 before
going to 0.0.16 or later. Otherwise, the first page of the new RW is
erased when upgrading RO and we need to rescue.
BUG=none
TEST=locally changed must have version to 0.22.0 and played around
with different versions on my brya. Worked as expected around
version 0.22.0
Change-Id: I79b41fb86c22aa37163264815faef9558370d702
Signed-off-by: Jett Rink <jettrink@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3658243
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Auto-Submit: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:232066387
TEST=none
Change-Id: Ia6e25a01c40e89d439926c0fbafe896b603691fd
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3656370
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the dump_fmap flashrom output to calculate the offset and size. All
of the information is included on one line.
BUG=none
TEST=ap_ro_hash.py -v GBB True
Change-Id: I160173caaaf540c20786e892d244ee8a941833b6
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3654254
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a range is too big, break it up into smaller blocks that GSC can
handle.
BUG=none
TEST=run `ap_ro_hash.py COREBOOT` on volteer.
Change-Id: I094c2eb725af07e21b3e249336cb7b556761b50c
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3644691
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use mp, prepvt, and tot as the bcmp input. Convert those to the correct
tpm2 and cr50 branch names.
BUG=none
TEST=./util/bcmp.sh mp ; ./util/bcmp.sh tot ; ./util/bcmp.sh prepvt ;
verify the tpm2 and cr50 branch names are correct.
Change-Id: I0d1c237fd4322a102b939a7c16f10f991bf408fb
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615476
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:229877169
TEST=none
Change-Id: I9b1e04f5487662816401129adb593b7f1c0e259b
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3628135
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On some devices the board id flags are set to lock in the phase and the
board id type isn't set until the board is finalized. RO may be changed
until the board id type is written. Change the check from
board_id_is_erased to board_id_type_is_blank, so the factory can update
the AP RO hash until the board is finalized.
This is the same check we do in sn_bits. Try to read the board id and
then check the type. In the future, we may want to consolidate.
BUG=b:230430292
TEST=manual
Clear the board id
Set the hash
python ap_ro_hash.py GBB
gsctool -aA prints the digest
Set the BID flags
gsctool -ai 0xffffffff:0x1234
Clear the hash
gsctool -aH
gsctool -aA
get hash rc: 10 AP RO hash unprogrammed
Set the hash
python ap_ro_hash.py GBB
gsctool -aA prints the digest
Clear the hash
gsctool -aH
gsctool -aA
get hash rc: 10 AP RO hash unprogrammed
Set the BID type
gsctool -ai $(cros_config / brand-code):0x1234
Verify cr50 rejects setting the hash
python ap_ro_hash.py GBB
ERROR: Cr50 returned 7 (BID programmed)
Change-Id: I440ee84b3c86e16f027a8b9dcd51ea3031171ea1
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627808
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Commit-Queue: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Print the calculated digest, so we can use it for debugging.
BUG=none
TEST=./ap_ro_hash.py -v True GBB prints a digest that matches the
digest from the trunks_send command and the one saved in cr50.
Change-Id: I686dac5248782ea68d7bab98c2554940cc0b74b3
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3624499
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:219038720
TEST=gsctool -aL
Change-Id: I1c0b417e61dcb6460345c2fcf8d43952ebbf65d3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3573469
Commit-Queue: Brian Granaghan <granaghan@google.com>
Tested-by: Brian Granaghan <granaghan@google.com>
Reviewed-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:229877169
TEST=none
Change-Id: I492616346f21b824915fba33c66ad296507bcaf7
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3611617
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the power button input to determine if the power button is pressed.
CHECK_OUTPUT_PWRB_OUT follows CHECK_INPUT_PWRB_IN, so they should be the
same. This switches to using the RBOX input since that is what cr50
should be using.
BUG=b:175320127
TEST=press the power button. Verify powerbtn output looks good.
Change-Id: Ie7f224489505366029450c98e341f3790192d49a
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3611615
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GPIO_EC_FLASH_SELECT is only used in usb_spi.c and EC_TX_CR50_RX_OUT
isn't used anywhere by cr50. These are both debug signals mainly used by
servo or ccd for flashing the EC. Disable sleep when they're asserted.
Add GPIO_SLEEP_DIS_HIGH to EC_FLASH_SELECT, so sleep is disabled when
it's set to 1.
Add GPIO_SLEEP_DIS_LOW to EC_TX_CR50_RX_OUT, so sleep is disabled when
it's set to 0.
BUG=none
TEST=gpioset EC_TX_CR50_RX_OUT and gpiset EC_FLASH_SELECT change the
gpiocfg sleepmask.
Change-Id: Ice4c0d85349eeb547644b134904f95e4a4fe375b
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3605882
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add GPIO_SLEEP_DIS_LOW and GPIO_SLEEP_DIS_HIGH to disable sleep when a
gpio with one of those flags is asserted.
GPIO_SLEEP_DIS_LOW disables sleep when the signal is set to 0.
GPIO_SLEEP_DIS_HIGH disables sleep when the signal is set to 1.
This will disable all forms of sleep. The flags can be used for ccd
signals to ensure cr50 doesn't enter sleep while c2d2 or servo micro are
relying on a ccd signal to flash the device.
These flags should not be add to signals used during normal cr50
operation. They disable regular sleep regular sleep so using them will
significantly increase cr50 power consumption.
This change adds GPIO_SLEEP_DIS_HIGH to AP_FLASH_SELECT. I'll add more
signals in followup CLs.
This change also replaces SLEEP_MASK_CHARGING with SLEEP_MASK_GPIO.
Nothing was using SLEEP_MASK_CHARGING.
BUG=b:229974371
TEST=Toggle AP_FLASH_SELECT while the AP is off. Verify cr50 doesn't
enter deep sleep and the gpiocfg and sleepmask output looks ok.
> gpioset AP_FLASH_SELECT 1
> gpiocfg
GPIO0_GPIO1: read 0 drive 0
GPIO0_GPIO2: read 1 drive 1
GPIO1_GPIO0: read 0 INT_RISING
GPIO1_GPIO1: read 0 INT_HIGH
GPIO1_GPIO4: read 0 INT_FALLING
GPIO1_GPIO5: read 0 drive 1
GPIO1_GPIO7: read 0 INT_RISING
GPIO1_GPIO8: read 0 INT_FALLING
gpio sleepmask: 00001000
> sleepmask
sleep mask: 00000008
> gpioset AP_FLASH_SELECT 0
> gpiocfg
GPIO0_GPIO1: read 0 drive 0
GPIO0_GPIO2: read 0 drive 0
GPIO1_GPIO0: read 0 INT_RISING
GPIO1_GPIO1: read 0 INT_HIGH
GPIO1_GPIO4: read 0 INT_FALLING
GPIO1_GPIO5: read 0 drive 1
GPIO1_GPIO7: read 0 INT_RISING
GPIO1_GPIO8: read 0 INT_FALLING
gpio sleepmask: 00000000
> sleepmask
sleep mask: 00000000
>
Change-Id: I1de35455c5a6702635fb714b14d6791f8e5eb2ed
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3605881
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:229974371
TEST=Assert AP_FLASH_SELECT then enter and exit deep sleep on EC-EFS
board.
Change-Id: I00437076ef4881dd60dd67e511100410dd155555
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3607064
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Delay sleep to give AP_FLASH_SELECT enough time to discharge. Future CLs
will do more to ensure AP_FLASH_SELECT isn't asserted entering deep
sleep. This CL does the bare minimum to fix AP RO verification.
BUG=b:229974371
TEST=Trigger AP RO verification on Hoglin
Change-Id: Iec10c51dfe8e7df2b1bb2210c4705d90c3c89c54
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3606093
Reviewed-by: Andrey Pronin <apronin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New boards generate very short pulses on TPM_RST_L. They deassert
TPM_RST_L and then quickly reassert it. Most processing is not done in
the assert/deassert interrupts. The interrupts schedule deferred
functions to reset the TPM and set the AP state.
tpm_rst_asserted sets the AP state to debouncing and schedules
deferred_set_ap_off_data for a second later.
tpm_rst_deasserted schedules a deferred_tpm_rst_isr call ASAP.
deferred_tpm_rst_isr sets the AP state to on and cancels any pending
deferred_set_ap_off calls. If there's a short period where the AP is
off, cr50 won't enable deep sleep or disable the TPM, it'll be in the
debouncing state until the rising edge, and then the AP will be set back
to on.
The issue with short pulses is cr50 doesn't fully process
deferred_tpm_rst_isr before the tpm_rst_asserted interrupt is
triggered.
tpm_rst_deasserted is triggered which schedules deferred_tpm_rst_isr
tpm_rst_asserted is triggered which schedules deferred_set_ap_off
deferred_tpm_rst_isr is processed which sets the AP state to on and
cancels deferred_set_ap_off.
Even though tpm_rst_asserted happened after tpm_rst_deasserted cr50
process set_ap_on which cancels the pending set_ap_off call. Cr50 gets
left with the AP state on even though tpm_rst_asserted was the last
interrupt. This change adds polling to catch this state after a second,
so cr50 can enable deep sleep.
BUG=b:226680127
TEST=manual
reset the AP on hoglin. check for appoll messages
run firmware_Cr50DeviceState on hatch
comment out enabling the TPM_RST_L interrupt handlers.
verify cr50 eventually gets to the correct ap state.
Change-Id: Ib100d4019a1e65cc4c5ce699d268f65884b4f009
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3597031
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add "K" or "F" to the AP state to give more information about the device
state. K for kernel. F for Firmware.
This uses 48 bytes
BUG=b:148492097
TEST=check ccdstate output at different times during boot. Run
firmware_Cr50DeviceState
Change-Id: If2a26c39047b9ae1818eb8d6afbaafa3d1765ca5
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3597035
Reviewed-by: Andrey Pronin <apronin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Resetting the AP interferes with factory processes. Wipe the tpm,
disable AP communications, and then enable factory mode without
resetting the AP, so factory scripts can continue running and don't need
to handle a device reset.
BUG=b:229355653
TEST=manual
# "Disconnect" the battery, so cr50 can enable factory mode.
bp disconnect atboot
# Enable factory mode
gsctool -aF enable
# Verify cr50 wipes the TPM
[52.115535 tpm_reset_request(1, 1)]
[52.116683 tpm_reset_now(1)]
[52.494602 Compaction done, went from 12304 to 60 bytes]
...
[52.587989 tpm_reset_now: done]
[52.588844 TPM is erased]
# Verify the AP stayed up and the TPM is disabled
gsctool -af
Problems reading from TPM, got 10 bytes
Failed to start transfer
Change-Id: If64df4e834c8ae65de36c0ebb7ea868d558089bd
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3597032
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This flag is removed from upstream llvm.
BUG=b:229641193
TEST=CQ
Signed-off-by: Manoj Gupta <manojgupta@google.com>
Change-Id: I43d3d7b5aa2a1a3213dcd514a804235a871ee181
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3590957
Auto-Submit: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gsctool is running out of short opts. This change replaces
get_apro_boot_status to make it more flexible. We can add future ap ro
vendor commands to this arg.
Replace --get_apro_boot_status with '--apro_boot' to get the AP RO
verification status. Add '--apro_boot start' to trigger AP RO verify.
BUG=b:195693537
TEST=run 'gsctool -aB start' to trigger verification on hatch. Use
'gsctool -aB' to check the status.
Change-Id: I7c8cb73dca8309a5cf61981f7e3154dc85e4590d
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3587153
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let's allow wider major version range, expanding it from 0..2 to 0..4.
BUG=b:183016758
TEST=successfully generated hashes for cr50_v3... images.
Change-Id: I8f9e8119b4a31753932065234505cd5d22df91a4
Signed-off-by: Vadim Bendebury <vbendeb@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3582971
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding the encrypted cryptolib header to the RO created another match
for the header magic pattern of 'fd ff ff ff'.
One of the distinct properties of the fake header is filling up the
signature field with 0x53 bytes, let's use this to filter out the fake
header when looking for the RW.
BUG=b:217564005,b:228839885
TEST=successfully processed Ti50 image with HW cryptolib included.
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Change-Id: I83e4f7ad90ba1030ec4134db00485f10dc2fcdee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3561025
Reviewed-by: Andrew Luo <aluo@chromium.org>
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Tested-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 6a90601b84302253f1f2572b948ca2dce69cc17c.
Reason for revert: Currently breaking CQ
Original change's description:
> gsctool: Support flog on H1D3C.
>
> BUG=b:219038720
> TEST=gsctool -D -L
>
> Change-Id: I606d1a5958de4a94be402f6520836504f5b8c6c3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3561468
> Reviewed-by: Jett Rink <jettrink@chromium.org>
> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
> Commit-Queue: Brian Granaghan <granaghan@google.com>
> Tested-by: Brian Granaghan <granaghan@google.com>
BUG=b:228247766
Change-Id: I03eba9b17190909e475938808892ca3747376811
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3572266
Reviewed-by: Brian Granaghan <granaghan@google.com>
Tested-by: Morg <morg@chromium.org>
Owners-Override: Morg <morg@chromium.org>
Auto-Submit: Morg <morg@chromium.org>
Commit-Queue: Brian Granaghan <granaghan@google.com>
Reviewed-by: Anton Romanov <romanton@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:219038720
TEST=gsctool -D -L
Change-Id: I606d1a5958de4a94be402f6520836504f5b8c6c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3561468
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Commit-Queue: Brian Granaghan <granaghan@google.com>
Tested-by: Brian Granaghan <granaghan@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The command to change the `atboot` wp setting should have `atboot` as
the last argument, not the second.
BUG=none
TEST=none
Change-Id: I0fff0d7dc206068d1f51bb8e890f2ccaaafb18c8
Signed-off-by: pmoy@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3561026
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit d4b3156ccadb281842b22bb3bd2ad41ab1da5c9b.
Reason for revert: new warnings/errors cause build failures b/224575372
Original change's description:
> gsctool: add support for USER_PRES vc
>
> Add support for sending and interpreting the user_pres vendor command.
>
> BUG=b:208504127
> TEST=none
>
> Change-Id: I7e20f448011ffb2a15ae352a4c1e49b72afa015d
> Signed-off-by: Mary Ruthven <mruthven@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3495864
> Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Bug: b:208504127, b:224575372
Change-Id: I4a6c8813da5c4ed31ac6adcb410d6869ca7ec9ec
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3523383
Owners-Override: Brian Norris <briannorris@chromium.org>
Auto-Submit: Brian Norris <briannorris@chromium.org>
Commit-Queue: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Commit-Queue: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@google.com>
Commit-Queue: Abhishek Pandit-Subedi <abhishekpandit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for sending and interpreting the user_pres vendor command.
BUG=b:208504127
TEST=none
Change-Id: I7e20f448011ffb2a15ae352a4c1e49b72afa015d
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3495864
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We relaxed the RW header alignment search in RO to be on the 2KB
boundary instead of 16KB. This gives us more room if RO grows. ti50
already supports this.
Also 2KB is the lowest is would every go since that is a hardware page
boundary.
BUG=b:217564005
TEST=see that gsctool can upgrade with an image that isn't align on 16KB
boundary but it aligned on 2KB boundary.
Change-Id: I0b05de6191d566a01b629d09d95f3d214282e454
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3508830
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
g2f_attestation_cert() is another function which is invoked on the TPM
command context, when virtual TPM NVMEM spaces are read.
One of the side effects of invoking of g2f_attestation_cert() is the
creation of the U2F state, if it did not exist before. In this case
the state should not be immediately committed to the NVMEM, the commit
will happen when the TPM command execution is completed.
BUG=b:199981251
TEST=running ./test/tpm_test/tpmtest.py does not trigger the 'attempt
to commit in unlocked state' message any more.
'make buildall' and 'make CRYTPO_TEST=1 BOARD=cr50' pass
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Change-Id: I708e8807ffd3207cc6ab84a0e380908e715f7a15
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3482487
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:222132584
TEST=none
Change-Id: I2a231373f992fdb21ae6eeb440e2e7243adbe481
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3498710
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The disable deep sleep variable is supposed to be temporary and only
apply to the next TPM_RST_L pulse. If TPM_RST_L doesn't get asserted
within 10 seconds of the disable deep sleep vendor command, it probably
means something went wrong with suspend and it was aborted. Clear
disable deep sleep after 10 seconds, so it doesn't get applied to some
other suspend.
BUG=b:222124677
TEST=manual
# Send command to disable deep sleep
trunks_send --raw 80010000000c20000000003b
> [50.252944 dis DS]
ccdstate
DS Dis: on
# Wait 10 seconds and make sure cr50 clears it
> [60.252941 DDS: clear]
# Send command to disable deep sleep
trunks_send --raw 80010000000c20000000003b
# Shutdown the device immediately.
shudown -P now
# Verify cr50 disables deep sleep
1 [24.650581 dis DS]
1/[27.364002 tpm_rst_asserted]
[28.364776 AP off]
[28.365516 Block DS]
# Wait 20 seconds. Check that cr50 doesn't clear it
> ccdstate
DS Dis: on
AP: off
..
> idle
idle action: sleep
# boot the device
10| 1 inicom2.8Minicom2.8[85.437511 deferred_tpm_rst_isr]
[85.438472 AP on]
[85.439010 set TPM wake]
[85.439594 tpm_reset_request(0, 0)]
[85.440494 tpm_reset_now(0)]
[85.443954 tpm_init]
tpm_manufactured: manufactured
[85.446109 tpm_reset_now: done]
[85.446891 DDS: clear]
# shutdown the device
# check cr50 enters deep sleep
Change-Id: I2140dbb01e8d9b21c5f5309e43efc21b636361e5
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3498704
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some boards don't use battery presence for ccd. They just have a
chassis_open signal. Update the why_denied message to add this option.
BUG=b:197974058
TEST=check ccd open denial message
Change-Id: I92254b35cc98492709ec14a26a71cecc7d273a6b
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3498701
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
|