summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* printf: Fix hexdump and string 0 precisionCraig Hesling2019-07-181-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch addresses a few issues with the current formatter. The major points are as follows: 1. Cannot specify precision 0 (truncate all) for string or hexdump 2. Forced safe precision for malformed strings 3. No padding when using hexdump 4. Bad error EC_ERROR_INVAL in vsnprintf 5. Documentation errors For (1), no piece of code explicitly sets the precision to 0 in order to invoke the default behavior, which is currently no precision limit. You can check using the following grep line: grep -rI '%[\*0-9]\{0,20\}\.0\{1,20\}[a-zA-Z]' However, there are many cases where the precision is used to limit the character output (as it should be). grep -rI '%[\*0-9]\{0,20\}\.[\*0-9]\{1,20\}[a-zA-Z]' There are many more instances that use variable precision without checking if the precision is zero. One of which is the following: crrev.com/4a4e2c71a0f6aaa50e0728922f84a7d54c14380a/test/host_command_fuzz.c#116 https://clusterfuzz.com/testcase-detail/5699023975088128 Our current implementation will insert ERROR and stop processing, if a precision of zero is detected when using the hexdump flag. This results in a badly formatted console line or runtime string, when the intended behavior would be to simply read no bytes. In the aforementioned fuzzer case, outputting ERROR triggers a false positive. Our printf should handle explicit zero precision similar to stdlib's printf, which means truncating all the way to zero positions, if specified. For (2), our current implementation uses strlen to identify the length of the input string, regardless of the set precision. Since this is an embedded platform, we should use strnlen to impose safe limits, when a precision is specified. For (3), our implementation should support padding and adjusting of all formatter types, since that is a primary feature of a printf formatter. The remaining commented code highlights odd behavior that should be fixed at some point, but is not critical. BUG=chromium:974084 TEST=Checked for any format lines that rely on a set precision of 0 grep -rI '%[\*0-9]\{0,20\}\.[\*0-9]\{1,20\}[a-zA-Z]' TEST=make run-printf V=1 BRANCH=none Change-Id: I897c53cce20a701fcbe8fb9572eb878817525cc3 Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1659835 Reviewed-by: Randall Spangler <rspangler@chromium.org>
* pd_policy: Change DP AltMode event from host event to MKBP.Aseda Aboagye2019-07-172-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the EC could notify the AP that it had entered into DisplayPort Alternate mode by sending a MODE_CHANGE host event. However, there was no mechanism to disable that functionality if desired without effecting the other MODE_CHANGE events (i.e. - base attach/detach). By changing the DisplayPort Alternate mode entry to an MKBP event, we can have more granularity and only affect this single event. - This commit adds a new MKBP event, EC_MKBP_EVENT_DP_ALT_MODE_ENTERED. - The commit also changes the DP AltMode entry notification from sending a MODE_CHANGE host event to this new MKBP event. BUG=chromium:786721 BRANCH=None TEST=Build and flash nocturne, verify that system still wakes up on DisplayPort Alternate Mode entry. Change-Id: Ia5f294b26701c3c98c9b7f948fc693d26234c835 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685787 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* mkbp_event: Add CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT.Aseda Aboagye2019-07-171-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | MKBP was recently refactored to offer choice in the MKBP notification method. However, if a board is using a GPIO to notify the AP of a MKBP event, and the AP cannot wake from the GPIO, the MKBP event cannot wake the system up from suspend as is. This commit simply adds a new config option, CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT such that MKBP events can wake the system from suspend. Note that the board will have to add MKBP events to the host event sleep mask in coreboot. Typically on ARM devices, EC_INT_L is already a wake pin, but on Intel devices it is not; there's actually a different pin, PCH_WAKE_L which is set via sending a host event and wakes the system. BUG=b:136272898,chromium:786721 BRANCH=None TEST=Enable config option on nocturne, flash nocturne, suspend DUT, verify that MKBP events can wake the AP. Change-Id: If5026bfe3efacbc051f99a180e061c6fd679ce5a Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685786 Reviewed-by: Jett Rink <jettrink@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* common: add i2c tracing functionalityJack Rosenthal2019-07-171-0/+15
| | | | | | | | | | | | | | | | | | | crbug.com/982442 requests a way for developers to enable tracing of i2c commands when debugging. This adds a new debug feature, the i2ctrace command, which provides that. The command is guarded by CONFIG_I2C_DEBUG. BUG=chromium:982442 BRANCH=none TEST=enabled CONFIG_I2C_DEBUG on arcada_ish, made sure that command functioned as it says on the tin Change-Id: I9c762271237cbf131e5ef7c0f605c89af4f209fd Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1699347 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* common: remove CONFIG_SMBUS dead codeDenis Brockus2019-07-172-159/+16
| | | | | | | | | | | | | | | | | CONFIG_SMBUS is not used. Cleaning up the code by removing this. Added a comment to document the removal and why. This will give a way to find the code if we ever needed to bring it back BUG=chromium:982316 BRANCH=none TEST=make buildall Change-Id: I40703a95bc849538e1aee32f6f96beab811285bd Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704279 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* Add the functions to read and write EAR.Pai Peng2019-07-171-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | EAR (extended address register) is used to access addresses above 16MiB when 3-byte address mode is used. These two functions allow to write to and read from EAR to set up what addresses to access in 3-byte mode. For example, for a 64MiB EEPROM: EAR value Addresses to access 0 0x0000000 - 0x0FFFFFF 1 0x1000000 - 0x1FFFFFF 2 0x2000000 - 0x2FFFFFF 3 0x3000000 - 0x3FFFFFF BUG=b:132252340 BRANCH=none TEST=manual Testing: 1. Writing to EAR returns successfully. 2. Writing different values to EAR, verify that accessing EERPOM in 3-byte mode is to the correct address, e.g., when EAR=2, accessing 0x0FFFFFF is actually to 0x2FFFFFF. Change-Id: I2a8bde7fc4b9069afc80a81042fb47359bffa015 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1688150 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Pai Peng <paipeng@google.com> Commit-Queue: Pai Peng <paipeng@google.com>
* config: Add CONFIG_MKBP_EVENT_WAKEUP_MASKAseda Aboagye2019-07-171-1/+18
| | | | | | | | | | | | | | | | | | | This commit adds a new CONFIG_* option, CONFIG_MKBP_EVENT_WAKEUP_MASK. This allows a board to specify which MKBP events are allowed to wake the system when it is in suspend. BUG=b:136282898,chromium:786721 BRANCH=None TEST=With some other code, flash nocturne, suspend DUT, verify that only the MKBP events in the CONFIG_MKBP_EVENT_WAKEUP_MASK wake the system up. Change-Id: Ib4d04418aacab209d0e26703500df119924090b7 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685785 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Rename CONFIG_CHARGEN to CONFIG_CMD_CHARGENVadim Bendebury2019-07-041-3/+1
| | | | | | | | | | | | | | The updated name is more is better aligned with EC codebase use of CONFIG_ variables. BRANCH=none BUG=none TEST=make buildall -j Change-Id: I52a35e33debb2cab41c009dbb8938614a810baef Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1688134 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* rollback: Add rollback support for chips with varying flash bank sizesTom Hughes2019-07-031-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:124996507 TEST=In hatch_fp and nocturne_fp console with CONFIG_RWSIG_JUMP_TIMEOUT increased to large value and console_task stack size increased to 4096: > rollbackinfo rollback minimum version: 0 RW rollback version: 0 rollback 0: 00000000 00000000 0b112233 [00..00] * rollback 1: ffffffff ffffffff ffffffff [ff..ff] > rollbackupdate 1 > rollbackinfo rollback minimum version: 1 RW rollback version: 0 rollback 0: 00000000 00000000 0b112233 [00..00] rollback 1: 00000001 00000001 0b112233 [00..00] * > rollbackaddent 1234 > rollbackinfo rollback minimum version: 1 RW rollback version: 0 rollback 0: 00000002 00000001 0b112233 [e5..8c] * rollback 1: 00000001 00000001 0b112233 [00..00] TEST=test_that --board=nocturne <IP> firmware_Fingerprint.ObeysRollback firmware_Fingerprint.ObeysRollback [ PASSED ] firmware_Fingerprint.ObeysRollback/firmware_Fingerprint [ PASSED ] Change-Id: I90b524138ca1125e2c1b62936b9f6fbe00e957d4 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1681379 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* add chargen command to allow EC and AP to flood the consoleVadim Bendebury2019-07-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | The chargen command sends continuous stream of characters to the console (UART console in case of EC). The stream follows a pattern where the value of each next character is the value of the previous character + 1, while staying in the ASCII range of 0..9A..Za..Z This allows to create tests which validate console output by verifying that no characters in the received sequence were lost. BRANCH=none BUG=b:38448364 TEST=Enabled the command for bobba EC board, and verified that the chargen works on both EC and AP on an Octopus device Change-Id: I9701bb493b0454de4cb4baa4784ab645b33a415f Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1554198 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
* cleanup: Rename CONFIG_MKBP_WAKEUP_MASK for clarity.Aseda Aboagye2019-07-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | CONFIG_MKBP_WAKEUP_MASK is a bit confusing and is wrongly named. The comment stated that "With this option, we can define the MKBP wakeup events in this mask (as a white list) in board level, those evets allow to interrupt AP during S3.". However, these events are NOT MKBP events at all but are instead host events. This commit tries to clear things up by renaming CONFIG_MKBP_WAKEUP_MASK to CONFIG_MKBP_HOST_EVENT_WAKEUP_MASK to better show that these events are in fact host events. BUG=b:136282898 BRANCH=None TEST=`make -j buildall` Change-Id: I42beadec8217435fd30e679ccf52d784a8ef99a0 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685784 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Alexandru M Stan <amstan@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* USB PD: Refrain from resets if battery is lowDiana Z2019-07-022-1/+17
| | | | | | | | | | | | | | | | | | | | | | This change introduces a new clause to the SNK_DISCOVERY state to prevent reset timers from starting when a battery is reporting below a configured level, which indicates the point at which the battery is capable of withstanding the potential loss of Vbus. Once the battery has charged enough, a timer for soft reset will begin to trigger PD negotiation to start over if it hasn't been able to complete. BUG=b:128935567 BRANCH=octopus TEST=verified hard reset doesn't occur on grabbiter when system is locked and coming back from battery cutoff without enough battery, verified soft followed by hard resets after the battery had charged Change-Id: Ib885d2b55acacad7ef1375572b0e6d243e639bdf Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1565147 Reviewed-by: Jett Rink <jettrink@chromium.org>
* doc: add documentation for usb-c on platform/ecJett Rink2019-07-021-1/+9
| | | | | | | | | | | | | | | Add documentation for common configuration and touch points that need to be considered when implementing the USB-C stack on the platform/ec codebase. BRANCH=none BUG=chromium:974302 TEST=none Change-Id: I24aef187989c14688985d3cba48a6734ee519d23 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1648609 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* hatch/helios/kindred/kohaku: Enable EC-based display backlight controlPhilip Chen2019-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | | This patch allows EC to override display backlight control for hatch family. Also enable CONFIG_BACKLIGHT_LID so that EC can specifically turn off display backlight when the lid is closed. BUG=b:135511415 BRANCH=none TEST=On hatch rev1 board, turn off/on display backlight by 'ectool backlight 0' and 'ectool backlight 1' TEST='emerge-hatch chromeos-ec' Change-Id: I894ef2879fb584ccf84cd643cc4c0cd5fdcb8525 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1679047 Reviewed-by: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org>
* uart_buffering: add tx_buffer_full() APIVadim Bendebury2019-06-271-0/+5
| | | | | | | | | | | | | | | | | To aid in system level UART console performance testing a test function needs to know when the UART console buffer is full. This patch provides an API for that. BRANCH=none BUG=b:38448364 TEST=verified proper operation of the chargen CLI command which uses this API. Change-Id: I5fbc6cf4031a5077c91cd4bb85ab6f4dfb18821e Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1679710 Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* rma: extract getting RMA Dev ID into a separate methodAndrey Pronin2019-06-271-1/+11
| | | | | | | | | | | | | | | | This CL extracts get_rma_device_id() that can be used by rma_auth and other cr50 components. BRANCH=none BUG=b:136091350 TEST=Verify that RSU Device ID reported through vNVRAM that uses this new method mathes the same ID calculated from device ID in G2FA certificate. See CL:1677238 for the exact method. Change-Id: I08f58dbd8f838f1e595601ec4532792acda62428 Signed-off-by: Andrey Pronin <apronin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1677237 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* cleanup: Fix common spelling typos in commentsTom Hughes2019-06-272-5/+5
| | | | | | | | | | | | | | | | | | | | | | Used 'git grep' to fix the following misspelled words across the codebase: * woud * setion * cleand * independantly * dedup BRANCH=none BUG=none TEST=make buildall -j Change-Id: I95905c56221034cf3f9d286755d7e0c07f8c58b6 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1678246 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Sean Abraham <seanabraham@chromium.org>
* driver: add an option to emulate irq event in TCS3400Ting Shen2019-06-251-0/+8
| | | | | | | | | | | | | | | | | Krane does not reserve an interrupt pin for ALS, so we need another way to trigger the irq handler. Add a new config option CONFIG_ALS_TCS3400_EMULATED_IRQ_EVENT to support this use case. BUG=b:129419982 BRANCH=None TEST=verify that `accelread 3` outputs reasonable data on krane. Change-Id: I960df249d29c0ac21810057e25f14d4bac3e14f5 Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1621449 Reviewed-by: Nick Vaccaro <nvaccaro@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* config.h: Add missing CONFIG_WIRELESS_CHARGER_P9221_R7Yilun Lin2019-06-251-0/+3
| | | | | | | | | | | | | | TEST=none BUG=b:126162615 BRANCH=none Change-Id: I602a45df8b178eef4ddfe3ae0b642640a6313c72 Signed-off-by: Yilun Lin <yllin@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1673953 Commit-Queue: Yilun Lin <yllin@chromium.org> Tested-by: Yilun Lin <yllin@chromium.org> Auto-Submit: Yilun Lin <yllin@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* common: provide config option for 64-bit hwtimerJack Rosenthal2019-06-242-3/+44
| | | | | | | | | | | | | | | | | | | This adds a config option, CONFIG_HWTIMER_64BIT, which when enabled expects the chip implementation to define __hw_clock_source_read64 and __hw_clock_source_set64. This allows for support of native 64-bit hardware clock when available on hardware instead of a rollover interrupt style. BUG=chromium:976804 BRANCH=none TEST=made implementation of 64-bit hardware timer for ISH (child CL), and working great Change-Id: Idb2c3bb8f804e6c83a33901c953ddd5f1ae89784 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1668055 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* fpsensor: Add unit tests for fp_set_sensor_modeTom Hughes2019-06-241-1/+2
| | | | | | | | | | | BRANCH=nocturne BUG=b:124773209 TEST=make buildall -j Change-Id: I8337c708005c51435ce8a5ab5d536cccc604f850 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1670347 Reviewed-by: Nicolas Norvez <norvez@chromium.org>
* fpsensor: Refactor fp_command_modeTom Hughes2019-06-241-0/+9
| | | | | | | | | | | | | | | | | | | | This refactoring allows us to call fp_command_mode from the debug console commands and ensure that we're testing the same underlying code path that the host commands use. BRANCH=nocturne BUG=b:124773209 TEST="fpenroll" in hatch FP console "fpmatch" in hatch FP console "fpclear" in hatch FP console TEST=On nocturne: flash_fp_mcu ec.bin Enroll fingerprint via UI, lock/unlock, Remove fingerprint via UI Change-Id: I5e1e314c7f1d67dc663795cafe751545516e9f89 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1652285 Reviewed-by: Nicolas Norvez <norvez@chromium.org>
* common: pd_policy: Add notification for DP AltModeAseda Aboagye2019-06-242-1/+13
| | | | | | | | | | | | | | | | | | | | | This commit simply adds a notification that can be called when the device enters DisplayPort Alternate mode or a DP attention VDM is received. Calling the notification will send a MODE_CHANGE host event which may wake the AP. BUG=chromium:786721 BRANCH=firmware-nocturne-10984.B TEST=With other patches, flash nocturne; suspend DUT, plug in powered charge through hub, verify DUT wakes up. Change-Id: Iaa221e69060a7d1015f7c1e2f6f053e6810a674a Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1666366 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* kukui/usb_pd_policy: Don't support superspeed lanes.Yilun Lin2019-06-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Kukui doesn't have superspeed lanes, we should avoid using such pin assginments. Also, 1. update usb_mux on receiving DP config packet accordingly, and 2. fix usb_mux setting by removing usb_mux update when receiving DP attention packet. We should inform DP mux on at DP config, and DP mux off at DP safe mode. TEST=print choosed pin mode, and see it choose PIN_C rather than PIN_D. TEST=Plug hub JCA-374 and see the external display is functional. BUG=b:135079572 BRANCH=master Change-Id: Id1edfc5b1962dbef7e5ab79c512d8f2c568777e8 Signed-off-by: Yilun Lin <yllin@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660524 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Yilun Lin <yllin@chromium.org> Auto-Submit: Yilun Lin <yllin@chromium.org> Commit-Queue: Yilun Lin <yllin@chromium.org>
* topology: Add USB2 & USB3 connectivity info to tcpc_config_tDaisuke Nojiri2019-06-212-0/+17
| | | | | | | | | | | | | | | | | | | | | Intel SoC needs which USB2/3 ports are assigned to which Type-C ports. This patch adds USB2 and USB3 port numbers to tcpc_config_t so that EC_CMD_LOCATE_CHIP can return it to the host. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b/134614710 BRANCH=none TEST=TBD Change-Id: I10206dde4d71ac6e40a71c65333db4edd3c81e7a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1669880 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
* intel_x86: Use common code to get power signal's levelVijay Hiremath2019-06-201-0/+5
| | | | | | | | | | | | | | | Removed redundant code in intel_x86 and reusing the common code for getting power signal's level. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I9cd550a2326456189a087459aeb8e6c88a8cad8e Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1667647 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* minute-ia: load eip value from top of stackJack Rosenthal2019-06-191-0/+3
| | | | | | | | | | | | | | | | For interrupt vectors (as opposed to exception handlers), the eip value is on top of the stack (referentially the return address by C calling convention). Use separate code for WDT vector. BUG=b:129983997 BRANCH=none TEST='crash watchdog' showing correct EIP, CS values Change-Id: I7efb2c71aba63eefd89fc71af089bc14034b7d08 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663188 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* LICENSE: remove unnecessary (c) after CopyrightTom Hughes2019-06-19109-109/+109
| | | | | | | | | | | | | | | | Ran the following command: git grep -l 'Copyright (c)' | \ xargs sed -i 's/Copyright (c)/Copyright/g' BRANCH=none BUG=none TEST=make buildall -j Change-Id: I6cc4a0f7e8b30d5b5f97d53c031c299f3e164ca7 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1663262 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* ish: snowball linker cleanupDenis Brockus2019-06-181-2/+2
| | | | | | | | | | | | | | | | Change AON_ROM references to be AON_PERSISTENT, these are not readonly Use the linker to set a snowball structure in the right place so we do not have to maintain hardcoded addresses in the register file BUG=b:132690500 BRANCH=none TEST=make buildall -j and check map location of snowball to be correct Change-Id: I4983a078fbd067b9c7ec9f0c49f962a4cb1581b7 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1664593 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* krane: Enable BC12 detection with gpio controlled.Yilun Lin2019-06-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support CONFIG_BC12_DETECT_POWER_ROLE_TRIGGER. Krane's BC12 detection is controlled by GPIO_BC12_DET_EN by disconnecting USB-PHY, that is: - Assert GPIO_BC12_DET_EN, then USB-PHY is disconnected - Deassert GPIO_BC12_DET_EN, then USB-PHY is connected. The current usb_chg_task will make USB devices not be enumerated, since GPIO_BC12_DET_EN is deasserted only when VBUS attached and BC12 device identified. However, peripherals won't trigger BC12 detection so GPIO_BC12_DET_EN always asserted. To fix this problem, we trigger BC12 detection only when a port is attached and hook USB_PD_CONNECTED to toggle BC12 detection. We have to - Assert GPIO_BC12_DET_EN on SRC device plugged to recognize BC12 charger. - After BC12 device detected, we have to disable BC12 to connect USB-PHY back for enumerating USB devices. - Deassert GPIO_BC12_DET_EN on SNK device plugged to enumerate USB devices. TEST=Test with https://crrev.com/c/1408751/1, and see it is able to recognize Apple 2.4A charger and 5V2A DCP charger. TEST=Boot w/ USB hub plugged (w/ and w/o external BC1.2 charger on the hub) and see USB devices are enumerated. BUG=b:122866184 BRANCH=None Change-Id: I5b3362305361c0c950288fc83072e9bc79082c08 Signed-off-by: Yilun Lin <yllin@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1575050 Tested-by: Yilun Lin <yllin@chromium.org> Auto-Submit: Yilun Lin <yllin@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Yilun Lin <yllin@chromium.org>
* fpsensor: Change new files' year to 2019Yicheng Li2019-06-151-1/+1
| | | | | | | | | | | | | | Although the code is moved from files created in 2017, these are new files, so change the year to 2019. BRANCH=nocturne BUG=none TEST=make -j buildall Change-Id: I15015c7ad1a713437b04395fd09e6641019f5ff7 Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660092 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* include/util: enclose a arg of POWER_OF_TWO into parenthesesNamyoon Woo2019-06-151-1/+1
| | | | | | | | | | | | | It is something should be done. BUG=None BRANCH=None TEST=make buildall -j Change-Id: I7a96385cf82ff458446744ae92ffc8349a443098 Signed-off-by: Namyoon Woo <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660942 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* minute-ia: show EC task information during panicJack Rosenthal2019-06-141-0/+3
| | | | | | | | | | | | | | | | | In order to receive better debug info from panic reports, include the current task when the panic was encountered. BUG=b:134071217 BRANCH=none TEST=saw that task was "CONSOLE" when typing "crash divzero" from console Change-Id: I2fa9f931eea0274a762f812b6a7a8281cb8fcc5f Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1660018 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* fpsensor: Add unit test for derive_encryption_key().Yicheng Li2019-06-141-1/+1
| | | | | | | | | | | | | | | | | Mock rollback_get_secret() and use it to test derive_encryption_key(). BRANCH=nocturne BUG=chromium:927095 TEST=make -j buildall TEST=tested enrollment, matching and multifinger on nocturne DUT TEST=verified test key vectors by running boringSSL's HKDF (https://boringssl.googlesource.com/boringssl/+/c0b4c72b6d4c6f4828a373ec454bd646390017d4/crypto/hkdf/) locally Change-Id: Ie2f51e4f64788d938e43d0c5c18685d1cfdd001c Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1652495 Reviewed-by: Nicolas Norvez <norvez@chromium.org>
* ish: cleanup ISH specific CONFIG_ definitions and usageDenis Brockus2019-06-141-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed some unneeded definitions and made sure those needed were undefined in include/config.h Removed some of the #ifdef and used IS_ENABLED instead 2019-06-13 07:36:00 > idlestats 2019-06-13 07:36:05 Aontask exists: Yes 2019-06-13 07:36:05 Total time on: 367.111999s 2019-06-13 07:36:05 Idle sleep: 2019-06-13 07:36:05 D0i0: 2019-06-13 07:36:05 counts: 13716 2019-06-13 07:36:05 time: 108.238220s 2019-06-13 07:36:05 Deep sleep: 2019-06-13 07:36:05 D0i1: 2019-06-13 07:36:05 counts: 6798 2019-06-13 07:36:05 time: 17.980105s 2019-06-13 07:36:05 D0i2: 2019-06-13 07:36:05 counts: 5852 2019-06-13 07:36:05 time: 236.773953s 2019-06-13 07:36:05 D0i3: 2019-06-13 07:36:05 counts: 16 2019-06-13 07:36:05 time: 1.092285s 2019-06-13 07:36:05 Aontask status: 2019-06-13 07:36:05 last error: 0 2019-06-13 07:36:05 error counts: 0 BUG=b:131749055,b:132178013 BRANCH=none TEST=make buildall -j TEST=verified basic operation on arcada_ish Change-Id: Ib2d96f35b9f4f92208cd05dfdf2580bb27e5df90 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1656152 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* fpsensor: Move crypto-related code to fpsensor_crypto.cYicheng Li2019-06-131-0/+59
| | | | | | | | | | | | | | | | | | Move crypto-related code to common/fpsensor/fpsensor_state.c. This facilitates unittesting because we can control whether to link in crypto-related code, and also facilitates mocking the encryption engine. BRANCH=nocturne BUG=chromium:927095 TEST=ran unittests TEST=tested enrollment, matching and multifinger on DUT nocturne Change-Id: I5bffc1460cbe2c9e3d6294ea5fff41f14019f0eb Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1648922 Reviewed-by: Nicolas Norvez <norvez@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* minute-ia: move IRQ definitions to common filesJack Rosenthal2019-06-112-0/+18
| | | | | | | | | | | | | | | | | | | | By moving the __irq_data extern declaration into link_defs.h, the struct can be used in more than just interrupts.c. In addition, this provides a common struct definiton for IRQ definitions consisting of an IRQ number, the assigned routine, and a handler function, which is a fairly common way to store IRQ definitions. BUG=none BRANCH=none TEST=arcada ISH functions as normal Change-Id: Idbb5780ae965faeade74cfe319364f61dd933d9e Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1649375 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* core:RISC-V / chip:IT83202Dino Li2019-06-111-0/+9
| | | | | | | | | | | | | | | | The IT83202 is an embedded controller with RISC-V core. It supports maximum ram size to 256KB and internal flash to 1MB. BUG=none BRANCH=none TEST=EC boots and test console commands (eg: taskinfo, version, sysjump...) on it83202 EVB. Change-Id: I424c0d2878beb941c816363b5c7a3f57fda9fd13 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1588300 Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* TCPC: Make tcpc_config handle other bus typesDaisuke Nojiri2019-06-103-2/+12
| | | | | | | | | | | | | | | | | | | | | Currently, tcpc_config assumes TCPCs are on I2C bus. ITE's EC has an embedded TCPC. This patch adds bus_type field to struct tcpc_config_t so that a TCPC location on other type of bus can be specified. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=none BRANCH=none TEST=buildall Change-Id: Ieac733011700b351e6323f46070dcf46d9e1154b Reviewed-on: https://chromium-review.googlesource.com/1640305 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* minute-ia: ish software panicDenis Brockus2019-06-111-3/+8
| | | | | | | | | | | | | | | | | | | Adding functions for software panic to ISH. This includes panic_set_reason, panic_get_reason and software_panic. Added extra output when a software panic is detected. Had to touch nds32/panic.c in order to make panic_sw_reasons common. BUG=b:134502392 BRANCH=none TEST=Verified with crash assert, with CONFIG_DEBUG_ASSERT defined Change-Id: Iebfe62a7dcd59b4bbed82b450dfd44cc8eaed1da Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1648958 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* fpsensor: Add API to check FP sensor encryption status.Yicheng Li2019-06-072-0/+15
| | | | | | | | | | | | | | | | | | Add EC command for the host to query FP sensor encryption status. Currently it's just FP TPM seed has been set or not. Add unit test for this command. Also add ectool command for querying encryption status. BRANCH=nocturne BUG=chromium:952275 TEST=ran unittests TEST=tested enrollment, matching and multifinger on DUT nocturne. TEST=tested querying sensor encryption status using ectool. Change-Id: I07d1e471ead85a517105b38d1ddd793c3046ce8f Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1633272 Reviewed-by: Nicolas Norvez <norvez@chromium.org>
* common: Add EC_CMD_LOCATE_CHIPDaisuke Nojiri2019-06-062-15/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces EC_CMD_I2C_LOOKUP with EC_CMD_LOCATE_CHIP. This is a more generic command which locates a peripheral chip in i2c or other bus types. Additionally, it includes the following changes: - Change chip (device) type # of CBI_EEPROM (from 1 to 0). - Support TCPCs. localhost ~ # ectool locatechip 0 0 BUS: I2C; Port: 0; Address: 0x50 (7-bit format) localhost ~ # ectool locatechip 1 0 BUS: I2C; Port: 0; Address: 0x0b (7-bit format) localhost ~ # ectool locatechip 1 1 BUS: I2C; Port: 1; Address: 0x29 (7-bit format) localhost ~ # ectool locatechip 1 2 EC result 11 (OVERFLOW) Index too large localhost ~ # ectool locatechip 2 Usage: locatechip <type> <index> <type> is one of: 0: CBI_EEPROM 1: TCPCs <index> instance # of <type> Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=none BRANCH=none TEST=Verified ectool locatechip work on Nami. Change-Id: I1a773ced65b1c5ce3656f03eff04a6eadd4bc5ff Reviewed-on: https://chromium-review.googlesource.com/1614582 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* common: motion_sense: Spread timestamps in motion sense fifoYuval Peress2019-06-061-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes moves the specialized logic for timestamp spreading away from the accelgyro_lsm6dsm and into the main motion_sense loop. The motion_sense_fifo_add_data function was replaced by a stage equivalent, and a commit function was added. Similarly, internal static functions for motion_sense.c were renamed to use the stage terminology. The idea is: When a sensor is read, it might provide more than one measurement though the only known timestamp is the one that caused the interrupt. Staging this data allows us to use the same fifo queue space that the entries would consume eventually anyway without making the entries readable. Upon commit, the timestamp entries are spread if needed. Note that if tight timestamps are disabled, the commit becomes a simple tail move. BUG=chromium:966506 BRANCH=None TEST=Ran CTS on arcada. Change-Id: Ib7d0a75c9c56fc4e275aed794058a5eca58ff47f Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1637416 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* ish: max-retries mechanism for watchdog timerJack Rosenthal2019-06-061-0/+7
| | | | | | | | | | | | | | | | | | This adds a relevant config option, as well as implementation for a max-retries mechanism on the watchdog timer. Included is an implementation for ISH which counts persistent data storage and halts when the max-retries is exceeded. BUG=b:132059981 BRANCH=none TEST=observed system halt after 4 resets, then re-enable once we had a successful reset Change-Id: I7b443d9a20a474b294d494c5b6046a38eaf6ff12 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1609605 Reviewed-by: Jett Rink <jettrink@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
* chocodile_vpdmcu: Firmware refactoringSam Hurst2019-06-056-2668/+170
| | | | | | | | | | | | | | | | | Move code in header files into c source files. BUG=b:133341676 BRANCH=none TEST=manual Charge-Through was tested on an Atlas running a DRP USB-C/PD state machine with CTUnattached.SNK and CTAttached.SNK states. Change-Id: Ib1b51a778b937e02908f0bc8866bc91a39831163 Signed-off-by: Sam Hurst <shurst@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1626036 Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Sam Hurst <shurst@google.com> Tested-by: Sam Hurst <shurst@google.com>
* 8042: Only send back ACK in response to reset command(0xff)Furquan Shaikh2019-06-051-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8042 keyboard command reset (0xff) was returning ACK(0xfa) as well as BAT(0xaa). From [1], 0xaa seems to be represent OK. However, the spec does not expect OK to be sent in response to reset command. Coreboot libpayload 8042 driver was recently updated to send a reset command on initialization to make it work with certain payloads. Sending back 0xaa along with ACK seems to make the initialization fail because it is not expecting anything other than ACK. This change gets rid of the return value 0xaa that was being sent for reset command. [1] http://zet.aluzina.org/images/d/d4/8042.pdf BUG=b:134366527 BRANCH=None TEST=Verified that keyboard initialization no longer fails in depthcharge. Change-Id: I0ac917dc94aa381ab705474cd7bcf494fb8b10d6 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1641756 Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com> Reviewed-by: Duncan Laurie <dlaurie@google.com> Tested-by: Frank Wu <frank_wu@compal.corp-partner.google.com> Tested-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org>
* common: queue: Update chunk struct and get read/write logicYuval Peress2019-06-051-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | This change updates the queue_get_write_chunk and queue_get_read_chunk logic to return an updated queue_chunk. The new chunk uses a void * for the buffer and replaces length with count. This more tightly aligns to how the rest of the queue functions operate. Further, it adds the ability to offset the write chunk. This is important as it allows wrapping. For example: With a queue of 8 units, 1 byte each. Assume H=2, T=5. Previously, we were only able to ever get the 3 bytes at 5-7. Using the offset of 3 though, we can now also get the 2 byte write chunk 0-1. BUG=chromium:966506 BRANCH=None TEST=Added unit tests Change-Id: I40216c36aa0dc95ec4d15fc587d4b1f08a17ef73 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1637415 Reviewed-by: Enrico Granata <egranata@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* charge_manager: customize dedicated port propertiesTing Shen2019-06-052-3/+57
| | | | | | | | | | | | | | | | | | | Kukui's pogo charger breaks the basic assumption of a dedicated charger. Add board specific functions to customize them. Also add a check to make sure the value of DEDICATED_CHARGE_PORT is good. BUG=b:128386458 TEST=combine with CL:1535087, verify that `ectool usbpdpower 1` correctly reports its status. BRANCH=None Change-Id: I6c698ea6a6fb4ab765f87c6fea0b35d5a757295a Signed-off-by: Ting Shen <phoenixshen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1569090 Reviewed-by: Yilun Lin <yllin@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* printf: Add HIDE_EC_STDLIB and __stdlib_compat defines.Allen Webb2019-06-031-4/+9
| | | | | | | | | | | | | | | | | | Fuzzing targets are linked against libec.a so that they can invoke ec functionality while depending on outside libraries that need cstdlib. An issue was being hit with a libprotobuf-mutator fuzzer target because protobuf needed the stdlib version of vfnprintf. This change resolves the issue by keeping the EC version of vfnprinf within libec.a. BRANCH=none BUG=chromium:962947 TEST=make -j buildall Change-Id: Ie0c79199dfba58d5fb04d9f340967a73921d09c8 Signed-off-by: Allen Webb <allenwebb@google.com> Reviewed-on: https://chromium-review.googlesource.com/1637580 Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* common: board_[read/write]_serial weak reference cleanupDenis Brockus2019-06-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | board_read_serial and board_write_serial were prototyped as weak and this made all instances, that included that prototype, weak as well. In order to not lose information from the prototype, default and override functions, I changed to use the override weak marker symbols. These functions defaulted for specific configurations as different functionality and used an #ifdef tree to do this. I made these a single definition for each function and used IS_ENABLED instead of the #ifdef tree. I also added a definition for the case that the configuration would not have produced a function. BUG=none BRANCH=none TEST=make buildall -j Change-Id: Ie41c53f3a17d665358e46eefd3ded3066ee80a7d Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1631583 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>