diff options
Diffstat (limited to 'src/occ')
-rwxr-xr-x | src/occ/thread/chom.c | 34 | ||||
-rwxr-xr-x | src/occ/thread/chom.h | 20 |
2 files changed, 34 insertions, 20 deletions
diff --git a/src/occ/thread/chom.c b/src/occ/thread/chom.c index 8141569..9c8f85e 100755 --- a/src/occ/thread/chom.c +++ b/src/occ/thread/chom.c @@ -5,10 +5,10 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ -/* [+] Google Inc. */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] International Business Machines Corp. */ /* */ +/* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ @@ -63,13 +63,13 @@ const uint16_t * g_chom_sensor_table[CHOM_NUM_OF_SENSORS] = &g_amec_sys.sys.pwr250us.sample, // Socket power &g_amec_sys.proc[0].pwr250us.sample, + &G_dcom_slv_outbox_rx[1].pwr250usp0, &G_dcom_slv_outbox_rx[2].pwr250usp0, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, + &G_dcom_slv_outbox_rx[3].pwr250usp0, + &G_dcom_slv_outbox_rx[4].pwr250usp0, + &G_dcom_slv_outbox_rx[5].pwr250usp0, + &G_dcom_slv_outbox_rx[6].pwr250usp0, + &G_dcom_slv_outbox_rx[7].pwr250usp0, // Memory power &G_dcom_slv_outbox_rx[0].pwr250usmemp0, &G_dcom_slv_outbox_rx[1].pwr250usmemp0, @@ -290,8 +290,22 @@ void chom_update_sensors() for (i = 0 ; i<CHOM_NUM_OF_SENSORS ; i++) { // update sample, min, max, average sensor data if (NULL != g_chom_sensor_table[i]) - { // directly mapping to mini-sensor - g_chom->sensorData[0].sensor[i].sample = *g_chom_sensor_table[i]; + { + //Report all sensors listed in g_chom_sensor_table, unless + //we have a Murano (DCM), then we only report the power from the + //OCC_DCM_MASTER occ. The DCM occ pairs (OCC_DCM_MASTER,OCC_DCM_SLAVE) are + //((0,1),(2,3),(4,5),(6,7)). + if( ((i >= CHOMPWRS0) && (i <= CHOMPWRS7)) && + (CFAM_CHIP_TYPE_MURANO == cfam_chip_type()) && + (((i-CHOMPWRS0) % 2) == 1) ) + { + //Do nothing + } + else + { + // directly mapping to mini-sensor + g_chom->sensorData[0].sensor[i].sample = *g_chom_sensor_table[i]; + } } l_sample = g_chom->sensorData[0].sensor[i].sample; diff --git a/src/occ/thread/chom.h b/src/occ/thread/chom.h index a324209..b899e9e 100755 --- a/src/occ/thread/chom.h +++ b/src/occ/thread/chom.h @@ -5,10 +5,10 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ -/* [+] Google Inc. */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] International Business Machines Corp. */ /* */ +/* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ /* You may obtain a copy of the License at */ @@ -40,14 +40,14 @@ enum // Node total power (DC) CHOMPWR = 0, // Socket power - CHOMPWRP0, - CHOMPWRP1, - CHOMPWRP2, - CHOMPWRP3, - CHOMPWRP4, - CHOMPWRP5, - CHOMPWRP6, - CHOMPWRP7, + CHOMPWRS0, + CHOMPWRS1, + CHOMPWRS2, + CHOMPWRS3, + CHOMPWRS4, + CHOMPWRS5, + CHOMPWRS6, + CHOMPWRS7, // Memory power CHOMPWRM0, CHOMPWRM1, |