summaryrefslogtreecommitdiff
path: root/third_party
Commit message (Collapse)AuthorAgeFilesLines
* third_party/zephyr: Adapt atomic.h for EC build environmentDawid Niedzwiecki2022-03-101-27/+14
| | | | | | | | | | | | | | Remove unnecessary includes and redefinitions. BUG=b:208435177 TEST=zmake testall & make buildall BRANCH=none Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I50119ea67db6d7675b2cee6465b6bdccd14bc04a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3503668 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* third_party/zephyr: Add atomic.h from ZephyrDawid Niedzwiecki2022-03-103-0/+453
| | | | | | | | | | | | | | | | | | | Copied from repo: https://github.com/zephyrproject-rtos/zephyr commit: 8b4a3e23287f88dc270e1fe9400acd7be2963db2 path: include/sys/atomic.h. BRANCH=none BUG=b:208435177 TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I1469db50ef4f63bd2d30d655d50d881b6aaddacb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3500419 Reviewed-by: Robert Spier <rspier@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Erik Staab <estaab@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* core/cortex-m0: Fix div.S compilation with clangTom Hughes2021-12-111-2/+3
| | | | | | | | | | | | | | | | | | Add an additional label at the same address as __aeavi_uidivmod to work around a linker crash crash when using clang: ld.lld: error: core/cortex-m0/div.S:51:(.text+0x10): internal linker error: cannot read addend for relocation R_ARM_THM_JUMP8 BRANCH=none BUG=b:172020503, b:205351146 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I5a7f682377311e881ac2bcdb85b854127f5907ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3265867 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* tree: Files should end with single newlineTom Hughes2021-10-182-2/+0
| | | | | | | | | | | | | | | | | | | | | | | One of the checks that runs as part of "repo upload" looks for a single newline at the end of each file. I'm getting warnings about this when I touch files that do not follow this, even though I didn't add the extra newlines. This commit fixes all files by running the following: for f in $(find . -name '*.[ch]'); do printf '%s\n' "$(cat ${f})" > ${f}; done BRANCH=none BUG=b:172020503 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ia3ece5b64b549d21ca11708791368002bb6e9b0e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3229797 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* driver: Add support for BMI220 sensorMike Lee2021-10-013-0/+750
| | | | | | | | | | | | | | | Based on BMI260 sensor, add support for BMI220 sensor. BUG=b:188373185,b:193945779 BRANCH=dedede,kukui TEST=run factory test on storo360 Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Signed-off-by: Rong Chang <rongchang@chromium.org> Change-Id: Ifa88c7c58203ba405fde757b85570d53a27221a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3077595 Reviewed-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org>
* docs: Run mdformat on all .md filesTom Hughes2021-01-281-58/+65
| | | | | | | | | | | BRANCH=none BUG=b:178648877 TEST=view in gitiles Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I0ac5581ba7bc512234d40dbf34222422afa9c725 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2650551 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* cortex-m/m0: uses BL reg as SW PANIC infoEric Yilun Lin2021-01-113-0/+3
| | | | | | | | | | | | | | | | This provides more information when we hit the div_by_zero exception, since the register dump in panic info might be missing sometimes. BUG=b:177091249 TEST=crash divzero, and see the R5 provides BL reg BRANCH=none Change-Id: Icf617a01f0d93d1997812e9d8d44d4489f6a418a Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2620723 Reviewed-by: Tzung-Bi Shih <tzungbi@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* make: Fix ec+cryptoc's no-change remake behaviorCraig Hesling2020-12-291-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the cryptoc (specifically libcryptoc.a) target is marked as always PHONY. That means that any project that depends on cryptoc will always rebuild ec.bin on make invocations. For example, running make for bloonchipper will show the following build step repeatedly, even though nothing in libcryptoc changed: $ make BOARD=bloonchipper MAKE cryptoc/libcryptoc.a LD RW/ec.RW.elf NM RW/ec.RW.smap OBJCOPY RW/ec.RW.flat LD RO/ec.RO.elf NM RO/ec.RO.smap OBJCOPY RO/ec.RO.flat SIGN RW/ec.RW.flat.sig CAT ec.obj OBJCOPY ec.bin SIGN ec.bin EXTR_RW ec.bin MV ec.bin *** 80068 bytes in flash ... on bloonchipper RO **** *** 477576 bytes in flash ... on bloonchipper RW **** This fix brings the dirty/clean state of cryptoc into the main EC make process, so that it can assess if libcryptoc.a (and later ec.bin) actually need to be remade. We do something similar for the ec version header file that is generated by the build system itself. https://github.com/coreboot/chrome-ec/blob/ef6a915de0a2b65c18c03074b66717d597675162/Makefile.rules#L593,L595 This change was only possible with the fix to cryptoc's Makefile crrev.com/c/2091999 . With this change, projects that depend on cryptoc will not always force an unnecessary recompilation, so the above bloonchipper example look like the following after the initial build: $ make BOARD=bloonchipper *** 80068 bytes in flash ... on bloonchipper RO **** *** 477576 bytes in flash ... on bloonchipper RW **** BRANCH=none BUG=none TEST=rm -rf build make BOARD=bloonchipper make BOARD=bloonchipper # Check that nothing needed to be made TEST=rm -rf build make buildall -j7 make BOARD=bloonchipper # Check that nothing needed to be made Cq-Depend: chromium:2091999 Change-Id: I3f4d88c9d673f2dc7e29122699521f0f52f7572d Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2593881 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* make: Add comment about libcryptocCraig Hesling2020-12-241-0/+3
| | | | | | | | | | | | BRANCH=none BUG=none TEST=none Change-Id: I5ccc42014cfd0b08299c0eff9f39047047cbf07b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2602636 Tested-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Yicheng Li <yichengli@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* make: Rename cryptoc path variableCraig Hesling2020-12-241-3/+3
| | | | | | | | | | | | | | | Clarify that the variable means the directory path vs the library name. BRANCH=none BUG=none TEST=make BOARD=bloonchipper TEST=# Create a dummy commit ./util/compare_build.sh -b fp Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I03a1fe03da678a972091925f61bdfafaec0d4a46 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2593880 Reviewed-by: Yicheng Li <yichengli@chromium.org>
* make: Move libcryptoc rules to third_party/rules.mkCraig Hesling2020-12-241-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | This moves the libcryptoc hooks from common/build.mk to third_party/rules.mk. Recall that Makefile.rules actually contains all of the "rules"/recipes for making objects. It alone contains all of the build output beautification commands and control. Makefile.rules is included as the last step in the master Makefile. This brings no firmware change, as verified with compare_build.sh. BRANCH=none BUG=none TEST=./util/compare_build.sh -b fp TEST=./util/compare_build.sh -b fp -p # This fails due to the differing position of # -lcryptoc, -lfpsensor, -lfpalgorithm, and/or -lfpbep. Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I8d8493536a0e56ac6a5a1a32827b99ae97723727 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2092163 Reviewed-by: Yicheng Li <yichengli@chromium.org>
* third_party/linux: Adapt overflow.h for EC build environmentTom Hughes2020-09-241-10/+17
| | | | | | | | | | | BRANCH=none BUG=b:144957935 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Iea1183e8b10af651eac2fad1174128774e7fb681 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2417528 Reviewed-by: Edward Hill <ecgh@chromium.org>
* third_party/linux: Add overflow.h from Linux kernelTom Hughes2020-09-243-0/+367
| | | | | | | | | | | | | | | | Copied from repo: https://github.com/torvalds/linux.git commit: 5925fa68fe8244651b3f78a88c4af99190a88f0d path: include/linux/overflow.h. BRANCH=none BUG=b:144957935 TEST=make buildall -j Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Iab74359f9d2c283c4a1e67d8e633e88bb1861337 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2417007 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Revert "util: add gen_bmi_config utility"stabilize-13421.53.B-masterstabilize-13421.42.B-masterKeith Short2020-08-212-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f137f2493db5b5ee27ffc784538b766d5192704d. Reason for revert: Compression of BMI260 config no longer needed. Original change's description: > util: add gen_bmi_config utility > > Add the gen_bmi_config utility used to generate a compressed version > of the configuration file required by the BMI260 IMU sensor. > > This is expected to be a temporary solution until the 8 KiB BMI > configuration file can be moved out of the EC code. > > BUG=b:160330682 > BRANCH=none > TEST=make utils > TEST=run "gen_bmi_config compress BMI260_main.tbin > bmi260_compressed.bin" > TEST=run "gen_bmi_config decrompress bmi260_compressed.bin > bmi260_uncompressed.bin", verify uncompressed file matches original > file. BUG=b:160330682 BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I2bfe8d7bef2a35f43b96cc0cd07209bef534ed63 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2354195 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org>
* bmi260: move BMI260 init file into .init.rom sectionKeith Short2020-08-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Increases Volteer RO and RW flash spaces by 7088 bytes each. This is the net gain after including the init_rom layer. BUG=b:160330682 BRANCH=none TEST=make buildall TEST=On volteer run "ectool motionsense" and "ectool motionsense lid_angle". Verify both RO and RW images. TEST=Program RO image with predecessor CL:2311268. Program this CL into AP firmware image and verify EC software sync updates to RW image. TEST=Verify BMI260 operation with CONFIG_CHIP_INIT_ROM_REGION disabled using volteer_tcpmv1 board. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I6849b6c9e96756266528b39ab5e53268dce2a13c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2311756 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org>
* COIL: change usage of sanityDaisuke Nojiri2020-08-141-5/+5
| | | | | | | | | | | | | | | | Google is working to change its source code to use more inclusive language. To that end, replace the term "sanity" with inclusive alternatives. BUG=b:163885307 BRANCH=None TEST=make -j buildall TEST=grep -ir sanity Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I487a50999d506a0337f1d3fbe173f193e5e4098a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2353516 Reviewed-by: Sam Hurst <shurst@google.com>
* util: add gen_bmi_config utilityKeith Short2020-07-102-0/+0
| | | | | | | | | | | | | | | | | | | | | | | Add the gen_bmi_config utility used to generate a compressed version of the configuration file required by the BMI260 IMU sensor. This is expected to be a temporary solution until the 8 KiB BMI configuration file can be moved out of the EC code. BUG=b:160330682 BRANCH=none TEST=make utils TEST=run "gen_bmi_config compress BMI260_main.tbin bmi260_compressed.bin" TEST=run "gen_bmi_config decrompress bmi260_compressed.bin bmi260_uncompressed.bin", verify uncompressed file matches original file. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I7ef06414f84169f2e16f26df4f83455c3df37e51 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2289215 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* third_party/incbin: Add public domain incbinKeith Short2020-07-1011-0/+889
| | | | | | | | | | | | | | | Add the public domain incbin library used to include binary files directly into C code. The UNLICENSE file confirms the code can be treated as unencumbered. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I6107737cdb5a94e71e5325943b2d1d2627659f85 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2289214 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* test: Pass commandline arguments to run_testTom Hughes2020-05-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | run_test is called by the "runtest" console command. Console commands can take arguments, so pass along the arguments to run_test to allow parameters to be passed to run_test. The following command was used for automatic replacement: git grep --name-only 'void run_test(void)' |\ xargs sed -i 's#void run_test(void)#void run_test(int argc, char **argv)##' BRANCH=none BUG=b:155897971 TEST=make buildall -j TEST=Build and flash flash_write_protect test > runtest 1 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ib20b955d5ec6b98f525c94c24aadefd7a6a320a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2209418 Reviewed-by: Yicheng Li <yichengli@chromium.org> Commit-Queue: Yicheng Li <yichengli@chromium.org> Tested-by: Yicheng Li <yichengli@chromium.org>
* driver: Add BMI260 basic driver supportChing-Kang Yen2020-04-233-0/+750
| | | | | | | | | | | | | | | | | | | | Add BMI260 accel/gyro driver code. Be able to do initial configuration, start up sensor, config interrupt and fifo, perform calibration, and access the sensor data from AP. BRANCH=None BUG=b:146144827 TEST=make -j4 BOARD=volteer \ && flash_ec --image build/volteer/ec.bin --board volteer Then, check sensor data is available on DUT by "ectool motionsense". TEST=make buildall -j TEST=tast run ${IP} hardware.SensorRing Cq-Depend: chromium:2148802 Change-Id: I5124ee8359a74f98cfe8d26da640325f5e00cb15 Signed-off-by: Ching-Kang Yen <chingkang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2086534 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* common/sha256: Move to third_partyNicolas Boichat2020-03-253-0/+336
| | | | | | | | | | | | | | The code originally comes from vboot_reference, and is now found on github: https://github.com/ogay/sha2 . BRANCH=none BUG=chromium:884905 TEST=make buildall -j, which also include basic tests. Change-Id: I8beac95430b2126f625a3981a9ebe038ab588212 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1599763 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* core/cortex-m[0]: Move core functions assembly files to third_partyNicolas Boichat2020-03-258-0/+795
| | | | | | | | | | | | | | | | The code originally comes from libaeabi-cortexm0. It is unclear which exact git commit the code comes from, but since we have used it without issue for 5 years, it is reliable, and a refresh is probably not required at this stage. BRANCH=none BUG=chromium:884905 TEST=make buildall -j, which also include basic tests. Change-Id: I910c1c4e6a46b2f0fe8b7a429f1b6f0f50c2dc21 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1599762 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* core/cortex-m0/curve25519: Move code to third_party folderNicolas Boichat2020-03-257-0/+3270
| | | | | | | | | | | | | | Also, add LICENSE file (some files are under CC0, some are public domain), and METADATA file. BRANCH=none BUG=chromium:884905 TEST=make buildall -j, which also include basic tests. Change-Id: Ib3a7eb9245a0634c4052064c3e36cbe2ddafbcb9 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1599761 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* curve25519: Move to third_partyNicolas Boichat2020-03-245-0/+1155
| | | | | | | | | | | | | | | | curve25519 comes from boringssl as well, move it to that directory. See git log for which boringssl commit the implementation comes from, and changes that were applied. BRANCH=none BUG=chromium:884905 TEST=make buildall -j, which also include basic tests. Change-Id: I1dee4795009c1e2034a181f6083d1f9445c87d41 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1600946 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* aes-gcm: Fix unused error for kSizeTWithoutLower4BitsCraig Hesling2019-06-241-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the following compiler error when CORE_CORTEX_M is not set. common/aes-gcm.c:101:21: error: unused variable 'kSizeTWithoutLower4Bits' [-Werror,-Wunused-const-variable] static const size_t kSizeTWithoutLower4Bits = (size_t) -16; This occurs when compiling the host-based unit and fuzzer tests. The trace for this goes as follows: Setting CORE_CORTEX_M sets GHASH_ASM, which later on sets GHASH. Certain sections of code that use this static const are disabled if GHASH is not set. Thus, no uses of this static const. This issue arose when attempting to add the fpsensor task to host_command_fuzz, but is actually present(and unreported) in the fpsensor unit test. The presence of this unreported issue in the host-fpsensor build target was discovered by manually invoking cpp for aes-gcm.c and checking that the static const existed, but was not references. BRANCH=none BUG=none TEST=make buildall -j Change-Id: I2ef5d73e11ced421d888221ef3c672e42bba53a3 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1661121 Reviewed-by: Nicolas Norvez <norvez@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* aes-gcm: Fix undefined ref gcm_gmult_v8 gcm_ghash_v8Craig Hesling2019-06-141-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | This fixes the undefined reference to gcm_init_v8 and gcm_ghash_v8 when compiling with low optimization levels. make BOARD=nocturne_fp V=1 CFLAGS_DEBUG_CHIP="-ggdb -Og" This builds on the adaption work in crrev.com/c/1238976. It mirrors what was done to fix gcm_gmult_neon/gcm_ghash_neon and pulls ideas from the following upstream boringssl files: https://boringssl.googlesource.com/boringssl/+/refs/heads/master/crypto/fipsmodule/modes/internal.h#317 https://boringssl.googlesource.com/boringssl/+/refs/heads/master/crypto/fipsmodule/modes/gcm.c#330 BRANCH=none BUG=chromium:972148 TEST=make buildall TEST=make run-aes -j Change-Id: Id85eb808d546f30c6d4f02263a985d91d7387d5f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1650124 Tested-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* aes-gcm: Adapt AES-GCM to build for ECNicolas Boichat2018-09-213-330/+57
| | | | | | | | | | | | | | | | | | | | | Update header, C code, trim unnecessary bits. Also add a test with vectors taken from BoringSSL tests. BRANCH=none BUG=b:111160949 TEST=make run-aes -j TEST=make BOARD=nocturne_fp test-aes -j flash_fp_mcu aes.bin runtest => pass (C implementation speed: 909555 us for 1000 iterations) (ASM implementation speed: 596690 us for 1000 iterations) Change-Id: Ief54a8441d26ba44de4c3ac81e203cab7472269f Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1141446 Commit-Ready: Nicolas Norvez <norvez@chromium.org> Reviewed-by: Nicolas Norvez <norvez@chromium.org>
* aes-gcm: Baseline implementation from BoringSSLNicolas Boichat2018-09-203-0/+1860
| | | | | | | | | | | | | | | | | | | | | | Copied over from upstream BoringSSL at commit 859679518d3433cdd0dd6cf534bd7bdb2a32dd60 . cp boringssl/crypto/fipsmodule/modes/gcm.c \ third_party/boringssl/common/gcm.c cp crypto/fipsmodule/modes/internal.h \ third_party/boringssl/include/aes-gcm.h => Remove non-GCM definitions perl boringssl/crypto/fipsmodule/modes/asm/ghash-armv4.pl \ > third_party/boringssl/core/cortex-m/ghash.S BRANCH=none BUG=b:111160949 TEST=none Change-Id: I34702ff315c8c44e6f4868243058700aaf026099 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1141445 Reviewed-by: Adam Langley <agl@chromium.org>
* aes: Adapt AES code to build for ECNicolas Boichat2018-09-203-187/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Update header, C code, and tweak the assembly for ARMv7-M. Rename aes_now_* functions to AES_* to avoid the need for a separate wrapper. Also add a test with FIPS-197 test vectors, and speed test. BRANCH=none BUG=b:111160949 TEST=make run-aes -j TEST=make BOARD=nocturne_fp test-aes -j flash_fp_mcu aes.bin runtest => pass (C implementation speed: 11977 us for 1000 iterations) (ASM implementation speed: 5815 us for 1000 iterations) Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Change-Id: I2048aae73decccb893bc1724b2617b0b902dd992 Reviewed-on: https://chromium-review.googlesource.com/1120340 Commit-Ready: Nicolas Boichat <drinkcat@chromium.org> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Adam Langley <agl@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* aes: Baseline implementation from BoringSSLNicolas Boichat2018-09-205-0/+2492
Copied over from upstream BoringSSL at commit 859679518d3433cdd0dd6cf534bd7bdb2a32dd60 . cp boringssl/LICENSE third_party/boringssl/LICENSE cp boringssl/src/crypto/fipsmodule/aes/aes.c \ third_party/boringssl/common/aes.c cp boringssl/include/openssl/aes.h \ third_party/boringssl/include/aes.h perl boringssl/crypto/fipsmodule/aes/asm/aes-armv4.pl \ > third_party/boringssl/core/cortex-m/aes.S BRANCH=none BUG=b:111160949 TEST=none Change-Id: Ia1fbb57b23e039ca5dec3d56984c83c19b7d6cd6 Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1120339 Reviewed-by: Adam Langley <agl@chromium.org>