summaryrefslogtreecommitdiff
path: root/board/hatch_fp
Commit message (Collapse)AuthorAgeFilesLines
* stm32: Enlarge console task stack for testingYicheng Li2020-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | For on-device unit tests, we use the console to "runtest" and view results. A small console size would result in console stack overflow after the test finishes. Use a larger console stack if it's a test build. BRANCH=None BUG=b:146059307 TEST=make BOARD=nucleo-h743zi tests -j (Flash the build/nucleo-h743zi/test-aes.bin) (Connect to UART console) runtest (Repeat for test-sha256.bin and test-sha256_unrolled.bin) Change-Id: I5c48ae10f5808ed2d3854fdc72275a3a416cf76d Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2006709 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* hatch_fp/nocturne_fp: Specify RSA_KEY_SIZE in RW and ROTom Hughes2020-01-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | The rsa.h header can be included by any file, regardless of whether CONFIG_RSA is enabled. In that case we still want RSA_KEY_SIZE and CONFIG_RSA_EXPONENT_3 to be correct for the board. The following boards already set CONFIG_RSA_KEY_SIZE outside of RO/RW * kalista * endeavour * fizz * puff BRANCH=none BUG=b:144958737 TEST=make buildall -j TEST=diff build/<hatch_fp,nocturne_fp,hammeri,nucleo-h743zi>/ec.bin with and without the change => same Change-Id: I7e565e25b06b0d36e28ae32934b1f65b382e5b66 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1999606 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org>
* hatch_fp: Better comments for pin configCraig Hesling2020-01-101-3/+3
| | | | | | | | | | | BRANCH=nocturne,hatch BUG=none TEST=none Change-Id: I1b1e994d7e8e74c298f2452b7eaf1a567d387dc0 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1991997 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* bloonchipper: Add transport and sensor detectionTom Hughes2020-01-082-1/+51
| | | | | | | | | | | | | | | | | | | | | | | bloonchipper (aka hatch_fp aka dragonclaw) has a voltage divider that can be used to select the sensor and the transport type. Supported designs: * Dragonclaw rev 0.2 (green with Google logo): go/dragonclaw-schematic-rev-0.2 * Hatch reference v3.0: go/hatch-schematic-rev-3.0 The selection lines are connected to ADC inputs, so a future change will use the ADC to allow more than two transports or sensors. BRANCH=none BUG=b:147113851 TEST=flash dragonclaw rev 0.2 and view console output Change-Id: If2e4b150d34cfe41477be528c70e1645043d4d82 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986322 Reviewed-by: Craig Hesling <hesling@chromium.org>
* bloonchipper: Update GPIOs for Hatch 3.0 designTom Hughes2020-01-031-7/+9
| | | | | | | | | | | | | | | Based on the following schematics: https://ee-schematics.teams.x20web.corp.google.com/hatch/hatch_p0/hatch_p0_499d1e339869c92d67ea9077ba35b66a6c103e1c.html BRANCH=none BUG=b:145847137 TEST=none Change-Id: I29c5ec5abb9bdf7650c5a1eb190309c6ea85bfce Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1972376 Commit-Queue: Craig Hesling <hesling@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org>
* hatch_fp: Move SLP_S0_L for Hatch Rev 2.8Craig Hesling2019-11-081-2/+2
| | | | | | | | | | | | | | | | | | | | | Previous schematic was Hatch Rev 2.6 (commit e36c8b3683475b853c21564ddabc3ec90ee64f75 in hatch ee-git): http://go/hatch-schematic-rev-2.6 New schematic is Hatch Rev 2.8 (commit defe790e8d1c863de2ec04ee50f285e270038848 in hatch ee-git): http://go/hatch-schematic-rev-2.8 BRANCH=none BUG=b:144004439 TEST=make buildall -j Change-Id: Ia40c4149f9c9d68c39e8235fec9a949347ed9c27 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1904652 Tested-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* hatch_fp: Switch to UNUSED pins mechanismCraig Hesling2019-11-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL enables UNUSED pins for hatch_fp. This places the unused/unconnected pins in the lowest power state. Using the UNUSED pins mechanism should be functionally equivalent to the previous method of declaring these pins as analog inputs. See crrev.com/c/1894242 for implementation details. BRANCH=nocturne,hatch BUG=b:130561737 TEST=make buildall -j TEST=make BOARD=bloonchipper # Connect dragonclaw dev board over servo micro sudo servod --board=bloonchipper --config bloonchipper_rev0.1.xml & ./util/flash_ec --board=bloonchipper minicom -D $(dut-control raw_fpmcu_uart_pty | cut -d: -f2) > sysinfo # Check that we are in RW Change-Id: I412118287893ec63cef42c6c190d0a4755de06cb Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1900122 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* nocturne_fp/hatch_fp: Document alternate namesTom Hughes2019-11-061-1/+8
| | | | | | | | | | | | | | | There are many variations of "board" names for the FPMCU, but they all refer to one of two hardware configurations. BRANCH=none BUG=none TEST=make buildall -j Change-Id: I5c57fab1976f2aea395d8319c4f9c52f8134129a Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1894454 Reviewed-by: Yicheng Li <yichengli@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org>
* hatch_fp/nocturne_fp: Disable CONFIG_SYSTEM_UNLOCKED by defaultTom Hughes2019-11-061-1/+1
| | | | | | | | | | | | | | | | The release branch disables CONFIG_SYSTEM_UNLOCKED, but to prevent confusion (and potential mistakes), we will just always disable CONFIG_SYSTEM_UNLOCKED since the write protection scheme for fingerprint is final. BRANCH=none BUG=b:130249462,b:73337313 TEST=make buildall -j Change-Id: I072a5e037d80fbde39a5b695da7b2bd6de64e04c Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1895605 Reviewed-by: Yicheng Li <yichengli@chromium.org>
* hatch_fp: Configure unused GPIO pins.Ravi Chandra Sadineni2019-10-311-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | By default, STM32F4 pins are configured as inputs, except some JTAG pins which can impact the power consumption of the device in different power modes because pins are very sensitive to external noise in input mode I/O. To avoid extra I/O current, all pins should be configured as analog input (AIN); in this mode the Schmitt trigger input is disabled, providing zero consumption for each I/O pin. For more info please look at "USING STM32F4 MCU POWER MODES WITH BEST DYNAMIC EFFICIENCY"("AN4365") section 1.2.6 and STM32F412 reference manual section 7.3.12. BUG=b:130561737 BRANCH=None TEST=Flash bloonchipper and measure power before and after. fpenroll and fpmatch works fine. Change-Id: I85d76589be22b892c81680763cfb263746004a80 Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1883127 Reviewed-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* fingerprint: Restrict md and rw console commandsCraig Hesling2019-10-232-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL ultimately restricts access to the md and rw console commands when the system is locked, when system_is_locked(). It does this by enabling and configuring the restricted console command feature for nocturne_fp and hatch_fp. This sets up the framework for more console commands to use the restricted flag for fingerprint, but right now, only the md and rw commands use the restricted console command flag. The restricted flag for md and rw was introduced in crrev.com/c/1868430. BRANCH=nocturne BRANCH=hatch BUG=b:142559996, b:142505927 TEST=# Test on nocturne_fp make BOARD=nocturne_fp scp build/nocturne_fp/ec.bin dut1:~/ ssh dut1 flash_fp_mcu ./ec.bin # From FPMCU UART console version # Ensure that version is custom based on workstation help # Ensure that md and rw are not prefixed with "-" help list # Ensure that a "Flags" column exists and that # md and rw both have a 1 in the column. md 0x0 # Ensure that this successfully reads the word rw 0x24000000 # Ensure that this successfully reads the word syslock md 0x0 # Ensure that this fails with "Access Denied" rw 0x24000000 # Ensure that this fails with "Access Denied" help # Ensure that md and rw are now prefixed with "-" Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I1202a118b836ff2a2acc986f6f3b0f6e07b36894 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1867388 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* rollback: Clear temporary copies of rollback secret.Yicheng Li2019-09-051-2/+0
| | | | | | | | | | | | | | | | | After working with temporary copies of rollback secret, clear them using always_memset() in third_party/cryptoc/util.c. For boards that have CONFIG_ROLLBACK_SECRET_SIZE, configure CONFIG_LIBCRYPTOC automatically. BRANCH=nocturne BUG=chromium:968809,chromium:989594,b:130238794 TEST=make -j buildall TEST=tested fingerprint enrollment and matching on nocturne DUT, which uses rollback_get_secret(). Change-Id: I44fb5ef7d43c080e4d33c8d9a7d9298e194e1cf3 Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1731544 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* common: Add CONFIG_LIBCRYPTOC to enable third_party/cryptocYicheng Li2019-08-231-1/+1
| | | | | | | | | | | | | | | | | | | Boards that have CONFIG_LIBCRYPTOC will be able to use functions in third_party/cryptoc. Functions in third_party/cryptoc that are not called will not be linked because of linker optimization. This can be verified by checking the "smap" file in the build directory for a given target (e.g. build/nocturne_fp/RW/ec.RW.smap), which contains a list of all symbols in the target. Configure CONFIG_LIBCRYPTOC in nocturne_fp and hatch_fp. This config replaces CONFIG_ALWAYS_MEMSET. BRANCH=nocturne BUG=chromium:968809,chromium:989594,b:130238794 TEST=make -j buildall Change-Id: Ia40da9fb429f9d03623bc92e25f6670e5cdbd983 Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1764835 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* common: Prepare always_memset()stabilize-kernelnext-broadwell-12434.BYicheng Li2019-08-171-0/+2
| | | | | | | | | | | | | | Add a config for using always_memset() from third_party/cryptoc BRANCH=nocturne BUG=chromium:968809,chromium:989594,b:130238794 TEST=make -j buildall Change-Id: I22c83512eb1b8bdc8dac1b26315d25b65831513c Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1731543 Reviewed-by: Nicolas Norvez <norvez@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* util: Unify separate flash_fp_mcu scripts into single common oneTom Hughes2019-07-231-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | For fingerprint firmware we are moving towards a model where the "board" (in EC terminology) is a specific MCU+FP_SENSOR combination and not tied to the main system board that it's connected to (e.g., "hatch", "nocturne", etc.). This change decouples flash_fp_mcu from the EC "board". BRANCH=none BUG=b:136678758,b:137108509 TEST=make buildall -j hatch: flash_fp_mcu /opt/google/biod/fw/hatch_fp_v2.0.1359-6f54be08d.bin nocturne: flash_fp_mcu /opt/google/biod/fw/nocturne_fp_v2.0.1765+87bb17a39.bin nami: flash_fp_mcu /opt/google/biod/fw/nami_fp_v2.2.144-7a08e07eb.bin Cq-Depend:chromium:1705055 Change-Id: Idfe298f59ab9df8657a570cc47e956b4e94ee1a1 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1704808 Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Nicolas Norvez <norvez@chromium.org>
* hatch_fp: Add RDP (read protection) support to STM32F4Tom Hughes2019-07-241-1/+1
| | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:125419658 TEST=Remove "-U" flag in STM32MON_READ_FLAGS in flash_fp_mcu_common.sh flash_fp_mcu -r foo.bin => success hexdump foo.bin => valid data ectool --name=cros_fp flashprotect enable ectool --name=cros_fp reboot_ec flash_fp_mcu -r foo.bin => fails Add "-U" flag back to STM32MON_READ_FLAGS in flash_fp_mcu_common.sh flash_fp_mcu -r foo.bin => success hexdump foo.bin => all 0xFF Change-Id: Ic3ec18262e653b72baf239caa8db12186a63613c Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1692220 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* hatch_fp: enable fp_sensor taskTom Hughes2019-07-032-3/+2
| | | | | | | | | | | BRANCH=none BUG=b:124996507 TEST=fpcapture/fpsensor/fpenroll from the console work Change-Id: I6f481ed6b5185585aa01506e292b6b31e202a3b7 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1558938 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* hatch_fp: Enable rollbackTom Hughes2019-07-031-4/+1
| | | | | | | | | | | BRANCH=none BUG=b:124996507 TEST=make buildall -j Change-Id: I49f87cb9f6a6551f83f91d55242f2c5c250e8b83 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1681378 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* ec.tasklist: Consolidate duplicate commentsTom Hughes2019-06-191-11/+1
| | | | | | | | | | | | | | Same as https://crrev.com/c/1551579, but clean up some files with the old comments that have been added since that change. BRANCH=none BUG=none TEST=make buildall -j Change-Id: I4bc7fdc7cb128c48545ea681ab1381610d54fb6d Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1664604 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Add OWNERS files for fingerprintTom Hughes2019-06-051-0/+1
| | | | | | | | | | | | BRANCH=none BUG=chromium:967924 TEST=none Change-Id: Ief50a64d45cc6862fab3417e3f8350d3c581209e Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1633909 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Nicolas Norvez <norvez@chromium.org>
* flash_fp_mcu: use modalias to detect FP spiidTom Hughes2019-04-261-3/+0
| | | | | | | | | | | | | | | | | | During bringup there was a point where the spiid for the fingerprint sensor changed between devices (apparently due to broken TPM firmware since the TPM is usually the first SPI device)). This resulted in non-obvious failures when running flash_fp_mcu since many other things were also not working. BRANCH=none BUG=chromium:955117 TEST=emerge-nocturne ec-utils-test && cros deploy nocturne ec-utils-test flash_fp_mcu /opt/google/biod/fw/nocturne_fp_v2.2.110-b936c0a3c.bin Change-Id: I9161361e2c66de200f618c00074eeb42a9ecb29b Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1566653 Reviewed-by: Nicolas Norvez <norvez@chromium.org>
* hatch_fp: fix memory mapping of FP buffersNicolas Norvez2019-04-191-3/+7
| | | | | | | | | | | | | | | On STM32F412 the buffers are located in the regular SRAM, don't define a special section. BRANCH=None BUG=b:124773209 BUG=b:124996507 TEST=fpenroll+fpmatch Change-Id: I8659e4587973c4e30c891084691b28326346e1d7 Signed-off-by: Nicolas Norvez <norvez@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1574658 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* hatch_fp: Fix slave select (NSS / CS) pin managementTom Hughes2019-04-111-2/+7
| | | | | | | | | | | BRANCH=none BUG=b:124996507 TEST=Read HWID from fingerprint sensor (slave) on hatch_fp Change-Id: I344d7e4a5afec1f7c23f45aca593159ba67e89ed Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1558937 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* hatch_fp: add flash_fp_mcu scriptNicolas Norvez2019-04-031-0/+35
| | | | | | | | | | | | | | | | Set the correct GPIOs, SPI dev and ID for Hatch. Keep the GPIO_PWREN variable empty since there is not such GPIO on Hatch, power is always on for the FPMCU BRANCH=None BUG=b:124405913 BUG=b:126455006 TEST=flash_fp_mcu on hatch doesn't bail Change-Id: I544868bc088d3aeb0896b8123bfc83c1ea0a156c Signed-off-by: Nicolas Norvez <norvez@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1532345 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* hatch_fp: initial uploadNicolas Norvez2019-04-036-0/+376
First draft, lots of features still missing. Dev key generated with this command: openssl genrsa -3 -out board/hatch_fp/dev_key.pem 3072 BRANCH=none BUG=b:124996507 TEST=make BOARD=hatch_fp Change-Id: I7d7f0ce6807f7db9ee67e2e9b72ba6b2a0b87591 Signed-off-by: Nicolas Norvez <norvez@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1482059 Reviewed-by: Tom Hughes <tomhughes@chromium.org>