summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* gsctool: add flags from ti50 repostabilize-13983.B-cr50_stabstabilize-13982.88.B-cr50_stabstabilize-13982.82.B-cr50_stabstabilize-13982.70.B-cr50_stabstabilize-13982.69.B-cr50_stabstabilize-13982.60.B-cr50_stabstabilize-13982.51.B-cr50_stabstabilize-13974.B-cr50_stabrelease-R92-13982.B-cr50_stabJett Rink2021-05-141-0/+2
| | | | | | | | | | | | | | | | | | Add the two new error flag values that were introduced in the ti50 report. See https://chrome-internal.googlesource.com/ti50/common/ti50/+/main/applications/fw_updater/src/structures.rs for ti50 definitions BUG=none TEST=none Cq-Depend: chrome-internal:3831829 Change-Id: I794a49d7c0814258350b479e90167d500081433a Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2897129 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* cr50: prepare to release 0.{5,6}.30Mary Ruthven2021-05-142-2/+2
| | | | | | | | | | | BUG=b:187083680 TEST=none Change-Id: I76ad8b29b32007fde0e8a6b527f08fa2333e801a Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2897918 Reviewed-by: Namyoon Woo <namyoon@chromium.org> Commit-Queue: Namyoon Woo <namyoon@chromium.org>
* cr50: debounce successive TPM reset pulses (take two)stabilize-13971.B-cr50_stabstabilize-13970.B-cr50_stabMary Ruthven2021-05-111-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some platforms generate more than one pulse when resetting, many Intel SOCs generate two pulses, some other chips could go even higher. TPM reset on Cr50 is processed asynchronously, repetitive pulses result in multiple reset processing cycles.In case pulses are coming too soon one after another this could cause some race conditions. Let's ignore repetitive reset pulses unless there has been an attempt by the host to read a register (which is usually the very first action of the AP when booting up). Clear reset_in_progress when the TPM is stopped to ensure they aren't set at the same time. TPM stop disables tpm communication until the TPM is reset. reset_in_progress blocks resetting the tpm until there's tpm communication. We need to ensure these aren't both set at the same time otherwise the system will get into a state where it rejects tpm resets and tpm communication forever. This fixes the ccd open issue from take one where the tpm would stay disabled after opening ccd because cr50 rejected the tpm resets that would clear if_stop. BUG=b:164130916 TEST=observed that only one reset is happening on an Octopus device, while there are two pulses present on the PLT_RST_L line. Verified proper reboot multiple times in a row. use rma_auth to open ccd. Verify subsequent tpm resets reset the TPM and don't say reset already in progress. Change-Id: I62717bf3f0e9bc6d9090122e5b15d13c8f4825e5 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832434 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* CRYPTO_TEST_SETUP: enable dev featuresMary Ruthven2021-05-072-1/+4
| | | | | | | | | | | | | | | | | Enable dev features in CRYPTO_TEST builds, so it's easier to update and rollback to MP images. Add the rollback command and disable update checks. BUG=b:186663661 TEST=make clobber ; make -j BOARD=cr50 make clobber ; make -j BOARD=cr50 CRYPTO_TEST=1 Change-Id: Id8929f67f206d3222c551532c91921bd646d2a50 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875480 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* CRYPTO_TEST_SETUP: enable the tpmMary Ruthven2021-05-071-3/+3
| | | | | | | | | | | | | | | | Enable the TPM with crypto test images, so boards can boot. We saved enough space by removing smaller features. Cr50 can be built with CRYPTO_TEST and the TPM enabled. BUG=b:186663661 TEST=make clobber ; make -j BOARD=cr50 make clobber ; make -j BOARD=cr50 CRYPTO_TEST=1 Change-Id: Iedb16c182183993b4f33658e5074d94a9e711ca9 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875479 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* CRYPTO_TEST_SETUP: remove ap ro verification and spi hashMary Ruthven2021-05-071-0/+4
| | | | | | | | | | | | | | | | Remove AP RO verification and spi hash support to save space. This saves 3952 bytes in the CRYPTO_TEST image. BUG=b:186663661 TEST=make clobber ; make -j BOARD=cr50 ; make clobber ; make -j BOARD=cr50 CRYPTO_TEST=1 Change-Id: I77eb3de547fad1e4a894b0e6eff62adaa8cbf65d Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875478 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* CRYPTO_TEST_SETUP: remove unnecessary commandsMary Ruthven2021-05-071-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove these commands. CONFIG_CMD_ECRST CONFIG_CMD_SYSRST CONFIG_CMD_WP CONFIG_CMD_DUMP_NVMEM CONFIG_CMD_PINMUX CONFIG_CMD_GPIOCFG CONFIG_CMD_SLEEPMASK CONFIG_CMD_TIMERINFO CONFIG_CONSOLE_HISTORY CONFIG_I2C_XFER CONFIG_I2C_SCAN CONFIG_CONSOLE_CMDHELP This saves 6068 bytes of space. BUG=b:186663661 TEST=make -j BOARD=cr50 Change-Id: I3f559fe853ab51b9618edb3e2a5bd215c2155325 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875477 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* add CONFIG_CMD_ROLLBACKMary Ruthven2021-05-073-1/+3
| | | | | | | | | | | | | Add CONFIG_CMD_ROLLBACK for building the rollback command. BUG=b:186663661 TEST=flash usage doesn't change with make -j BOARD=cr50 Change-Id: Iea22485368fbb57eed114653c6f78758cc5c8111 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875476 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* add CONFIG_SPI_HASHMary Ruthven2021-05-073-6/+15
| | | | | | | | | | | | | Add CONFIG_SPI_HASH to control building spi hash support. BUG=b:186663661 TEST=flash usage doesn't change with make -j BOARD=cr50 Change-Id: If2f731897bcddec226cd0f388e94e82f7eeaeb8f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875475 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* isolate CONFIG_AP_RO_VERIFICATIONMary Ruthven2021-05-072-0/+4
| | | | | | | | | | | | | | | Isolate CONFIG_AP_RO_VERIFICATION BUG=b:186663661 TEST=flash usage doesn't change with make -j BOARD=cr50 #undef CONFIG_AP_RO_VERIFICATION doesn't have build errors. Change-Id: I9bf7e897a44302062551ecb553236a08dc96432e Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875474 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* add CONFIG_CMD_GPIOCFGMary Ruthven2021-05-072-0/+3
| | | | | | | | | | | | | Add CONFIG_CMD_GPIOCFG to control building the gpiocfg command. BUG=b:186663661 TEST=flash usage doesn't change with make -j BOARD=cr50 Change-Id: Ie723ef230ac838ff8298d39fd089c232f852871e Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875473 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* add CONFIG_CMD_PINMUXMary Ruthven2021-05-072-0/+3
| | | | | | | | | | | | | Add CONFIG_CMD_PINMUX to control building the pinmux command. BUG=b:186663661 TEST=flash usage doesn't change with make -j BOARD=cr50 Change-Id: I17dba6f988388c39c58aebd11ee202ae0e7d5d9f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875472 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* add CONFIG_CMD_DUMP_NVMEMMary Ruthven2021-05-072-0/+3
| | | | | | | | | | | | | Add CONFIG_CMD_DUMP_NVMEM to control building the dump_nvmem command. BUG=b:186663661 TEST=flash usage doesn't change with make -j BOARD=cr50 Change-Id: Ie42e6c4b36ebca75ce99c2f5477fa7d917fcc87f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875471 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* add CONFIG_CMD_WPMary Ruthven2021-05-072-0/+3
| | | | | | | | | | | | | | | | Add CONFIG_CMD_WP to control building the wp commands. This adds the wp console command, the bpforce console command, and the wp vendor command. BUG=b:186663661 TEST=flash usage doesn't change with make -j BOARD=cr50 Change-Id: I707ace6d35b691a49d983b714ad519ae85c7e01f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875470 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* add CONFIG_CMD_SYSRSTMary Ruthven2021-05-072-9/+12
| | | | | | | | | | | | | Add CONFIG_CMD_SYSRST to control building the sysrst command. BUG=b:186663661 TEST=flash usage doesn't change with make -j BOARD=cr50 Change-Id: I4922b5b55d895bc2f4b43614fe2af210c5fbe134 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875469 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* add CONFIG_CMD_ECRSTMary Ruthven2021-05-072-0/+3
| | | | | | | | | | | | | Add CONFIG_CMD_ECRST to control building the ecrst command. BUG=b:186663661 TEST=flash usage doesn't change with make -j BOARD=cr50 Change-Id: Ia3b7a0284c594d03257fa669bff0ab8bec155125 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2875468 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* signer: advance version and erase new bit in rollback mapMary Ruthven2021-05-042-4/+4
| | | | | | | | | | | | | | | | | | | BUG=b:187081660 TEST=flashing the image erases the third rollback mask bit [0.049072 update_rollback_mask: bailing out at bit 0] [0.051795 update_rollback_mask: bailing out at bit 3] [0.052886 updated 1 info map words] > sysinfo ... Rollback: 0/0/1 3/3/3 ... Change-Id: Id802e3e4b010fbc7274e34360beaa47adcd0816f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2869128 Reviewed-by: Andrey Pronin <apronin@chromium.org>
* flashrom: remove --fast-verify from documentationDaniel Campello2021-04-301-1/+1
| | | | | | | | | | | | | | This options is not used anymore and it was never exercised for read operations. Updating documentation to reflect current state. BUG=b:186479007 TEST=none Signed-off-by: Daniel Campello <campello@chromium.org> Change-Id: I52b66e30b916b361e0fd2b2621147f369d0844bb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2863542 Commit-Queue: Andrey Pronin <apronin@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org>
* ccdstate: displays "CCD_MODE" instead of "CCD EXT" fieldstabilize-RUST-13932.B-cr50_stabstabilize-13942.B-cr50_stabstabilize-13935.B-cr50_stabNamyoon Woo2021-04-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | BUG=b:186048264 TEST=ran it on Octopus. > ccdstate AP: on AP UART: on EC: on Servo: undetectable Rdd: connected KeepAlive: disabled CCD_MODE: asserted State flags: UARTAP+TX UARTEC+TX I2C SPI USBEC+TX CCD ports blocked: (none) Signed-off-by: Namyoon Woo <namyoon@google.com> Change-Id: If854d5f56c812ab04a3271b07f1ebdd5ad1e6e86 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2845279 Tested-by: Namyoon Woo <namyoon@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Namyoon Woo <namyoon@chromium.org>
* ccdstate: add 'KeepAlive' line in outputNamyoon Woo2021-04-212-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG=b:186004390 TEST=checked 'ccdstate' output in Octopus: > ccdstate AP: on AP UART: on EC: on Servo: undetectable Rdd: connected KeepAlive: disabled CCD EXT: enabled State flags: UARTAP+TX UARTEC+TX I2C SPI USBEC+TX CCD ports blocked: (none) > > > rddkeepalive true Forcing Rdd detect keepalive > > > ccdstate AP: off AP UART: off EC: on Servo: undetectable Rdd: connected KeepAlive: enabled CCD EXT: enabled State flags: UARTEC+TX I2C SPI USBEC+TX CCD ports blocked: (none) > > rddkeepalive Rdd: connected KeepAlive: enabled > > rddkeepalive false Using actual Rdd state > > rddkeepalive Rdd: connected KeepAlive: disabled Signed-off-by: Namyoon Woo <namyoon@google.com> Change-Id: Ib0517a62ddd97f334cc62530abdb8fe612ac998c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2844339 Tested-by: Namyoon Woo <namyoon@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Namyoon Woo <namyoon@chromium.org>
* i2cp: fix read chunk processingfactory-13929.B-cr50_stabMary Ruthven2021-04-191-1/+3
| | | | | | | | | | BUG=b:184965542 TEST=see BUG Change-Id: I340af997123ad0b5329a81311663ed90ffaab4b3 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2836190 Reviewed-by: Andrey Pronin <apronin@chromium.org>
* cr50: prepare to release 0.{5,6}.10Mary Ruthven2021-04-192-2/+2
| | | | | | | | | | | BUG=none TEST=none Change-Id: I73cca2c2e9044f9dd8b7cb9a4d558ad9c6ec83b1 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2837405 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* remove serialno commandstabilize-quickfix-13904.98.B-cr50_stabstabilize-glibc-13901.B-cr50_stabstabilize-coil-13902.B-cr50_stabstabilize-13904.67.B-cr50_stabstabilize-13904.66.B-cr50_stabstabilize-13904.62.B-cr50_stabstabilize-13904.59.B-cr50_stabstabilize-13904.58.B-cr50_stabstabilize-13904.55.B-cr50_stabstabilize-13904.49.B-cr50_stabstabilize-13904.48.B-cr50_stabstabilize-13904.47.B-cr50_stabstabilize-13904.44.B-cr50_stabstabilize-13904.43.B-cr50_stabstabilize-13904.42.B-cr50_stabstabilize-13904.41.B-cr50_stabstabilize-13904.34.B-cr50_stabrelease-R91-13904.B-cr50_stabMary Ruthven2021-04-061-22/+0
| | | | | | | | | | | | | | | | | | | | The cr50 serial number is based on the devid, so the serial number can be found using the sysinfo devid output. The serial number is the devid without '0x's, capitalized, and the space is replaced with a '-'. echo ${DEVID//0x/} | tr '[:lower:]' '[:upper:]' | tr ' ' '-' No scripts or tests use serialno. This command saves 208 bytes. BUG=b:181999426 TEST=none Change-Id: Ib6629ceb9cfa001d8c758077119717f29116cb15 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799442 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* add 'atboot' arg to rddkeepalivestabilize-13895.B-cr50_stabMary Ruthven2021-04-014-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add 'atboot' arg to rddkeepalive that can be used to store rddkeepalive across cr50 resets. The atboot flag gets cleared with rddkeepalive disable. BUG=b:144724216 TEST=manual # Verify 'rddkeepalive disable' is unchanged rddkeepalive disable Using actual Rdd state rddkeepalive Rdd: connected # Verify 'rddkeepalive enable' is unchanged rddkeepalive enable Forcing Rdd detect keepalive rddkeepalive Rdd: keepalive # Verify 'rddkeepalive disable' disables keepalive rddkeepalive disable Using actual Rdd state rddkeepalive Rdd: connected ccd ... Flags: 0x000000 # Verify 'rddkeepalive enable atboot' enables keepalive and sets # the atboot flag. rddkeepalive enable atboot Forcing Rdd detect keepalive atboot. rddkeepalive Rdd: keepalive (atboot) # check the ccd rddkeepalive atboot flag (0x80000) ccd ... Flags: 0x080000 reboot ... rddkeepalive Rdd: keepalive (atboot) ccd ... Flags: 0x080000 # Verify this new string doesn't break dut-control dut-control cr50.ccd_keepalive_en ccd_keepalive_en:on # 'rddkeepalive enable' doesn't touch the atboot flag rddkeepalive enable Forcing Rdd detect keepalive rddkeepalive Rdd: keepalive (atboot) # 'rddkeepalive disable' clears it. rddkeepalive disable Using actual Rdd state rddkeepalive Rdd: connected Change-Id: I10227e335a5de6ed73290ff5be2e65892913de35 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799441 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* make rddkeepalive read-only when console is lockedMary Ruthven2021-04-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print the Rdd state when the console is locked. Don't allow setting it. BUG=none TEST=manual > ccd lock CCD locked. > rddkeepalive Rdd: connected > rddkeepalive enable Parameter 1 invalid Usage: rddkeepalive [BOOLEAN] > ccd testlab open > ccd State: Opened ... > rddkeepalive enable Forcing Rdd detect keepalive > Change-Id: Ie309e42e7ef295bb0d7e7208d4bd6c17ce799e98 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799440 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* ec-comm: make EC_PACKET_MODE_EN a wake source in all statesMary Ruthven2021-04-012-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable EC_PACKET_MODE_EN wake on high in ec_comm_init_ instead of board_configure_deep_sleep_wakepins, so cr50 will wake from regular sleep and deep sleep when EC_PACKET_MODE_EN is asserted. BUG=b:183611249 TEST=manual # Verify EC-EFS after wake from deep sleep # shutdown AP wait for cr50 to enter deep sleep ec > reboot ap-off # wait for cr50 to enter deep sleep. # Verify cr50 wakes up from deep sleep and verifies EC hash. ec > reboot ap-off # Verify EC-EFS after wake from sleep # keep AP off. Set the idle action to sleep cr50 > idle s # Disable TPM_RST_L wake to prevent that from constantly waking # cr50. cr50 > rw 0x40060284 read 0x40060284 = 0x00860008 cr50 > rw 0x40060284 0x00860000 # Verify cr50 wakes up from sleep and verifies EC hash. ec > reboot ap-off Change-Id: I7fc31154becaafaa536fc1ee6775a7723e49a469 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799447 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* ccd_config: clarify the definition of public flagsMary Ruthven2021-04-011-1/+6
| | | | | | | | | | BUG=none TEST=none Change-Id: I23c35074f42e6e5d85890f4d5009f40425e89253 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2799443 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* gsctool: use dauntless vid:pid as default for d2 imagesJett Rink2021-03-231-12/+12
| | | | | | | | | | | | | | | | If a dauntless image is passed in on the command line, then default the vid:pid to daunltess's vid:pid if it wasn't specified on the command line. BUG=none TEST=upgraded d2 image without specifying -d option TEST=upgraded cr50 image without specifying -d option Change-Id: I8387d9d27432f6911df03e16249e91bd44b5558b Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2782361 Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* docs/case_closed_debugging_cr50: Expand ccd open instructionsstabilize-rust-13836.B-cr50_stabstabilize-quickfix-13816.67.B-cr50_stabstabilize-LTS-13816.60.B-cr50_stabstabilize-13856.B-cr50_stabstabilize-13851.B-cr50_stabstabilize-13836.B-cr50_stabstabilize-13821.B-cr50_stabstabilize-13816.82.B-cr50_stabstabilize-13816.80.B-cr50_stabstabilize-13816.64.B-cr50_stabstabilize-13816.63.B-cr50_stabstabilize-13816.55.B-cr50_stabstabilize-13816.53.B-cr50_stabstabilize-13816.51.B-cr50_stabstabilize-13816.40.B-cr50_stabrelease-R90-13816.B-cr50_stabDavid Stevens2021-02-261-3/+4
| | | | | | | | | | BUG=b:181273639 TEST=view in gitiles Change-Id: Ibd39f3e93b082757274ccf4f4790d25ac6bb261e Signed-off-by: David Stevens <stevensd@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2719401 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* cleanup: remove unnecessary image size paddingJett Rink2021-02-191-4/+2
| | | | | | | | | | | | | | | | For dauntless images, we say that the image goes to the next 16KB aligned address, but this will get reduce anyway since we don't send the 0xFFs as the end of the transfer. Removing this just reduces unnecessary complexity BUG=none TEST=update firmware on D2 TEST=update firmware on H1 (should be no change) Change-Id: I03ce12b85138b9200a8e48ad441221d3aa3f1609 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2706038 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* gsctool: use SHA256 digest for D2 instead of SHA1Jett Rink2021-02-191-19/+60
| | | | | | | | | | | | | | | Since Dauntless does not support SHA1, we need to send a SHA256 digest prefix for each firmware update packet. Haven should be unaffected by this change as it will still use SHA1 BUG=b:179683616 TEST=Verify D2 using SHA256 for validation works TEST=Verify H1 using SHA1 still works Change-Id: I4627d3d4d90e0bbe0dae78d4bb29852fad1a3149 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2702316 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* gsctool: drop logic for non-background supportJett Rink2021-02-191-37/+10
| | | | | | | | | | | | | | | | | | | We won't encounter H1 older than 0.0.22, and all dauntless will support background update support The alpha firmware drop (b:180042261) contains support for VENDOR_CC_TURN_UPDATE_ON in addition to VENDOR_CC_IMMEDIATE_RESET. Use VENDOR_CC_TURN_UPDATE_ON as the default. BUG=b:162244909,b:172465629 TEST=Upgrade firmware with alpha firmware before and after this change TEST=verify that Cr50 upgrade works as well Change-Id: Ibaf1d867dd4135f0041aa53273515e4228508cc3 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2702315 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* u2f: Move some u2f logic to common/ for testingYicheng Li2021-02-184-102/+110
| | | | | | | | | | | | | | | | | | | | | Since this is cr50's branch, there's no semantic difference whether we put logic in board/cr50/u2f.c or common/u2f.c. EC's build system doesn't quite allow unit-testing board-specific logic, so to unit-test some of the crypto logic in board/cr50/u2f.c, things need to move to common/u2f.c. There's no change in functionality. There should also be no problem for merging/cherry-picking ToT changes to cr50_stab, because any new u2f changes are made on cr50_stab only and not on ToT. BUG=b:172971998 TEST=make run-u2f TEST=make CR50_DEV=1 BOARD=cr50 Change-Id: I3cb8d78fd6427620a6fe20cef12708899d2896b5 Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2702496 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* flash_cr50: add c2d2 to allowable servo typesstabilize-rust-13795.B-cr50_stabstabilize-13799.B-cr50_stabMary Ruthven2021-02-091-1/+1
| | | | | | | | | | BUG=none TEST=run flash_cr50 with c2d2 and servo_micro Change-Id: Idba1a344fb615347ccbdca6cad3956b05be2326b Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2648393 Reviewed-by: Venkata Srinivasa Raju Penmetcha <venkataraju@chromium.org>
* cr50: prepare to release 0.{5,6}.9stabilize-rust-13776.B-cr50_stabstabilize-13768.B-cr50_stabMary Ruthven2021-02-022-2/+2
| | | | | | | | | | | BUG=b:179153941 TEST=none Change-Id: I6b35f52d94ffeb49d947abbb71eb1445e4a96e7b Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2669267 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* trng: change TRNG_EMPTY_COUNT to 0x7ffMary Ruthven2021-02-021-4/+5
| | | | | | | | | | | | | | | Increase TRNG_EMPTY_COUNT, so boards with slow TRNG have enough time to generate a sample. BUG=b:172542178,b:178116958 TEST=generate RSA keys 50 times on the hatch with slow TRNG. Verify the average time is around 6 seconds. Change-Id: I1b821286e1e4b5da8baa59caeda907ab3fe49f81 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2641744 Reviewed-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* usb_updater: gsctool: fix buffer truncation warn/errorAdrian Ratiu2021-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC starting with v7 introduced a new warning triggered by the snprintf calls which fails the build due to having -Werror on. CrOS is upgrading GCC 4.9 -> 10.2. The fix here is to increase the buffer size a bit so the entire max string content can fit into the buffer, thus not triggering GCC's bounds checks. gsctool.c: In function 'process_erase_ap_ro_hash': gsctool.c:1540:37: error: ', size ' directive output truncated writing 7 bytes into a region of size between 0 and 2 [-Werror=format-truncation=] 1540 | "misconfigured response, rc=%d, size %zd", | ~~^~~~~ gsctool.c:1540:5: note: using the range [-..., ...] for directive argument 1540 | "misconfigured response, rc=%d, size %zd", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gsctool.c:1539:3: note: 'snprintf' output between 37 and 66 bytes into a destination of size 30 1539 | snprintf(error_details, sizeof(error_details), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1540 | "misconfigured response, rc=%d, size %zd", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1541 | rv, response_size); | ~~~~~~~~~~~~~~~~~~ gsctool.c:1534:38: error: ', response ' directive output truncated writing 11 bytes into a region of size between 0 and 9 [-Werror=format-truncation=] 1534 | "Unexpected error rc %d, response %d", | ~~~~~~~~~^~ gsctool.c:1533:4: note: 'snprintf' output between 34 and 46 bytes into a destination of size 30 1533 | snprintf(error_details, sizeof(error_details), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1534 | "Unexpected error rc %d, response %d", | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1535 | rv, response); | ~~~~~~~~~~~~~ cc1: all warnings being treated as errors BUG=chromium:1169162 TEST=Local builds using GCC 10.2.0. Change-Id: Ib66eb6a877c52a8bd6e82a7e76d040ff927ec691 Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2645125 Tested-by: Adrian Ratiu <adrian.ratiu@collabora.corp-partner.google.com> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* cr50_stab: Add unittests for u2fstabilize-quickfix-13729.84.B-cr50_stabstabilize-quickfix-13729.73.B-cr50_stabstabilize-quickfix-13729.60.B-cr50_stabstabilize-13729.72.B-cr50_stabstabilize-13729.57.B-cr50_stabstabilize-13729.56.B-cr50_stabstabilize-13729.49.B-cr50_stabstabilize-13729.45.B-cr50_stabstabilize-13729.16.B-cr50_stabrelease-R89-13729.B-cr50_stabYicheng Li2021-01-127-4/+234
| | | | | | | | | | | | | | | | | | | | | The u2f functionality had no unittests at all. This change is more of a setup (in terms of build dependencies) so that u2f tests can be easily added in the future. This change comes with a few simple tests for u2f_generate. The basic idea here is to use board/host/dcrypto.h to mock the dcrypto functionalities. Since board/host/dcrypto.h includes an alternative to cryptoc's sha256 definitions, we need to exclude cryptoc/sha256.h in the test builds. BUG=b:172971998 TEST=make -j run-u2f TEST=make CR50_DEV=1 BOARD=cr50 -j Signed-off-by: Yicheng Li <yichengli@chromium.org> Change-Id: Idae6f55f599a017aedcaf0fe4cdb6c0506e72712 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2610133 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* coil: cleanup commentsstabilize-rust-13720.B-cr50_stabMary Ruthven2021-01-1125-110/+129
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: Icbd143b072fdd5df3b67d7e5a09ee6c01a77f6b9 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2622889 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: remove configs with coil termsMary Ruthven2021-01-111-6/+0
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: I36656b3a7b6dc3f5cfcce6f93ec6713c504ab8e6 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2622888 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: remove CONFIG_STM32_SPI1_MASTERMary Ruthven2021-01-101-3/+0
| | | | | | | | | | | | It isn't used anywhere, and it has a term we're removing. BUG=b:175244613 TEST=make buildall -j Change-Id: I1324a13aa3ca98b5082fea1b2ea5f9efb4c4b2d3 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615129 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: remove unused hostcmd configs with coil termsMary Ruthven2021-01-101-11/+0
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: I17610b1169f2611d89d17218868780bc8b82051e Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615128 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: CC_SPS->CC_SPPMary Ruthven2021-01-102-3/+3
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: I0293c7ba92d05bf0d47a92bcc86c48ac61060f09 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615127 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: CONFIG_TPM_SPS->CONFIG_TPM_SPPMary Ruthven2021-01-103-4/+4
| | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: If1d3a3e11736bf6da85938a607038a93254e9cc0 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615126
* coil: rename sps_tpm to spp_tpmMary Ruthven2021-01-102-1/+1
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: Idf1c39aa4234c475018882d7bb69c3e33a9cf79f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615125 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: rename spi_master to spi_controllerMary Ruthven2021-01-106-3/+3
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: If7b5829294a3d4d8a68042f1a8d449e8e6ef158e Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615124 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: CONFIG_SPI_MASTER->CONFIG_SPI_CONTROLLERMary Ruthven2021-01-108-24/+24
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: I244ca864dad04f2b4f02bb1be2b482921da2fc88 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615123 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: MODULE_SPI_MASTER->MODULE_SPI_CONTROLLERMary Ruthven2021-01-102-2/+2
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: I643605d4ab48c0199e3f48bbc7afefde2c987372 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615122 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: sps->sppMary Ruthven2021-01-107-122/+122
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: Ia34cccffdd6a82c25b479bb8d2e6370bbf00baf0 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615121 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* coil: CONFIG_SPS->CONFIG_SPPMary Ruthven2021-01-106-12/+12
| | | | | | | | | | BUG=b:175244613 TEST=make buildall -j Change-Id: I79a65f8475e2a764720a1f37a147c3723d34b046 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615120 Reviewed-by: Namyoon Woo <namyoon@chromium.org>