diff options
| author | Sheldon Bailey <baileysh@us.ibm.com> | 2017-10-04 08:38:06 -0500 |
|---|---|---|
| committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-11-06 09:09:22 -0500 |
| commit | 276c45cf2da6e6e4a6b1fe1d4765dd222578b4ff (patch) | |
| tree | 0a9b17424119c334dcfacc906dffa38b5f3ba50f /src/usr/htmgt | |
| parent | 76f627c7830763f87ba26294112f8c910957ea00 (diff) | |
| download | blackbird-hostboot-276c45cf2da6e6e4a6b1fe1d4765dd222578b4ff.tar.gz blackbird-hostboot-276c45cf2da6e6e4a6b1fe1d4765dd222578b4ff.zip | |
HTMGT: Send VRM Vdd Thermal Thresholds to OCC part1 HB attributes
Change-Id: Ia8b657c2dc396997b3e4e0678cd5b0f33b22d3a9
RTC:180398
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/47144
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt')
| -rw-r--r-- | src/usr/htmgt/htmgt_cfgdata.C | 80 | ||||
| -rw-r--r-- | src/usr/htmgt/htmgt_cfgdata.H | 2 |
2 files changed, 59 insertions, 23 deletions
diff --git a/src/usr/htmgt/htmgt_cfgdata.C b/src/usr/htmgt/htmgt_cfgdata.C index 71dbc9dfe..995042f4f 100644 --- a/src/usr/htmgt/htmgt_cfgdata.C +++ b/src/usr/htmgt/htmgt_cfgdata.C @@ -246,7 +246,7 @@ enum occCfgDataVersion OCC_CFGDATA_FREQ_POINT_VERSION = 0x20, OCC_CFGDATA_APSS_VERSION = 0x20, OCC_CFGDATA_PCAP_CONFIG_VERSION = 0x20, - OCC_CFGDATA_SYS_CONFIG_VERSION = 0x20, + OCC_CFGDATA_SYS_CONFIG_VERSION = 0x21, OCC_CFGDATA_TCT_CONFIG_VERSION = 0x20, OCC_CFGDATA_AVSBUS_CONFIG_VERSION = 0X01, }; @@ -759,8 +759,9 @@ void getSystemConfigMessageData(const TargetHandle_t i_occ, uint8_t* o_data, uint64_t & o_size) { uint64_t index = 0; - uint16_t sensor = 0; - assert(o_data != nullptr); + uint32_t SensorID1 = 0; + uint32_t SensorID2 = 0; + assert(o_data != nullptr); o_data[index++] = OCC_CFGDATA_SYS_CONFIG; o_data[index++] = OCC_CFGDATA_SYS_CONFIG_VERSION; @@ -768,44 +769,42 @@ void getSystemConfigMessageData(const TargetHandle_t i_occ, uint8_t* o_data, //System Type o_data[index++] = G_opalMode; - //processor sensor ID + //processor Callout Sensor ID ConstTargetHandle_t proc = getParentChip(i_occ); - sensor = UTIL::getSensorNumber(proc, SENSOR_NAME_PROC_STATE); - memcpy(&o_data[index], &sensor, 4); + SensorID1 = UTIL::getSensorNumber(proc, SENSOR_NAME_PROC_STATE); + memcpy(&o_data[index], &SensorID1, 4); index += 4; //Next 12*4 bytes are for core sensors. //If a new processor with more cores comes along, //this command will have to change. TargetHandleList cores; - TargetHandleList::iterator coreIt; getChildChiplets(cores, proc, TYPE_CORE, false); - uint32_t tempSensor = 0; - uint32_t freqSensor = 0; for (uint64_t core=0; core<CFGDATA_CORES; core++) { - tempSensor = 0; - freqSensor = 0; + SensorID1 = 0; + SensorID2 = 0; if ( core < cores.size() ) { - tempSensor = UTIL::getSensorNumber(cores[core], + SensorID1 = UTIL::getSensorNumber(cores[core], //Temp Sensor SENSOR_NAME_CORE_TEMP); - freqSensor = UTIL::getSensorNumber(cores[core], + SensorID2 = UTIL::getSensorNumber(cores[core], //Freq Sensor SENSOR_NAME_CORE_FREQ); } //Core Temp Sensor ID - memcpy(&o_data[index], &tempSensor, 4); + memcpy(&o_data[index], &SensorID1, 4); index += 4; //Core Frequency Sensor ID - memcpy(&o_data[index], &freqSensor, 4); + memcpy(&o_data[index], &SensorID2, 4); index += 4; } + TargetHandle_t sys = nullptr; TargetHandleList nodes; targetService().getTopLevelTarget(sys); @@ -815,14 +814,24 @@ void getSystemConfigMessageData(const TargetHandle_t i_occ, uint8_t* o_data, TargetHandle_t node = nodes[0]; - //Backplane sensor ID - sensor = UTIL::getSensorNumber(node, SENSOR_NAME_BACKPLANE_FAULT); - memcpy(&o_data[index], &sensor, 4); + //Backplane Callout Sensor ID + SensorID1 = UTIL::getSensorNumber(node, SENSOR_NAME_BACKPLANE_FAULT); + memcpy(&o_data[index], &SensorID1, 4); + index += 4; + + //APSS Callout Sensor ID + SensorID1 = UTIL::getSensorNumber(node, SENSOR_NAME_APSS_FAULT); + memcpy(&o_data[index], &SensorID1, 4); + index += 4; + + //Format 21 - VRM VDD Callout Sensor ID + SensorID1 = UTIL::getSensorNumber(node, SENSOR_NAME_VRM_VDD_FAULT); + memcpy(&o_data[index], &SensorID1, 4); index += 4; - //APSS sensor ID - sensor = UTIL::getSensorNumber(sys, SENSOR_NAME_APSS_FAULT); - memcpy(&o_data[index], &sensor, 4); + //Format 21 - VRM VDD Temperature Sensor ID + SensorID1 = UTIL::getSensorNumber(node, SENSOR_NAME_VRM_VDD_TEMP); + memcpy(&o_data[index], &SensorID1, 4); index += 4; o_size = index; @@ -996,10 +1005,37 @@ void getThermalControlMessageData(uint8_t* o_data, o_data[index++] = l_timeout; l_numSets++; + // VRM Vdd + if(!l_sys->tryGetAttr<ATTR_OPEN_POWER_VRM_VDD_DVFS_TEMP_DEG_C>(l_DVFS_temp)) + l_DVFS_temp = OCC_NOT_DEFINED; + if (l_DVFS_temp == 0) + { + l_DVFS_temp = OCC_NOT_DEFINED; + } + if(!l_sys->tryGetAttr<ATTR_OPEN_POWER_VRM_VDD_ERROR_TEMP_DEG_C>(l_ERR_temp)) + l_ERR_temp = OCC_NOT_DEFINED; + if (l_ERR_temp == 0) + { + l_ERR_temp = OCC_NOT_DEFINED; + } + if(!l_sys->tryGetAttr<ATTR_OPEN_POWER_VRM_VDD_READ_TIMEOUT_SEC>(l_timeout)) + l_timeout = OCC_NOT_DEFINED; + if(l_timeout == 0) + { + l_timeout = OCC_NOT_DEFINED; + } + o_data[index++] = CFGDATA_FRU_TYPE_VRM_VDD; + o_data[index++] = l_DVFS_temp; //DVFS + o_data[index++] = l_ERR_temp; //ERROR + o_data[index++] = OCC_NOT_DEFINED; //PM_DVFS + o_data[index++] = OCC_NOT_DEFINED; //PM_ERROR + o_data[index++] = l_timeout; + l_numSets++; + + o_data[l_numSetsOffset] = l_numSets; o_size = index; - } diff --git a/src/usr/htmgt/htmgt_cfgdata.H b/src/usr/htmgt/htmgt_cfgdata.H index 24a311796..de950d44d 100644 --- a/src/usr/htmgt/htmgt_cfgdata.H +++ b/src/usr/htmgt/htmgt_cfgdata.H @@ -76,7 +76,7 @@ namespace HTMGT CFGDATA_FRU_TYPE_VRM = 0x03, CFGDATA_FRU_TYPE_GPU_CORE = 0x04, CFGDATA_FRU_TYPE_GPU_MEMORY = 0x05, - + CFGDATA_FRU_TYPE_VRM_VDD = 0x06, CFDATA_DVFS_NOT_DEFINED = 0xFF, }; |

