| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove these includes as they're not needed in this header. Instead,
the includes should go where they're actually being used.
BRANCH=none
BUG=b:240574048
TEST=make buildall -j
TEST=zmake build -a
Signed-off-by: Yuval Peress <peress@google.com>
Change-Id: I64b10af3216654b2a20caa1cabd267661a0bca39
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3791980
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Commit-Queue: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the USE_BUILTIN_STDLIB variable, which defaults to 1 and will use
the EC standard library implementation (the "builtin" directory). When
USE_BUILTIN_STDLIB is set to 0, the toolchain's C standard library will
be used instead.
BRANCH=none
BUG=b:234181908
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I63285569205b9c560655dfead6a260c270a92494
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3712035
Reviewed-by: Eric Yilun Lin <yllin@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The declaration for rand conflicts with the standard library declaration
so rename it from "rand" to "trng_rand". This has the benefit of making
it obvious when we're using the true random number generator.
For consistency, this also renames init_trng/exit_trng to
trng_init/trng_exit.
This is a reland of commit a6b0b3554f59cc9b0c4aae9bff7dff075f2089a9.
BRANCH=none
BUG=b:234181908, b:237344361
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
TEST=emerge-hatch ec-utils-test
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ic26890572cb9865275c866b65b0532c5ab029865
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3738978
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Bobby Casey <bobbycasey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit a6b0b3554f59cc9b0c4aae9bff7dff075f2089a9.
Reason for revert: This CL breaks ec-utils-test package and affects CQ
Original change's description:
> trng: Rename rand to trng_rand
>
> The declaration for rand conflicts with the standard library declaration
> so rename it from "rand" to "trng_rand". This has the benefit of making
> it obvious when we're using the true random number generator.
>
> For consistency, this also renames init_trng/exit_trng to
> trng_init/trng_exit.
>
> BRANCH=none
> BUG=b:234181908
> TEST=./util/compare_build.sh -b all -j 120
> => MATCH
>
> Signed-off-by: Tom Hughes <tomhughes@chromium.org>
> Change-Id: Ic3305a91263c45786c051eaa5b3689e7464aa0ab
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3712032
> Reviewed-by: Bobby Casey <bobbycasey@google.com>
> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Bug: b:234181908,b:237344361
Change-Id: Iceae55ad9ff0e6aa98aebd474f92a98e12c287e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3726597
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Pin-yen Lin <treapking@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Owners-Override: Pin-yen Lin <treapking@chromium.org>
Commit-Queue: Pin-yen Lin <treapking@chromium.org>
Tested-by: Pin-yen Lin <treapking@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The declaration for rand conflicts with the standard library declaration
so rename it from "rand" to "trng_rand". This has the benefit of making
it obvious when we're using the true random number generator.
For consistency, this also renames init_trng/exit_trng to
trng_init/trng_exit.
BRANCH=none
BUG=b:234181908
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ic3305a91263c45786c051eaa5b3689e7464aa0ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3712032
Reviewed-by: Bobby Casey <bobbycasey@google.com>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When compiling with C++ (and using the C stdlib), this include is not
found:
include/aes-gcm.h:53:10: fatal error: 'endian.h' file not found
^~~~~~~~~~
Remove the header since it's not actually used in these files.
BRANCH=none
BUG=b:234181908
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I2f90b42cbfd4ca5334bfa400c9124755c4b1cf0d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3705695
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 additional files not included in
https://crrev.com/c/3229797 by running the following:
for f in $(find . -name '*.mk');
do printf '%s\n' "$(cat ${f})" > ${f};
done
for f in $(find . -name '*.S'); do
printf '%s\n' "$(cat ${f})" > ${f}
done
BRANCH=none
BUG=b:172020503, b:234181908
TEST=./util/compare_build.sh -b all -j 120
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ib4e4d0e74bf3b00a0b2c81505fef65e2c1b7401f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3705766
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
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>
|