summaryrefslogtreecommitdiffstats
path: root/src/usr/ipmi/ipmifruinvprvt.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/ipmi/ipmifruinvprvt.H')
-rw-r--r--src/usr/ipmi/ipmifruinvprvt.H112
1 files changed, 110 insertions, 2 deletions
diff --git a/src/usr/ipmi/ipmifruinvprvt.H b/src/usr/ipmi/ipmifruinvprvt.H
index 468a47f80..57d6e13cd 100644
--- a/src/usr/ipmi/ipmifruinvprvt.H
+++ b/src/usr/ipmi/ipmifruinvprvt.H
@@ -186,6 +186,32 @@ class IpmiFruInv
const TARGETING::ATTR_ECID_type& i_ecidInfo,
std::vector<uint8_t> &io_data);
+ /**
+ * @brief Adds Ecid attribute data from extra targets as custom data
+ * @param[in] TargetHandleList, Handle to list of extra
+ * targets associated with this FRU Record
+ * @param[in/out] data, The container to put ECID attribute data in
+ */
+ void customEcidData(TARGETING::TargetHandleList i_extraTargets,
+ std::vector<uint8_t> &io_data);
+
+ /**
+ * @brief Retrieve vpd record keyword and add to IPMI Fru Inventory record
+ * @param[in/out] data, The container with record data
+ * @param[in] access, Indicates vpd module to access (MVPD,PVPD,CPVD)
+ * @param[in] record, Indicates major offset in the VPD to get more data
+ * @param[in] keyword, Indicates minor offset in the VPD to get more data
+ * @param[in] ascii, Indicates if VPD field is in ascii format or not
+ */
+ errlHndl_t addCommonVpdData(
+ const TARGETING::TargetHandle_t& i_target,
+ std::vector<uint8_t> &io_data,
+ DeviceFW::AccessType i_accessType,
+ uint8_t i_record,
+ uint8_t i_keyword,
+ bool i_ascii,
+ bool i_typeLengthByte);
+
private:
/**
@@ -376,11 +402,13 @@ class procIpmiFruInv : public IpmiFruInv
* @param[in] record, Indicates major offset in the VPD to get more data
* @param[in] keyword, Indicates minor offset in the VPD to get more data
* @param[in] ascii, Indicates if VPD field is in ascii format or not
+ * @param[in] typeLengthBtye, Indicates whether type length to be added.
*/
errlHndl_t addVpdData(std::vector<uint8_t> &io_data,
uint8_t i_record,
uint8_t i_keyword,
- bool i_ascii=false);
+ bool i_ascii=false,
+ bool i_typeLengthByte=true);
};
@@ -453,13 +481,13 @@ class backplaneIpmiFruInv : public IpmiFruInv
* @param[in] record, Indicates major offset in the VPD to get more data
* @param[in] keyword, Indicates minor offset in the VPD to get more data
* @param[in] ascii, Indicates if VPD field is in ascii format or not
+ * @param[in] typeLengthBtye, Indicates whether type length to be added.
*/
errlHndl_t addVpdData(std::vector<uint8_t> &io_data,
uint8_t i_record,
uint8_t i_keyword,
bool i_ascii=false,
bool i_typeLengthByte=true);
-
};
//Child class for building up System Firwmare Fru Inventory Record Data
@@ -507,4 +535,84 @@ class systemFwIpmiFruInv : public IpmiFruInv
};
+//Child class for building up membuf Fru Inventory Record Data. For example,
+//for a memory riser card Fru.
+class membufIpmiFruInv : public IpmiFruInv
+{
+
+ public:
+
+ /**
+ * @brief Constructor
+ *
+ * @param[in] TargetHandle_t, Handle to target for which
+ * to get relevant IPMI FRU Data from
+ * @param[in] TargetHandleList, Handle to list of extra
+ * targets associated with this FRU Record
+ * @param[in] isUpdate, Indicator if the code is updating
+ * existing data, or setting base data.
+ */
+ membufIpmiFruInv( TARGETING::TargetHandle_t i_target,
+ TARGETING::TargetHandleList i_extraTargets,
+ bool i_isUpdate );
+
+ /**
+ * @brief Builds the Internal Use Area Data Section
+ * @param[in/out] data, The container to put internal use area data in
+ */
+ errlHndl_t buildInternalUseArea(std::vector<uint8_t> &io_data);
+
+ /**
+ * @brief Builds the Chassis Info Area Data Section
+ * @param[in/out] data, The container to put chassis info area data in
+ */
+ errlHndl_t buildChassisInfoArea(std::vector<uint8_t> &io_data);
+
+ /**
+ * @brief Builds the Board Info Area Data Section
+ * @param[in/out] data, The container to put board info area data in
+ */
+ errlHndl_t buildBoardInfoArea(std::vector<uint8_t> &io_data);
+
+ /**
+ * @brief Builds the Product Info Area Data Section
+ * @param[in/out] data, The container to put product info area data in
+ */
+ errlHndl_t buildProductInfoArea(std::vector<uint8_t>& io_data);
+
+ /**
+ * @brief Builds the MultiRecord Info Area Data Section
+ * @param[in/out] data, The container to put multirecord info area data in
+ */
+ errlHndl_t buildMultiRecordInfoArea(std::vector<uint8_t>& io_data);
+
+ protected:
+ //Indicator if a data update is happening.
+ //True - means we are solely updating certain data
+ //False - means we are doing the initial 'base' data set
+ bool iv_isUpdate;
+
+ //The list of Extra Targets if multiple targets are
+ //associated with one FRU_ID
+ TARGETING::TargetHandleList iv_extraTargets;
+
+ private:
+
+ /**
+ * @brief Adds the specified VPD data to the data to build up a given
+ * IPMI Fru Inventory record
+ * @param[in/out] data, The container with record data
+ * @param[in] record, Indicates major offset in the VPD to get more data
+ * @param[in] keyword, Indicates minor offset in the VPD to get more data
+ * @param[in] ascii, Indicates if VPD field is in ascii format or not
+ * @param[in] typeLengthBtye, Indicates whether type length to be added.
+ */
+ errlHndl_t addVpdData(std::vector<uint8_t> &io_data,
+ uint8_t i_record,
+ uint8_t i_keyword,
+ bool i_ascii=false,
+ bool i_typeLengthByte=true);
+
+};
+
#endif
OpenPOWER on IntegriCloud