diff options
author | mbroyles <mbroyles@us.ibm.com> | 2017-08-23 16:53:05 -0500 |
---|---|---|
committer | Christopher J. Cain <cjcain@us.ibm.com> | 2017-08-29 15:43:35 -0400 |
commit | e1a597e9f5bc8e7b193058ca32a8c8ba46ebf519 (patch) | |
tree | bcc3ccd11631980666d8085397818abeef2f8d4a /src/occ_405/cmdh | |
parent | c34f286542bb7fa5eccc9bfcc2a9473637d4a0e5 (diff) | |
download | talos-occ-e1a597e9f5bc8e7b193058ca32a8c8ba46ebf519.tar.gz talos-occ-e1a597e9f5bc8e7b193058ca32a8c8ba46ebf519.zip |
Calculate GPU Power Cap
Define GPU ID callout type
Change-Id: I99e691abe64fc0d706571fc7a128d565159e0461
RTC: 133823
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45077
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>
Diffstat (limited to 'src/occ_405/cmdh')
-rwxr-xr-x | src/occ_405/cmdh/cmdh_fsp_cmds.c | 33 | ||||
-rwxr-xr-x | src/occ_405/cmdh/cmdh_fsp_cmds.h | 5 |
2 files changed, 20 insertions, 18 deletions
diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.c b/src/occ_405/cmdh/cmdh_fsp_cmds.c index c6802ee..6cdf79e 100755 --- a/src/occ_405/cmdh/cmdh_fsp_cmds.c +++ b/src/occ_405/cmdh/cmdh_fsp_cmds.c @@ -52,6 +52,7 @@ #include "sensor_main_memory.h" extern dimm_sensor_flags_t G_dimm_temp_expired_bitmap; extern bool G_vrm_thermal_monitoring; +extern uint32_t G_first_proc_gpu_config; #include <gpe_export.h> extern gpe_shared_data_t G_shared_gpe_data; @@ -223,7 +224,11 @@ ERRL_RC cmdh_poll_v20(cmdh_fsp_rsp_t * o_rsp_ptr) l_poll_rsp->errl_id, l_poll_rsp->errl_length, l_poll_rsp->errl_address); } - // Byte 15 - 16: reserved. + // Byte 15: reserved. + + // Byte 16: GPU Configuration + l_poll_rsp->gpu_presence = (uint8_t)G_first_proc_gpu_config; + // Byte 17 - 32 (16 bytes): OCC level memcpy( (void *) l_poll_rsp->occ_level, (void *) &G_occ_buildname[0], 16); @@ -1165,21 +1170,17 @@ void cmdh_dbug_get_apss_data (const cmdh_fsp_cmd_t * i_cmd_ptr, //Get the data for each channel individually and write it to for (i = 0; i < MAX_APSS_ADC_CHANNELS; i++) { - - if(AMECSENSOR_PTR(PWRAPSSCH0 + i)->ipmi_sid != 0) - { - l_resp_ptr->ApssCh[i].gain = G_sysConfigData.apss_cal[i].gain; - l_resp_ptr->ApssCh[i].offset = G_sysConfigData.apss_cal[i].offset; - l_resp_ptr->ApssCh[i].raw = G_dcom_slv_inbox_rx.adc[i]; - l_resp_ptr->ApssCh[i].calculated = AMECSENSOR_PTR(PWRAPSSCH0 + i)->sample; - l_resp_ptr->ApssCh[i].func = G_apss_ch_to_function[i]; - l_resp_ptr->ApssCh[i].ipmi_sid = AMECSENSOR_PTR(PWRAPSSCH0 + i)->ipmi_sid; - - TRAC_IMP("DBG__APSS Ch[%02d]: Raw[0x%04x], Offset[0x%08x], Gain[0x%08x],", - i, l_resp_ptr->ApssCh[i].raw, l_resp_ptr->ApssCh[i].offset, l_resp_ptr->ApssCh[i].gain); - TRAC_IMP(" Pwr[0x%04x], FuncID[0x%02x], IPMI_sensorID[0x%X]", - l_resp_ptr->ApssCh[i].calculated, l_resp_ptr->ApssCh[i].func, l_resp_ptr->ApssCh[i].ipmi_sid); - } + l_resp_ptr->ApssCh[i].gain = G_sysConfigData.apss_cal[i].gain; + l_resp_ptr->ApssCh[i].offset = G_sysConfigData.apss_cal[i].offset; + l_resp_ptr->ApssCh[i].raw = G_dcom_slv_inbox_rx.adc[i]; + l_resp_ptr->ApssCh[i].calculated = AMECSENSOR_PTR(PWRAPSSCH0 + i)->sample; + l_resp_ptr->ApssCh[i].func = G_apss_ch_to_function[i]; + l_resp_ptr->ApssCh[i].ipmi_sid = AMECSENSOR_PTR(PWRAPSSCH0 + i)->ipmi_sid; + + TRAC_IMP("DBG__APSS Ch[%02d]: Raw[0x%04x], Offset[0x%08x], Gain[0x%08x],", + i, l_resp_ptr->ApssCh[i].raw, l_resp_ptr->ApssCh[i].offset, l_resp_ptr->ApssCh[i].gain); + TRAC_IMP(" Pwr[0x%04x], FuncID[0x%02x], IPMI_sensorID[0x%X]", + l_resp_ptr->ApssCh[i].calculated, l_resp_ptr->ApssCh[i].func, l_resp_ptr->ApssCh[i].ipmi_sid); } }while(0); diff --git a/src/occ_405/cmdh/cmdh_fsp_cmds.h b/src/occ_405/cmdh/cmdh_fsp_cmds.h index 3bd0f73..2f3688f 100755 --- a/src/occ_405/cmdh/cmdh_fsp_cmds.h +++ b/src/occ_405/cmdh/cmdh_fsp_cmds.h @@ -157,9 +157,10 @@ typedef struct __attribute__ ((packed)) cmdh_poll_resp_v20 uint32_t errl_address; // BYTES 13 - 14: Error Log Length uint16_t errl_length; - // BYTES 15 - 16: Reserved + // BYTE 15: Reserved uint8_t _reserved_15; - uint8_t _reserved_16; + // BYTE 16: GPU Configuration + uint8_t gpu_presence; // BYTES 17 - 32 (16 bytes): OCC Code Level - ASCII string of OCC build level currently running. uint8_t occ_level[16]; // BYTES 33 - 38 (6 bytes): ASCII eye catcher "SENSOR" |