summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/usr/devtree/bld_devtree.C9
-rw-r--r--src/usr/ipmi/ipmifruinv.C158
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml16
-rw-r--r--src/usr/targeting/common/xmltohb/target_types.xml6
4 files changed, 119 insertions, 70 deletions
diff --git a/src/usr/devtree/bld_devtree.C b/src/usr/devtree/bld_devtree.C
index f5fb09281..5c06a666d 100644
--- a/src/usr/devtree/bld_devtree.C
+++ b/src/usr/devtree/bld_devtree.C
@@ -1864,15 +1864,6 @@ errlHndl_t bld_fdt_bmc(devTree * i_dt, bool i_smallTree)
i_dt->addPropertyString(bmcNode, "name", bmcNodeName );
- //Pass Opal their device string
- // find CLASS_SYS (the top level target)
- TARGETING::Target* pSys;
- TARGETING::targetService().getTopLevelTarget(pSys);
- assert(pSys != NULL,
- "bld_fdt_bmc - Error: Could not find the top level target.");
- i_dt->addPropertyCell32(bmcNode, "firmware-fru-id",
- pSys->getAttr<TARGETING::ATTR_FRU_ID>());
-
/* create a node to hold the sensors */
errhdl = bld_fdt_sensors( i_dt, bmcNode, i_smallTree );
diff --git a/src/usr/ipmi/ipmifruinv.C b/src/usr/ipmi/ipmifruinv.C
index 99d4ee819..152c72e8b 100644
--- a/src/usr/ipmi/ipmifruinv.C
+++ b/src/usr/ipmi/ipmifruinv.C
@@ -738,6 +738,7 @@ errlHndl_t backplaneIpmiFruInv::buildBoardInfoArea(
io_data.push_back(0);
io_data.push_back(0);
+
//Set Vendor Name - ascii formatted data
l_errl = addVpdData(io_data, PVPD::OPFR, PVPD::VN, true);
if (l_errl) { break; }
@@ -773,6 +774,7 @@ errlHndl_t backplaneIpmiFruInv::buildBoardInfoArea(
TRACFCOMP(g_trac_ipmi,"backplaneIpmiFruInv::buildBoardInfoArea - "
"Error getting part number attribute");
}
+
// The attribute size is 18. The vpd is 16. Only use 16.
addCommonAttrData(io_data,
(uint8_t *)&l_pn,
@@ -780,16 +782,10 @@ errlHndl_t backplaneIpmiFruInv::buildBoardInfoArea(
//Push Fru File ID Byte - NULL
io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
-
- //Only set the ECID Data during an update scenario
- if (iv_isUpdate == true)
- {
- customEcidData (iv_extraTargets, io_data);
- }
-
//Indicate End of Custom Fields
io_data.push_back(IPMIFRUINV::END_OF_CUSTOM_FIELDS);
+
} while (0);
//Complete record data formatting
@@ -1065,48 +1061,75 @@ errlHndl_t membufIpmiFruInv::buildBoardInfoArea(
io_data.push_back(0);
io_data.push_back(0);
- //Set Vendor Name - ascii formatted data
- l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::VN, true);
- if (l_errl) { break; }
-
- //Set Product Name - ascii formatted data
- l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::DR, true);
- if (l_errl) { break; }
+ uint8_t l_fru_id = 0xFF;
+ // if the centaur_ecid_fru_id is not valid then the centaur is on a
+ // riser card, grab its vpd and populate the record
+ l_fru_id = iv_target->getAttr<TARGETING::ATTR_CENTAUR_ECID_FRU_ID>();
- //Set Product Serial number - ascii formatted data
- TARGETING::ATTR_SERIAL_NUMBER_type l_sn = {'0'};
- if( !( iv_target->
- tryGetAttr<TARGETING::ATTR_SERIAL_NUMBER>
- ( l_sn) ) )
+ if( l_fru_id == 0xFF )
{
- // Should not fail. Need to use tryGetAttr due to complex type.
- // Use zeros if fails.
- TRACFCOMP(g_trac_ipmi,"membufIpmiFruInv::buildBoardInfoArea - "
- "Error getting serial number attribute");
- }
- // The attribute size is 18. The vpd is 16. Only use 16.
- addCommonAttrData(io_data,
- (uint8_t *)&l_sn,
- VPD_SN_PN_VPD_SIZE);
+ //Set Vendor Name - ascii formatted data
+ l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::VN, true);
+ if (l_errl) { break; }
+
+ //Set Product Name - ascii formatted data
+ l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::DR, true);
+ if (l_errl) { break; }
+
+ //Set Product Serial number - ascii formatted data
+ TARGETING::ATTR_SERIAL_NUMBER_type l_sn = {'0'};
+ if( !( iv_target->
+ tryGetAttr<TARGETING::ATTR_SERIAL_NUMBER>
+ ( l_sn) ) )
+ {
+ // Should not fail. Need to use tryGetAttr due to complex type.
+ // Use zeros if fails.
+ TRACFCOMP(g_trac_ipmi,"membufIpmiFruInv::buildBoardInfoArea - "
+ "Error getting serial number attribute");
+ }
+ // The attribute size is 18. The vpd is 16. Only use 16.
+ addCommonAttrData(io_data,
+ (uint8_t *)&l_sn,
+ VPD_SN_PN_VPD_SIZE);
+
+ //Set Product Part number - ascii formatted data
+ TARGETING::ATTR_PART_NUMBER_type l_pn = {'0'};
+ if( !( iv_target->
+ tryGetAttr<TARGETING::ATTR_PART_NUMBER>
+ ( l_pn) ) )
+ {
+ // Should not fail. Need to use tryGetAttr due to complex type.
+ // Use zeros if fails.
+ TRACFCOMP(g_trac_ipmi,"membufIpmiFruInv::buildBoardInfoArea - "
+ "Error getting part number attribute");
+ }
+ // The attribute size is 18. The vpd is 16. Only use 16.
+ addCommonAttrData(io_data,
+ (uint8_t *)&l_pn,
+ VPD_SN_PN_VPD_SIZE);
+
+ //Push Fru File ID Byte - NULL
+ io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
- //Set Product Part number - ascii formatted data
- TARGETING::ATTR_PART_NUMBER_type l_pn = {'0'};
- if( !( iv_target->
- tryGetAttr<TARGETING::ATTR_PART_NUMBER>
- ( l_pn) ) )
- {
- // Should not fail. Need to use tryGetAttr due to complex type.
- // Use zeros if fails.
- TRACFCOMP(g_trac_ipmi,"membufIpmiFruInv::buildBoardInfoArea - "
- "Error getting part number attribute");
}
- // The attribute size is 18. The vpd is 16. Only use 16.
- addCommonAttrData(io_data,
- (uint8_t *)&l_pn,
- VPD_SN_PN_VPD_SIZE);
+ else
+ {
+ //Set Vendor Name - NULL
+ io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
- //Push Fru File ID Byte - NULL
- io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
+ //Set Product Name - NULL
+ io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
+
+ //Set Product Serial number - NULL
+ io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
+
+ //Set Product Part number - NULL
+ io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
+
+ //Push Fru File ID Byte - NULL
+ io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
+
+ }
//Only set the ECID Data during an update scenario
if (iv_isUpdate == true)
@@ -1125,41 +1148,41 @@ errlHndl_t membufIpmiFruInv::buildBoardInfoArea(
if (l_errl)
{
TRACFCOMP(g_trac_ipmi,"membufIpmiFruInv::buildBoardInfoArea - "
- "Errors collecting board info data");
+ "Errors collecting board info data");
}
return l_errl;
}
errlHndl_t membufIpmiFruInv::buildProductInfoArea(
- std::vector<uint8_t> &io_data)
+ std::vector<uint8_t> &io_data)
{
//This section not needed for the mem buf type
return IpmiFruInv::buildEmptyArea(io_data);
}
errlHndl_t membufIpmiFruInv::buildMultiRecordInfoArea(
- std::vector<uint8_t> &io_data)
+ std::vector<uint8_t> &io_data)
{
//This section not needed for the mem buf type
return IpmiFruInv::buildEmptyArea(io_data);
}
errlHndl_t membufIpmiFruInv::addVpdData(std::vector<uint8_t> &io_data,
- uint8_t i_record,
- uint8_t i_keyword,
- bool i_ascii,
- bool i_typeLengthByte)
+ uint8_t i_record,
+ uint8_t i_keyword,
+ bool i_ascii,
+ bool i_typeLengthByte)
{
errlHndl_t l_errl = NULL;
l_errl = addCommonVpdData(iv_target,
- io_data,
- DeviceFW::CVPD,
- i_record,
- i_keyword,
- i_ascii,
- i_typeLengthByte);
+ io_data,
+ DeviceFW::CVPD,
+ i_record,
+ i_keyword,
+ i_ascii,
+ i_typeLengthByte);
return l_errl;
}
//##############################################################################
@@ -1189,6 +1212,11 @@ void IpmiFruInv::customEcidData(TARGETING::TargetHandleList i_extraTargets,
l_setCustomData = true;
addEcidData(l_extraTarget, ecidInfo, io_data);
}
+ else
+ {
+ TRACFCOMP(g_trac_ipmi, "No ECID info for this huid 0x%x",
+ TARGETING::get_huid(l_extraTarget));
+ }
}
}
@@ -1550,6 +1578,22 @@ void IPMIFRUINV::gatherSetData(const TARGETING::Target* i_pSys,
TARGETING::TargetHandle_t pTarget = *pTarget_it;
uint32_t l_fruId = pTarget->getAttr<TARGETING::ATTR_FRU_ID>();
+ // check if this is a membuf target, if it is and the special
+ // attribute to say we want a separate fru entry for the centaur ecids
+ // is populated, then we will push that ecid to the potential frus
+ // list
+
+ if (TARGETING::TYPE_MEMBUF == pTarget->getAttr<TARGETING::ATTR_TYPE>())
+ {
+ uint8_t l_ecidFruId =
+ pTarget->getAttr<TARGETING::ATTR_CENTAUR_ECID_FRU_ID>();
+
+ // if the ecid fru id is valid use it, else use the regular fru id
+ l_fruId = ( l_ecidFruId == 0xFF ) ? l_fruId : l_ecidFruId;
+
+ TRACFCOMP(g_trac_ipmi,"l_fruId = 0x%x, l_ecidFruId = 0x%x", l_fruId, l_ecidFruId);
+ }
+
if (l_fruId)
{
//when updating data, ignore clearing data
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index 7541a08cd..56d1dedda 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -11745,7 +11745,8 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript
<attribute>
<id>FRU_ID</id>
- <description>FRU ID attribute for chip class</description>
+ <description>FRU ID attribute used to report FRU information to the BMC
+ for each fru in the system.</description>
<simpleType><uint32_t><default>0</default></uint32_t></simpleType>
<persistency>non-volatile</persistency>
<readable/>
@@ -11753,13 +11754,24 @@ firmware notes: Platforms should initialize this attribute to AUTO (0)</descript
<attribute>
<id>BMC_FRU_ID</id>
- <description>BMC FRU ID attribute for node class</description>
+ <description>BMC FRU ID attribute to report the system firmware levels
+ to the BMC.</description>
<simpleType><uint32_t><default>0</default></uint32_t></simpleType>
<persistency>non-volatile</persistency>
<readable/>
</attribute>
<attribute>
+ <id>CENTAUR_ECID_FRU_ID</id>
+ <description>FRU ID attribute for centaur ECID data. This fru ID is used to
+ report the ECID data to the BMC and make it available for systems which
+ have then centaur chips soldered to the backplane.</description>
+ <simpleType><uint32_t></uint32_t></simpleType>
+ <persistency>non-volatile</persistency>
+ <readable/>
+</attribute>
+
+<attribute>
<id>PLCK_IPL_ATTR_OVERRIDES_EXIST</id>
<description>
Set to 1 by HWSV to indicate that attribute overrides exist in a PLCK IPL
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index 3762e444b..f091d58dc 100644
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -1496,6 +1496,10 @@
<attribute><id>MSS_FREQ</id></attribute>
<attribute><id>MSS_LAB_OVERRIDE_FOR_MEM_PLL</id></attribute>
<attribute><id>ECID</id></attribute>
+ <attribute>
+ <id>CENTAUR_ECID_FRU_ID</id>
+ <default>0xFF</default>
+ </attribute>
<attribute><id>MRW_MEM_SENSOR_CACHE_ADDR_MAP</id></attribute>
<attribute>
<!-- Centaur memory buffer chips do not have SCOM accessible FSI GP regs -->
@@ -1546,9 +1550,7 @@
</attribute>
<attribute><id>CDM_DOMAIN</id><default>MEM</default></attribute>
<attribute><id>FRU_ID</id></attribute>
-
<attribute><id>MSS_VREF_CAL_CNTL</id></attribute>
-
</targetType>
<!-- Centaur L4 -->
OpenPOWER on IntegriCloud