summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbroyles <mbroyles@us.ibm.com>2018-04-25 10:43:31 -0500
committerAndres A. Lugo-Reyes <aalugore@us.ibm.com>2018-04-25 17:26:08 -0400
commitcd30b100eee09956a27b69f7893349451400e5ba (patch)
treed1335565f8be293ed30225570bdaeb8268c700b0
parent943641092d82ba51ff9b0204d6c2ff1262bc17b3 (diff)
downloadtalos-occ-cd30b100eee09956a27b69f7893349451400e5ba.tar.gz
talos-occ-cd30b100eee09956a27b69f7893349451400e5ba.zip
Don't return APSS channel data for GPUs not present
Change-Id: I78720f77064b802d2ffed712dff224d5fc04eeb7 CQ: SW425525 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57814 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
-rwxr-xr-xsrc/occ_405/cmdh/cmdh_fsp_cmds.c32
-rwxr-xr-xsrc/occ_405/occbuildname.c2
2 files changed, 25 insertions, 9 deletions
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.c b/src/occ_405/cmdh/cmdh_fsp_cmds.c
index 70e4fcb..1cb97b5 100755
--- a/src/occ_405/cmdh/cmdh_fsp_cmds.c
+++ b/src/occ_405/cmdh/cmdh_fsp_cmds.c
@@ -54,6 +54,7 @@
extern dimm_sensor_flags_t G_dimm_temp_expired_bitmap;
extern uint32_t G_first_proc_gpu_config;
+extern uint32_t G_first_sys_gpu_config;
extern bool G_vrm_vdd_temp_expired;
extern bool G_reset_prep;
extern uint16_t G_amester_max_data_length;
@@ -515,14 +516,29 @@ ERRL_RC cmdh_poll_v20(cmdh_fsp_rsp_t * o_rsp_ptr)
(G_apss_ch_to_function[k] != ADC_GND_REMOTE_SENSE) &&
(G_apss_ch_to_function[k] != ADC_12V_STANDBY_CURRENT))
{
- l_pwrSensorList[l_sensorHeader.count].id = G_amec_sensor_list[PWRAPSSCH0 + k]->ipmi_sid;
- l_pwrSensorList[l_sensorHeader.count].function_id = G_apss_ch_to_function[k];
- l_pwrSensorList[l_sensorHeader.count].apss_channel = k;
- l_pwrSensorList[l_sensorHeader.count].reserved = 0;
- l_pwrSensorList[l_sensorHeader.count].current = G_amec_sensor_list[PWRAPSSCH0 + k]->sample;
- l_pwrSensorList[l_sensorHeader.count].accumul = G_amec_sensor_list[PWRAPSSCH0 + k]->accumulator;
- l_pwrSensorList[l_sensorHeader.count].update_tag = G_amec_sensor_list[PWRAPSSCH0 + k]->update_tag;
- l_sensorHeader.count++;
+ // only return channel power for GPU if the GPU is present
+ if( ( (G_apss_ch_to_function[k] != ADC_GPU_0_0) &&
+ (G_apss_ch_to_function[k] != ADC_GPU_0_1) &&
+ (G_apss_ch_to_function[k] != ADC_GPU_0_2) &&
+ (G_apss_ch_to_function[k] != ADC_GPU_1_0) &&
+ (G_apss_ch_to_function[k] != ADC_GPU_1_1) &&
+ (G_apss_ch_to_function[k] != ADC_GPU_1_2) ) ||
+ ( (G_apss_ch_to_function[k] == ADC_GPU_0_0) && (G_first_sys_gpu_config & 0x01) ) ||
+ ( (G_apss_ch_to_function[k] == ADC_GPU_0_1) && (G_first_sys_gpu_config & 0x02) ) ||
+ ( (G_apss_ch_to_function[k] == ADC_GPU_0_2) && (G_first_sys_gpu_config & 0x04) ) ||
+ ( (G_apss_ch_to_function[k] == ADC_GPU_1_0) && (G_first_sys_gpu_config & 0x08) ) ||
+ ( (G_apss_ch_to_function[k] == ADC_GPU_1_1) && (G_first_sys_gpu_config & 0x10) ) ||
+ ( (G_apss_ch_to_function[k] == ADC_GPU_1_2) && (G_first_sys_gpu_config & 0x20) ) )
+ {
+ l_pwrSensorList[l_sensorHeader.count].id = G_amec_sensor_list[PWRAPSSCH0 + k]->ipmi_sid;
+ l_pwrSensorList[l_sensorHeader.count].function_id = G_apss_ch_to_function[k];
+ l_pwrSensorList[l_sensorHeader.count].apss_channel = k;
+ l_pwrSensorList[l_sensorHeader.count].reserved = 0;
+ l_pwrSensorList[l_sensorHeader.count].current = G_amec_sensor_list[PWRAPSSCH0 + k]->sample;
+ l_pwrSensorList[l_sensorHeader.count].accumul = G_amec_sensor_list[PWRAPSSCH0 + k]->accumulator;
+ l_pwrSensorList[l_sensorHeader.count].update_tag = G_amec_sensor_list[PWRAPSSCH0 + k]->update_tag;
+ l_sensorHeader.count++;
+ }
}
}
diff --git a/src/occ_405/occbuildname.c b/src/occ_405/occbuildname.c
index f99595b..d65d824 100755
--- a/src/occ_405/occbuildname.c
+++ b/src/occ_405/occbuildname.c
@@ -34,6 +34,6 @@ volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) =
#else
-volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_180424a\0" /*</BuildName>*/ ;
+volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_180425a\0" /*</BuildName>*/ ;
#endif
OpenPOWER on IntegriCloud