summaryrefslogtreecommitdiff
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
* tasks: Only report stack overflow if task is enabledRob Barnes2023-05-155-9/+16
| | | | | | | | | | | | | | | | | Don't report stack overflow on a task that has been disabled. Without this change, system safe mode will fail to recover from a stackoverflow because the stackoverflow will be detected again, even though the task has already been disabled. BUG=b:278792557 TEST=System safe mode starts on boten after a stackoverflow Change-Id: I59ab579c296d108dcd8c5aba9cb32bba6c7bbf54 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4455298 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* ec: Enable unaligned access for cortex-mFiras Sammoura2023-05-151-2/+2
| | | | | | | | | | | | | | | | | | Enable unaligned access for cortext-m and. Add a unit test to validate that unaligned access runs properly on both bloonchipper and dartmonkey. Add benchmarks to measure the speed gain between aligned and unaligned access. BRANCH=none BUG=b:239254184 TEST=test/run_device_tests.py -b dartmonkey -t unaligned_access TEST=test/run_device_tests.py -b bloonchipper -t unaligned_access Change-Id: I7d75433e6b7b33d7c82ad740dc85a8646d891c6a Signed-off-by: Firas Sammoura <fsammoura@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4327795 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Mike Frysinger <vapier@chromium.org>
* core/cortex-m: fix __data_lma_start when compiling with clangJun Lin2023-05-051-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NPCX RO firmware image is composed of the 64-bytes NPCX image header (start at flash offset 0) + EC firmware image. After the EC chip boots up, the EC booter copies only the EC image part from the flash to the CODE RAM. As a result, the value of the __data_lma_start should be assigned to the end of the VMA of the .rodata section (0x1008fcb0+0x4cb0=0x10094960) but the start of the LMA of .data section (0x100949a0). Otherwise, it causes the init.s to copy the incorrect Right-value to the global variable in the data section. Sections: Idx Name Size VMA LMA File off Algn 0 .header 00000040 10080000 10080000 00010000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .text 0000fcb0 10080000 10080040 00020000 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 2 .rodata 00004cb0 1008fcb0 1008fcf0 0002fcb0 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .vtable 00000000 200c0000 200c0000 00034960 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .bss 000029f8 200c0000 200c0000 00040000 2**3 ALLOC 5 .data 000001a8 200c29f8 100949a0 000429f8 2**3 CONTENTS, ALLOC, LOAD, DATA BRANCH=none BUG=b:271333155 TEST=Verified the EC can run with clang build by David on the helipilot project. Change-Id: Ic9b6a2089792242f6a126f6b886536dde4dcd35d Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4333199 Reviewed-by: CH Lin <chlin56@nuvoton.com> Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: David Cross <davidmcross@google.com> Reviewed-by: Bobby Casey <bobbycasey@google.com> Tested-by: David Cross <davidmcross@google.com> Commit-Queue: Bobby Casey <bobbycasey@google.com>
* boringssl: Move flags to toolchain.mkJeremy Bettis2023-04-262-0/+5
| | | | | | | | | | | | | | | | | | | | | | Instead of comparing the CROS_COMPILE path to magic strings, just set the arch specific flags CMAKE_SYSTEM_PROCESSOR and OPENSSL_NO_ASM in core/$(CORE)/toolchain.mk This also has the advantage of working when CROSS_COMPILE is set to something odd, not in the chroot, like in gitlab builds. BRANCH=None BUG=b:248508087, b:273639386 TEST=make buildall Change-Id: I0c823e321892a04e1f063d8fa0ce386428f5dc6c Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4477525 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Yi Chou <yich@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yi Chou <yich@google.com>
* Reland "tree: Remove the stale boringssl AES code"Yi Chou2023-04-253-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of commit 1eb725490d0e7ff726b9edcf11579080a412a02f Original change's description: > tree: Remove the stale boringssl AES code > > BUG=b:248508087, b:273639386 > TEST=make runhosttests -j > TEST=make buildall -j > BRANCH=none > > Change-Id: If4d7ee558871debdca5998c51d75c1062dce2a50 > Signed-off-by: Yi Chou <yich@google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4388275 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> BUG=b:248508087, b:273639386 TEST=make runhosttests -j TEST=make buildall -j BRANCH=none Force-Relevant-Builds: all Change-Id: Ifac2e67d3f347be07a4ab880398029a694fa357d Signed-off-by: Yi Chou <yich@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4464660 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* tasks: Add task_enabled functionRob Barnes2023-04-245-0/+25
| | | | | | | | | | | | | Add task_enabled function that simply check if a task is enabled or not. BUG=b:278792557 BRANCH=None TEST=Manually tested Change-Id: I0faccec603bc6d0226ad2ecbde2d90a6c233dd74 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4455297 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Revert "Reland "tree: Remove the stale boringssl AES code""Jonathon Murphy2023-04-213-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 2e03009c0dccc4ae9683d3b7d761e900b3cf2c46. Reason for revert: Breaks postsubmit b/279174496 Original change's description: > Reland "tree: Remove the stale boringssl AES code" > > This is a reland of commit 1eb725490d0e7ff726b9edcf11579080a412a02f > > Original change's description: > > tree: Remove the stale boringssl AES code > > > > BUG=b:248508087, b:273639386 > > TEST=make runhosttests -j > > TEST=make buildall -j > > BRANCH=none > > > > Change-Id: If4d7ee558871debdca5998c51d75c1062dce2a50 > > Signed-off-by: Yi Chou <yich@google.com> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4388275 > > Reviewed-by: Tom Hughes <tomhughes@chromium.org> > > BUG=b:248508087, b:273639386 > TEST=make runhosttests -j > TEST=make buildall -j > BRANCH=none > > Signed-off-by: Yi Chou <yich@google.com> > Change-Id: Ifca00792d0568ed767a1c9aea4953eb7a93c1c92 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439570 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> Bug: b:248508087, b:273639386 Change-Id: I4c44cdd75a9cc38e3e0e688d91f2a64b908ae61d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4459598 Tested-by: Jonathon Murphy <jpmurphy@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Auto-Submit: Jonathon Murphy <jpmurphy@google.com> Owners-Override: Jonathon Murphy <jpmurphy@google.com>
* Reland "tree: Remove the stale boringssl AES code"Yi Chou2023-04-213-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of commit 1eb725490d0e7ff726b9edcf11579080a412a02f Original change's description: > tree: Remove the stale boringssl AES code > > BUG=b:248508087, b:273639386 > TEST=make runhosttests -j > TEST=make buildall -j > BRANCH=none > > Change-Id: If4d7ee558871debdca5998c51d75c1062dce2a50 > Signed-off-by: Yi Chou <yich@google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4388275 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> BUG=b:248508087, b:273639386 TEST=make runhosttests -j TEST=make buildall -j BRANCH=none Signed-off-by: Yi Chou <yich@google.com> Change-Id: Ifca00792d0568ed767a1c9aea4953eb7a93c1c92 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439570 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* Revert "tree: Remove the stale boringssl AES code"Yi Chou2023-04-183-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1eb725490d0e7ff726b9edcf11579080a412a02f. Reason for revert: break the build of chromeos-base/chromeos-fpmcu-unittests. Original change's description: > tree: Remove the stale boringssl AES code > > BUG=b:248508087, b:273639386 > TEST=make runhosttests -j > TEST=make buildall -j > BRANCH=none > > Change-Id: If4d7ee558871debdca5998c51d75c1062dce2a50 > Signed-off-by: Yi Chou <yich@google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4388275 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> Bug: b:248508087, b:273639386 Change-Id: I81f5035e25bed8e98516072a6f2a7a609fd6eede Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4439431 Commit-Queue: Yi Chou <yich@google.com> Tested-by: Yi Chou <yich@google.com> Reviewed-by: Howard Yang <hcyang@google.com>
* tree: Remove the stale boringssl AES codeYi Chou2023-04-183-4/+0
| | | | | | | | | | | | BUG=b:248508087, b:273639386 TEST=make runhosttests -j TEST=make buildall -j BRANCH=none Change-Id: If4d7ee558871debdca5998c51d75c1062dce2a50 Signed-off-by: Yi Chou <yich@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4388275 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* system_safe_mode: Print process stack dumpRob Barnes2023-04-112-47/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the CONFIG_SYSTEM_SAFE_MODE_PRINT_STACK option for printing the faulting process stack to the console buffer. This must be done in safe mode because the console buffer ignores log messages while in an ISR. This option is on by default when system safe mode is enabled. get_panic_stack_pointer is a new overidable function that each architecture needs to implement to support this feature. The default implementation returns 0, which will result in no stack being printed. This is a workaround until coredumps are fully supported. BUG=b:266084064 BRANCH=None TEST=System safe mode zephyr test passes Stack print observed on boten, guybrush, and skyrim boards. LOW_COVERAGE_REASON=Cortex-M and NDS32 specific code cannot be tested Change-Id: Ied78ab7e6edca9cfa97c50323d94e39a3fca0eef Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4301695 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* core: Remove "end" symbolTom Hughes2023-04-065-30/+0
| | | | | | | | | | | | | | | https://crrev.com/c/4390608 introduced our own sbrk implementation, which uses the equivalent __shared_mem_buf symbol, so "end" is no longer needed. BRANCH=none BUG=b:234181908 TEST=./util/compare_build.sh -b all => MATCH Change-Id: Ic763378785e48b01eeedbb23b3a1f6b68339c357 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4396775 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* nds32: Support for system safe modeRob Barnes2023-03-151-0/+15
| | | | | | | | | | | | | | Add support for entering system safe mode on nds32 based EC. This is accomplished by returning from exception handler with iret. BUG=b:269606355 BRANCH=dedede TEST=Pass system safe mode tast test (with modified Kernel and AP). Change-Id: Iac87b5ebd55ce0224b277257e137dffb7d764263 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4334213 Reviewed-by: Keith Short <keithshort@chromium.org>
* Revert "panic: Publish EC_HOST_EVENT_PANIC on panic"Rob Barnes2023-02-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 98e00bb45940f1cf31216a20c7441364d43fd8fb. Reason for revert: On MKBP based boards, host_set_single_event will result in a mutex lock, which will fail when inside the panic ISR. See b/267681436. Original change's description: > panic: Publish EC_HOST_EVENT_PANIC on panic > > Publish EC_HOST_EVENT_PANIC when a panic occurs. > > The kernel may use this event to clean up before the system is reset > (e.g. sync the drive). > > This will be a no-op if the kernel doesn't handle it. > > BUG=b:258195448 > BRANCH=None > TEST=Observe event in kernel. Pass panic_event unit test. > > Change-Id: I34b9847778bf17dd113e81158bbbdf999ad2ca33 > Signed-off-by: Rob Barnes <robbarnes@google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4063818 > Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> > Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Bug: b:258195448 Change-Id: I772ef77ec7e4661f1c98658b94e73941ad74d4f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4225911 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Ricardo Quesada <ricardoq@chromium.org> Commit-Queue: Rob Barnes <robbarnes@google.com> Auto-Submit: Rob Barnes <robbarnes@google.com>
* core/cortex-m: Allow boards to override interrupt prioritiesJes B. Klinke2023-02-031-16/+15
| | | | | | | | | | | | | | | | | A lot of code in common/ and elsewhere use DECLARE_IRQ() to designate an interrupt handler, and set a priority. This CL makes it possible for board code to override the priorities set in common code via DECLARE_IRQ(), in case of special considerations. BUG=b:266832220 TEST=./util/compare_build.sh -b {discovery,munna} Change-Id: Ied7afe110301b578178159c51033be7fd86abc1f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4216265 Tested-by: Jes Klinke <jbk@chromium.org> Commit-Queue: Jes Klinke <jbk@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* core/cortex-m: Allow copying vector table into SRAMJes B. Klinke2023-02-031-0/+16
| | | | | | | | | | | | | | | | | | | | | | | The STM32F0 family (Cortex-M0) makes use of copying the vector table into SRAM, and the core/cortex-m0/ec.lds.S declares a data section for this purpose, put as the very first SRAM address in order to satisfy alignmen requirements. For other Cortex-M0 chips besides the STM32F0, the linker section exists, but is empty as no data is declared to go into it. (Any particular board could decide to declare space, copy the vector table, and modify the VTOR register, if they wanted, though.) This CL copies the linker section declaration from cortex-m0/ into cortex-m/, such that boards using other kinds of Cortex-M can also optionally copy their vector table into SRAM. BUG=b:266832220 TEST=./util/compare_build.sh -b {discovery,munna} Change-Id: I6222f360f52ec4928327860fd1bf78860dfba120 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4216264 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Jes Klinke <jbk@chromium.org> Tested-by: Jes Klinke <jbk@chromium.org>
* tree: Replace "unsigned" with "unsigned int"Andrea Grandi2023-01-049-15/+16
| | | | | | | | | | | | | | | | | Fix checkpatch error: > Prefer 'unsigned int' to bare use of 'unsigned' BUG=b:262047616 TEST=./util/compare_build.sh -b all -j 120 => MATCH BRANCH=none Change-Id: Ibf82332a1e1ea0a0a03d3993336e24883e495e05 Signed-off-by: Andrea Grandi <agrandi@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4126483 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* panic: Publish EC_HOST_EVENT_PANIC on panicRob Barnes2022-12-201-0/+3
| | | | | | | | | | | | | | | | | | | Publish EC_HOST_EVENT_PANIC when a panic occurs. The kernel may use this event to clean up before the system is reset (e.g. sync the drive). This will be a no-op if the kernel doesn't handle it. BUG=b:258195448 BRANCH=None TEST=Observe event in kernel. Pass panic_event unit test. Change-Id: I34b9847778bf17dd113e81158bbbdf999ad2ca33 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4063818 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* hooks: Add HOOK_BODY_DETECT_CHANGELeila Lin2022-12-136-0/+34
| | | | | | | | | | | | | | | | | | | Add HOOK_BODY_DETECT_CHANGE hook when CONFIG_BODY_DETECTION is enabled to notify body detection's state is changing. BRANCH=none BUG=b:232946420 TEST=zmake build winterhold and confirm that the notification of the hook has been received. Change-Id: Ied9afeef41ee14d7f2de1b423d94600d076bb975 Signed-off-by: Leila Lin <leilacy_lin@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4054308 Tested-by: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* core/cortex-m: Call constructors of global objectsTom Hughes2022-12-102-0/+10
| | | | | | | | | | | | | | | BRANCH=none BUG=b:261636413 TEST=./test/run_device_tests.py -b dartmonkey -t global_initialization => PASS Cq-Depend: chromium:4083816 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ia7e9069a6a030c81cb0697346baa9a08861e56cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4081571 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Bobby Casey <bobbycasey@google.com>
* system: Implement system safe modeRob Barnes2022-12-063-0/+74
| | | | | | | | | | | | | | | | | | | | | | Basic implementation of system safe mode recovery. System safe mode is a recovery mode that may be started after a fault/panic. It allows the AP to collect info about the fault and system state before the system resets This CL includes support for Zephyr EC and legacy CrOS EC BUG=b:249128225 BRANCH=None TEST=./twister -s external/platform/ec/zephyr/test/rw_safe_mode/rw_safe_mode.default Manually tested on skyrim Change-Id: I15139bb082011485b54e4ca7813839940bf5401a Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4029604 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* test: Sort header filesJeremy Bettis2022-11-301-0/+3
| | | | | | | | | | | | | | | | | | | | | Sort all includes in test with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Iae52f99a3a8b5623c1c92722c325ca92816fa856 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4052760 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* core: Sort header filesJeremy Bettis2022-11-2216-38/+44
| | | | | | | | | | | | | | | | | | | | | Sort all headers in core with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j$(nproc) buildall_only runtests TEST=zmake compare-builds Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ie1dafb879dca3fcb9254025da8a70b5cd169481d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4047095 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Al Semjonovs <asemjonovs@google.com> Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* cortex-m mpu: illegal shift fixstabilize-15245.B-mainBoris Mittelberg2022-11-152-2/+15
| | | | | | | | | | | | | | | | Shifting left by 32 is undefined behavior. An AND operation with mask of 0xffffffff is meaningless, so just avoid it. BUG=b:64477774 BRANCH=none TEST=none Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: Ibcb3359f453345caee01936c074a9c0ae5aff7dc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4021135 Tested-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* core/cortex-m0: Use EC's builtins over compiler-rtTom Hughes2022-11-152-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When examining code size, it appears that the builtins in compiler-rt (especially for division) are larger than the ones in the EC source code: armv7m-cros-eabi-readelf -s ./build/servo_v4p1/RW/ec.RW.elf | sort -k3 -n -r __udivsi3: 418 bytes __aeabi_uidiv: 418 bytes Compiling with clang before this change: RO: 15560 bytes in flash and 864 bytes in RAM still available on servo_v4p1 RW: 848 bytes in flash and 7144 bytes in RAM still available on servo_v4p1 After this change: RO: 16456 bytes in flash and 864 bytes in RAM still available on servo_v4p1 RW: 1232 bytes in flash and 7144 bytes in RAM still available on servo_v4p1 BRANCH=none BUG=b:256193799 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I21eab7fba10795e7821be79d141002a009d396a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4021114 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* ec: Fix stack smashingJeremy Bettis2022-11-071-0/+5
| | | | | | | | | | | | | | | | | | | | | Tests are printing a message after passing "Stack smashing detected" Fix this by refusing to print a stacktrace if sz - offset would be a negative number. BRANCH=None BUG=None TEST=Ran fan test LOW_COVERAGE_REASON=core/host is only test code Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I1587b7b1388132fc18c12957201cd20236ec8f41 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4005657 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* core/cortex-m: Add .init_array to .ro_dataTom Hughes2022-11-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to build a unit test that links against googletest, we get the following errors: ld.lld: error: section '.image.RO' will not fit in region 'FLASH': overflowed by 811597840 bytes ld.lld: error: section '.image.RO.key' will not fit in region 'FLASH': overflowed by 811597840 bytes ld.lld: error: section '.image.RO.key' will not fit in region 'FLASH': overflowed by 811598672 bytes ld.lld: error: section '.image.ROLLBACK' will not fit in region 'FLASH': overflowed by 811598672 bytes ld.lld: error: section '.image.ROLLBACK' will not fit in region 'FLASH': overflowed by 811598716 bytes Looking at the sections in the ELF file, we see that .init_array is being put at a really large address: armv7m-cros-eabi-objdump -h \ ./build/dartmonkey/fpsensor_hw/RW/fpsensor_hw.RW.elf Sections: Idx Name Size VMA LMA File off Algn 10 .init_array 0000000c 38800000 38800000 000b0000 2**2 CONTENTS, ALLOC, LOAD, DATA 11 .init_array.100 00000004 3880000c 3880000c 000b000c 2**2 .init_array consists of read-only data (const data array of self-relative pointers to functions), so it can go in the .ro_data section. See https://developer.arm.com/documentation/dui0475/c/the-arm-c-and-c---libraries/c---initialization--construction-and-destruction for details. BRANCH=none BUG=b:234181908, b:254530679 TEST=make BOARD=dartmonkey test-fpsensor_hw -j TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: If6566763452e3f5f87767b0f4999d6db8e6c1572 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3971946 Reviewed-by: Andrea Grandi <agrandi@google.com>
* tree: Allow building Minute-IA with clangTom Hughes2022-10-281-3/+11
| | | | | | | | | | | | | | BRANCH=none BUG=b:172020503, b:255967867 TEST=CC=clang make BOARD=arcada_ish -j TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I91f6f1e28646f7be821050cca870fa2a396c1e50 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3977109 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* core/cortex-m0: Move exception_panic to assemblyTom Hughes2022-10-214-42/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're jumping through a lot of hoops trying to get the compiler to do what we want with inline assembly. It's making the code hard to read and subject to not-well-defined behavior of the compiler. The pure assembly is unambiguous. Before this change: 080164c0 <exception_panic>: 80164c0: 4b08 ldr r3, [pc, #32] ; (80164e4 <exception_panic+0x24>) 80164c2: 4809 ldr r0, [pc, #36] ; (80164e8 <exception_panic+0x28>) 80164c4: 469c mov ip, r3 80164c6: f3ef 8109 mrs r1, PSP 80164ca: f3ef 8205 mrs r2, IPSR 80164ce: 466b mov r3, sp 80164d0: c0fe stmia r0!, {r1, r2, r3, r4, r5, r6, r7} 80164d2: 4641 mov r1, r8 80164d4: 464a mov r2, r9 80164d6: 4653 mov r3, sl 80164d8: 465c mov r4, fp 80164da: 4675 mov r5, lr 80164dc: c03e stmia r0!, {r1, r2, r3, r4, r5} 80164de: 46e5 mov sp, ip 80164e0: f7ff ffb4 bl 801644c <report_panic> 80164e4: 20003f70 .word 0x20003f70 80164e8: 20003f74 .word 0x20003f74 After this change: 08016334 <exception_panic>: 8016334: 4b08 ldr r3, [pc, #32] ; (8016358 <pstack>) 8016336: 4809 ldr r0, [pc, #36] ; (801635c <pregs>) 8016338: 469c mov ip, r3 801633a: f3ef 8109 mrs r1, PSP 801633e: f3ef 8205 mrs r2, IPSR 8016342: 466b mov r3, sp 8016344: c0fe stmia r0!, {r1, r2, r3, r4, r5, r6, r7} 8016346: 4641 mov r1, r8 8016348: 464a mov r2, r9 801634a: 4653 mov r3, sl 801634c: 465c mov r4, fp 801634e: 4675 mov r5, lr 8016350: c03e stmia r0!, {r1, r2, r3, r4, r5} 8016352: 46e5 mov sp, ip 8016354: f000 f890 bl 8016478 <report_panic> 08016358 <pstack>: 8016358: 20003f70 .word 0x20003f70 0801635c <pregs>: 801635c: 20003f74 .word 0x20003f74 BRANCH=none BUG=b:172020503 TEST=compare disassembly of exception_panic (see above) TEST=make BOARD=discovery-stm32f072 test-panic openocd -c "set BOARD discovery-stm32f072" \ -c "set BUILD_DIR build/discovery-stm32f072/panic" \ -f board/discovery-stm32f072/openocd-flash.cfg screen /dev/ttyUSB1 > runtest Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Id11c06a14475a81746fa355d0a07e82616574e10 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3299275 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* Add ability to get struct offsets for use in assemblyTom Hughes2022-10-211-0/+20
| | | | | | | | | | | | | | BRANCH=none BUG=b:172020503 TEST=Using https://crrev.com/c/3299275: make BOARD=discovery-stm32f072 -j manually inspect generated file: build/discovery-stm32f072/RW/core/cortex-m0/asm_offsets.h Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I6c5a982a88ed1e77f8e98b9a0a451d52d5c03a87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3299274 Reviewed-by: Diana Z <dzigterman@chromium.org>
* core/host/task.c: Fix typo in commentBobby Casey2022-10-141-1/+1
| | | | | | | | | | | | | BUG=none BRANCH=none TEST=none Signed-off-by: Bobby Casey <bobbycasey@google.com> Change-Id: Ia4e032b80ade37a8ad0dcfda1f4236ad6cdb2277 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3956159 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Andrea Grandi <agrandi@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* include/compiler.h: Add generic macro for disabling compiler warningsTom Hughes2022-10-132-19/+8
| | | | | | | | | | | | | | These macros are easier to read and use than the underlying pragmas. BRANCH=none BUG=b:172020503 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I2f67cbb3f83230b7e1a6a4512471bbd2bec0498f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3872552 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* tree: Remove CONFIG_SOFTWARE_PANICTom Hughes2022-10-1215-35/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's always enabled in the core/<core>/core_config.h files. The following script demonstrates that it's enabled in all boards: for board in `make print-boards`; do make print-configs board="${board}" | grep -q CONFIG_SOFTWARE_PANIC if [ $? -ne 0 ]; then echo "${board} failed" exit 1 fi done BRANCH=none BUG=none TEST=make buildall Cq-Depend: chromium:3943248 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: If683b244f17b48bedf3699f2b24e83b5ad6e849e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3933255 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* core/cortex-m: Disable C++ exceptionsTom Hughes2022-10-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | __exidx_start and __exidx_end indicate the start and end of the exception index table, which is described in more detail in "Exception Handling ABI for ARM Architecture": https://github.com/ARM-software/abi-aa/blob/60a8eb8c55e999d74dac5e368fc9d7e36e38dda4/ehabi32/ehabi32.rst#54the-object-producer-interface __exidx_start and __exidx_end are referenced in libunwind, so they need to be defined. If __exidx_start and __exidx_end are equal, libunwind will interpret the exception index table as empty, which means the exception can not be caught, and std::terminate() is called, which is what we want. The test in https://crrev.com/c/3932262 verifies this behavior. See https://github.com/llvm/llvm-project/blob/b3c5da73b71908c59b12ef0feadfde56bad222b5/libunwind/src/AddressSpace.hpp#L515-L522 BRANCH=none BUG=b:234181908 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I8551ca94fce16ec34770f9204282af14667e7c43 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3857943 Reviewed-by: Andrea Grandi <agrandi@google.com>
* core/host: Add implementation for host panicTom Hughes2022-10-071-0/+36
| | | | | | | | | | | | | | | | | | panic_set_reason() and panic_get_reason() are called from system_common_pre_init() if CONFIG_SOFTWARE_PANIC is enabled. A followup commit removes CONFIG_SOFTWARE_PANIC since all boards enable it, so we need stub implementations for the host in order to successfully compile. LOW_COVERAGE_REASON=legacy code BRANCH=none BUG=none TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I33322b593f707f3c8937f4a7cd2189841b197aa1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3935024 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* Revert "Makefile: Only set host toolchain if exists"Jeremy Bettis2022-09-201-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9935980b106f49cf524b07e83c6333cde3294cd3. Reason for revert: Found a less intrusive option. Original change's description: > Makefile: Only set host toolchain if exists > > To fix building outside of the chroot, only set the > CROSS_COMPILE_HOST_DEFAULT to x86_64-pc-linux-gnu- if the compiler > actually exists. > > BRANCH=None > BUG=b:246424843 > TEST=make test-coverage # in chroot > TEST=make test-coverage # in gitlab docker > TEST=emerge-corsola chromeos-ec > > Force-Relevant-Builds: all > Signed-off-by: Jeremy Bettis <jbettis@google.com> > Change-Id: Icc134eb987033012188a7c77860d8115c41b4df4 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3902029 > Tested-by: Jeremy Bettis <jbettis@chromium.org> > Commit-Queue: Jeremy Bettis <jbettis@chromium.org> > Auto-Submit: Jeremy Bettis <jbettis@chromium.org> > Reviewed-by: Yuval Peress <peress@google.com> > Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> > Code-Coverage: Aaron Massey <aaronmassey@google.com> Bug: b:246424843 CQ-Depend: chromium:3905359 Change-Id: I629f72e949165dbd62f8c5beca73ce0e6c317d10 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3905358 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* Makefile: Only set host toolchain if existsJeremy Bettis2022-09-191-1/+3
| | | | | | | | | | | | | | | | | | | | | | | To fix building outside of the chroot, only set the CROSS_COMPILE_HOST_DEFAULT to x86_64-pc-linux-gnu- if the compiler actually exists. BRANCH=None BUG=b:246424843 TEST=make test-coverage # in chroot TEST=make test-coverage # in gitlab docker TEST=emerge-corsola chromeos-ec Force-Relevant-Builds: all Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Icc134eb987033012188a7c77860d8115c41b4df4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3902029 Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Code-Coverage: Aaron Massey <aaronmassey@google.com>
* Makefile: Set prefixed toolchain for hostTom Hughes2022-09-161-0/+9
| | | | | | | | | | | | | | | | When building with portage, the build fails if we use the "unprefixed" compiler (e.g., "g++"). Explicitly use the prefixed compiler when building for the host. BRANCH=none BUG=b:246424843 TEST=emerge-hatch chromeos-ec Force-Relevant-Builds: all Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I50d2b437374bf6857b19151edb5eaea24a7330c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3894407 Reviewed-by: Eric Yilun Lin <yllin@google.com>
* Update license boilerplate text in source code filesMike Frysinger2022-09-12112-112/+112
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* core/cortex-m0: Remove noopTom Hughes2022-09-061-6/+0
| | | | | | | | | | | | | | | The pragma disables a warning and then immediately re-enables it, which has no effect. 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: I5e50a8886cf093a21c2f9385ce60fa950749f962 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3872551 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* tree-wide: const-ify argv for console commandsCaveh Jalali2022-09-017-13/+13
| | | | | | | | | | | | | | | | | | | | | | | This updates the API for console commands from "int cmd(int argc, char **argv)" to "int cmd(int argc, const char **argv)" which is more accurate and in line with common convention. BRANCH=none BUG=b:244387210 TEST="make buildall" passes TEST="zmake build -a" passes TEST="util/compare_build.sh -b all" passes TEST="./twister -v -T zephyr/test" passes Cq-Depend: chrome-internal:4960125 Cq-Depend: chrome-internal:4959932 Change-Id: I57de9f35b85b8f3c7119df36aefb2abf25d2625f Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3863941 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* util: remove unused includesYuval Peress2022-08-057-0/+9
| | | | | | | | | | | | | | | | 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>
* tree: Change non-standard "%pP" printf format to "%p"Tom Hughes2022-07-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This is the last non-standard format overloading "%p", so we can change it to the standard "%p" format. Using standard format specifiers makes it easier to switch between the "builtin" EC standard library and the C standard library provided by the toolchain (or Zephyr). BRANCH=none BUG=b:238433667, b:234181908 TEST=On icetower v0.1 with servo_micro and J-Trace attached: Before change: > rw 536870912 read 0x20000000 = 0x45dbfce2 After change: > rw 536870912 read 0x20000000 = 0x45dbfce2 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Id5680ab07af5352d463df42daadff1619c06c9af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3756180 Reviewed-by: Eric Yilun Lin <yllin@google.com>
* core: Add "end" to linker scriptsTom Hughes2022-07-185-0/+30
| | | | | | | | | | | | | | | _sbrk in newlib (embedded C standard library implementation) expects the "end" symbol to point to the start of free memory. BRANCH=none BUG=b:234181908 TEST=./util/compare_build.sh -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I9f206e2ed5f050d92b579e0b65b05be40f929093 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3766504 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* tree: Fix -Wstrict-prototypes warningTom Hughes2022-07-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | The latest clang complains about missing 'void' in function definition if it's specified in the declaration: core/cortex-m/vecttable.c:23:21: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] void default_handler() ^ void BRANCH=none BUG=b:230345382, b:172020503 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I5a3d95203cc6cbb59676f4a66876a4a6f2946e31 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3750108 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* core/minute-ia/interrupts.c: Format with clang-formatJack Rosenthal2022-07-071-12/+13
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: Iafd5b2ee41f980ee448ff63b68dad19a70563903 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749470 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* core/host/irq_handler.h: Format with clang-formatJack Rosenthal2022-07-011-13/+13
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I55e35249e1eaa05f25d704568aed7bec9d5f89aa Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729840 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* core/cortex-m/cpu.c: Format with clang-formatJack Rosenthal2022-07-011-1/+2
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I6a506bffda1dd6c0174b327fa6b612f3df20ad66 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729816 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* core/cortex-m0/atomic.h: Format with clang-formatJack Rosenthal2022-07-011-19/+19
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I6476e2382f5f8a74b1e30380b9003d94a33e722a Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729828 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* core/nds32/math.c: Format with clang-formatJack Rosenthal2022-07-011-8/+8
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: If7765817f6b011a170d3efa14c8953cf46dbee89 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729864 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>