Skip to content

Commit

Permalink
IPMI HDAT reenablement change and soft sensor additions
Browse files Browse the repository at this point in the history
Change-Id: I4932fffcdc705db6789f53c08f5f513a223a2489
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41737
Reviewed-by: VENKATESH SAINATH <venkatesh.sainath@in.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: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
nagendraIBM authored and dcrowell77 committed Jun 29, 2017
1 parent 8a37f9c commit 5017bca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 21 deletions.
32 changes: 12 additions & 20 deletions src/usr/hdat/hdatipmi.C
Expand Up @@ -42,10 +42,6 @@ extern trace_desc_t *g_trac_hdat;

uint32_t HdatIpmi::cv_actualCnt = 0;





/*******************************************************************************
* IPMI Constructor
* IPMI sensor data structure is pretty simple with only 2 internal data pointers.
Expand Down Expand Up @@ -91,30 +87,26 @@ HdatIpmi::HdatIpmi(errlHndl_t &o_errlHndl, const hdatMsAddr_t &i_msAddr):
l_targetService.begin(),
l_targetService.end(),
&l_presentTargExpr);


TARGETING::ATTR_IPMI_SENSORS_type sensors = {{0}};
for(; l_targFilter; ++l_targFilter)
{
#if 0
// Create a new array entry and push it to FRU/LED sensor vector
hdatIPMIFRUSensorMapEntry_t l_fruEntry;
uint8_t l_sensorType = 0;
uint8_t l_eventReadingType = 0;
l_fruEntry.SLCAIndex = (*l_targFilter)->getAttr<ATTR_SLCA_INDEX>();
l_fruEntry.IPMISensorID = getFaultSensorNumber(*l_targFilter);
l_errl = SensorBase::getSensorType(l_fruEntry.IPMISensorID,
l_sensorType, l_eventReadingType);
if(l_errl == NULL)
assert((*l_targFilter)->tryGetAttr<TARGETING::ATTR_IPMI_SENSORS>(sensors));
for(auto & l_sensor : sensors)
{
l_fruEntry.IPMISensorType = l_sensorType;
l_fruEntry.IPMISensorID = l_sensor[1];
l_fruEntry.IPMISensorType = (uint8_t)(l_sensor[0] >> 8);
// OPAL doesn't like sensor types of 0xFF, so filter them out.
if( l_fruEntry.IPMISensorType != 0xFF )
{
iv_ipmiFruEntry.push_back(l_fruEntry);
}
}
else
{
HDAT_ERR(" Error in getsensor type");
break;
}
iv_ipmiFruEntry.push_back(l_fruEntry);
#endif
}

iv_ipmiDataSize = sizeof(hdatHDIF_t)+
HDAT_IPMI_PADDING +
( sizeof(hdatHDIFDataHdr_t) * HDAT_IPMI_NUM_DATA_PTRS)+
Expand Down
4 changes: 3 additions & 1 deletion src/usr/hdat/hdatipmi.H
Expand Up @@ -62,7 +62,9 @@ enum hdatIPMIDataPtrs
{
HDAT_IPMI_FRU_SENSOR_MAPPING = 0,
HDAT_IPMI_LED_SENSOR_ID_MAPPING = 1,
HDAT_IPMI_DA_LAST = 2,
HDAT_IPMI_RESERVED1 = 2,
HDAT_IPMI_RESERVED2 = 3,
HDAT_IPMI_DA_LAST = 4,
};

struct hdatIPMIFRUSensorMapEntry_t
Expand Down

0 comments on commit 5017bca

Please sign in to comment.