diff options
author | Ayushee <ayushee.shah@intel.com> | 2019-05-28 09:34:36 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-30 16:57:52 -0700 |
commit | c718b87d8c8b7b65a292b54dfb9d3957b4552329 (patch) | |
tree | 4338abfb92ad85e3631be696164f41bd2a34c41c | |
parent | 4fcbc594e541adbdff4a61b1fd1306741d135169 (diff) | |
download | chrome-ec-c718b87d8c8b7b65a292b54dfb9d3957b4552329.tar.gz |
Intelrvp: Adding PECI ifdef in temp_sensor_id enum
When PECI is undefined, updating the memory map after initializing
the sensors causes an illegal temp_sensor_read and raises an out of
bound array index error. Hence, adding PECI ifdef to prevent accessing
out of bound index.
BUG=b:132061907
BRANCH=None
TEST=Able to boot iclrvpy_ite all the way to chrome os
Change-Id: I65dd0c3fd8419384e632d24ce137ebde2b9dc5ed
Signed-off-by: Ayushee <ayushee.shah@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/1631932
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Ayushee Shah <ayushee.shah@intel.corp-partner.google.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
-rw-r--r-- | baseboard/intelrvp/baseboard.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/baseboard/intelrvp/baseboard.h b/baseboard/intelrvp/baseboard.h index c8a083c4ed..5eaf4640de 100644 --- a/baseboard/intelrvp/baseboard.h +++ b/baseboard/intelrvp/baseboard.h @@ -187,7 +187,9 @@ enum temp_sensor_id { TEMP_SNS_AMBIENT, TEMP_SNS_BATTERY, TEMP_SNS_DDR, +#ifdef CONFIG_PECI TEMP_SNS_PECI, +#endif TEMP_SNS_SKIN, TEMP_SNS_VR, TEMP_SENSOR_COUNT, |