summaryrefslogtreecommitdiffstats
path: root/src/usr/vpd
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2013-11-12 15:33:35 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-12-12 16:15:53 -0600
commit07c9716fcf31ce5352ce412a643071ea89bd2ca1 (patch)
treecab98e95ad2fa2a34bd122e21d5ba49c49675c56 /src/usr/vpd
parent1fe455d3400fd80d99176ad7f60a630ac7ce1b76 (diff)
downloadtalos-hostboot-07c9716fcf31ce5352ce412a643071ea89bd2ca1.tar.gz
talos-hostboot-07c9716fcf31ce5352ce412a643071ea89bd2ca1.zip
Handle Multiple TOCs and removed side code
Also added Hostboot Base image version header Change-Id: I0fc878a48b9449e5d4875fd14525faefe01b1ace RTC: 34764 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7276 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/vpd')
-rw-r--r--src/usr/vpd/ipvpd.C8
-rw-r--r--src/usr/vpd/rtvpd_load.C1
-rwxr-xr-xsrc/usr/vpd/spd.C16
-rw-r--r--src/usr/vpd/vpd.C3
-rw-r--r--src/usr/vpd/vpd.H15
5 files changed, 18 insertions, 25 deletions
diff --git a/src/usr/vpd/ipvpd.C b/src/usr/vpd/ipvpd.C
index 23321631b..384ff46c2 100644
--- a/src/usr/vpd/ipvpd.C
+++ b/src/usr/vpd/ipvpd.C
@@ -533,12 +533,11 @@ errlHndl_t IpVpdFacade::fetchData ( uint64_t i_byteAddr,
do
{
- // Call a function in the common VPD code
+ // Call a function in the common VPD code
VPD::pnorInformation info;
info.segmentSize = iv_vpdSectionSize;
info.maxSegments = iv_vpdMaxSections;
info.pnorSection = iv_pnorSection;
- info.pnorSide = PNOR::CURRENT_SIDE;
err = VPD::readPNOR( i_byteAddr,
i_numBytes,
o_data,
@@ -816,7 +815,6 @@ errlHndl_t IpVpdFacade::writeKeyword ( const char * i_keywordName,
info.segmentSize = iv_vpdSectionSize;
info.maxSegments = iv_vpdMaxSections;
info.pnorSection = iv_pnorSection;
- info.pnorSide = PNOR::CURRENT_SIDE;
err = VPD::writePNOR( i_offset+byteAddr,
keywordSize,
i_buffer,
@@ -839,8 +837,8 @@ errlHndl_t IpVpdFacade::writeKeyword ( const char * i_keywordName,
// Finally, send it down to the FSP
msgdata.rec_num = i_target->getAttr<TARGETING::ATTR_VPD_REC_NUM>();
- memcpy( msgdata.record, i_recordName, RECORD_BYTE_SIZE );
- memcpy( msgdata.keyword, i_keywordName, KEYWORD_BYTE_SIZE );
+ memcpy( msgdata.record, i_recordName, RECORD_BYTE_SIZE );
+ memcpy( msgdata.keyword, i_keywordName, KEYWORD_BYTE_SIZE );
err = VPD::sendMboxWriteMsg( keywordSize,
i_buffer,
i_target,
diff --git a/src/usr/vpd/rtvpd_load.C b/src/usr/vpd/rtvpd_load.C
index cb393e996..77152da9f 100644
--- a/src/usr/vpd/rtvpd_load.C
+++ b/src/usr/vpd/rtvpd_load.C
@@ -50,7 +50,6 @@ errlHndl_t bld_vpd_image(PNOR::SectionId vpd_type,
errlHndl_t err = NULL;
PNOR::SectionInfo_t info;
err = PNOR::getSectionInfo( vpd_type,
- PNOR::CURRENT_SIDE,
info );
if(!err)
diff --git a/src/usr/vpd/spd.C b/src/usr/vpd/spd.C
index 14c139dec..172feadbc 100755
--- a/src/usr/vpd/spd.C
+++ b/src/usr/vpd/spd.C
@@ -116,7 +116,7 @@ errlHndl_t getMemType ( uint8_t & o_memType,
* @param[out] o_modType - The module type value to return.
*
* @param[in] i_target - The target to read data from.
- *
+ *
* @param[in] i_memType - The memory type
*
* @return errlHndl_t - NULL if successful, otherwise a pointer
@@ -270,7 +270,7 @@ errlHndl_t spdWriteKeywordValue ( DeviceFW::OperationType i_opType,
break;
}
- // Check the Basic Memory Type
+ // Check the Basic Memory Type
if(( SPD_DDR3 == memType ) || ( SPD_DDR4 == memType ))
{
err = spdWriteValue( keyword,
@@ -338,7 +338,6 @@ errlHndl_t spdFetchData ( uint64_t i_byteAddr,
info.segmentSize = DIMM_SPD_SECTION_SIZE;
info.maxSegments = DIMM_SPD_MAX_SECTIONS;
info.pnorSection = PNOR::DIMM_JEDEC_VPD;
- info.pnorSide = PNOR::CURRENT_SIDE;
err = VPD::readPNOR( i_byteAddr,
i_numBytes,
o_data,
@@ -394,7 +393,6 @@ errlHndl_t spdWriteData ( uint64_t i_offset,
info.segmentSize = DIMM_SPD_SECTION_SIZE;
info.maxSegments = DIMM_SPD_MAX_SECTIONS;
info.pnorSection = PNOR::DIMM_JEDEC_VPD;
- info.pnorSide = PNOR::CURRENT_SIDE;
err = VPD::writePNOR( i_offset,
i_numBytes,
i_data,
@@ -660,7 +658,7 @@ errlHndl_t spdWriteValue ( uint64_t i_keyword,
break;
}
- // We are not handling writes that are not on a byte
+ // We are not handling writes that are not on a byte
// boundary until we absolutely need to. There are
// no writable keywords that are not on byte boundaries
if( entry->bitMask )
@@ -708,7 +706,7 @@ errlHndl_t spdWriteValue ( uint64_t i_keyword,
VPD::VpdWriteMsg_t msgdata;
msgdata.rec_num = i_target->getAttr<TARGETING::ATTR_VPD_REC_NUM>();
//XXXX=offset relative to whole section
- memcpy( msgdata.record, "XXXX", sizeof(msgdata.record) );
+ memcpy( msgdata.record, "XXXX", sizeof(msgdata.record) );
msgdata.offset = entry->offset;
err = VPD::sendMboxWriteMsg( io_buflen,
io_buffer,
@@ -821,7 +819,7 @@ errlHndl_t ddr3SpecialCases(const KeywordData & i_kwdData,
0x0 );
break;
};
-
+
TRACSSCOMP( g_trac_spd, EXIT_MRK"ddr3SpecialCases()" );
return err;
}
@@ -904,7 +902,7 @@ errlHndl_t ddr4SpecialCases(const KeywordData & i_kwdData,
// ==================================================
// 4 byte - LSB first, no mask
case CAS_LATENCIES_SUPPORTED_DDR4:
- // Get 4th byte
+ // Get 4th byte
err = spdFetchData( i_kwdData.offset,
1, /* Read 1 byte at a time */
&tmpBuffer[0],
@@ -1367,7 +1365,7 @@ errlHndl_t checkModSpecificKeyword ( KeywordData i_kwdData,
i_kwdData.modSpec ) );
break;
}
-
+
} while( 0 );
TRACSSCOMP( g_trac_spd,
diff --git a/src/usr/vpd/vpd.C b/src/usr/vpd/vpd.C
index 78314a400..bd33e3895 100644
--- a/src/usr/vpd/vpd.C
+++ b/src/usr/vpd/vpd.C
@@ -84,7 +84,6 @@ errlHndl_t getPnorAddr ( pnorInformation & i_pnorInfo,
{
// Get SPD PNOR section info from PNOR RP
err = PNOR::getSectionInfo( i_pnorInfo.pnorSection,
- i_pnorInfo.pnorSide,
info );
if( err )
@@ -306,7 +305,7 @@ errlHndl_t sendMboxWriteMsg ( size_t i_numBytes,
l_err->collectTrace("SPD",1024);
}
- // just commit the log and move on, nothing else to do
+ // just commit the log and move on, nothing else to do
errlCommit( l_err, VPD_COMP_ID );
l_err = NULL;
diff --git a/src/usr/vpd/vpd.H b/src/usr/vpd/vpd.H
index f35bf9eb9..41729bdf0 100644
--- a/src/usr/vpd/vpd.H
+++ b/src/usr/vpd/vpd.H
@@ -37,11 +37,10 @@ struct pnorInformation
uint64_t segmentSize;
uint64_t maxSegments;
PNOR::SectionId pnorSection;
- PNOR::SideSelect pnorSide;
};
/**
- * @brief VPD Message Types
+ * @brief VPD Message Types
*/
enum VPD_MSG_TYPE
{
@@ -53,13 +52,13 @@ enum VPD_MSG_TYPE
/**
* @brief Message definition for VPD Write Request
*
- * - data0 :
+ * - data0 :
* - [16] VPD Record Number
* - [32] 4-byte ASCII String for record name
* 'XXXX'=Entire VPD section from PNOR
* - [16] 2-byte ASCII String for keyword or offset into SPD
* 'XX'=Entire VPD record
- * - data1 :
+ * - data1 :
* - [64] Size of binary data in bytes
* - extra data : Binary VPD Data
*/
@@ -114,8 +113,8 @@ errlHndl_t getPnorAddr ( pnorInformation & i_pnorInfo,
*
* @param[in] i_target - The chip target to access the data for.
*
- * @param[in] i_pnorInfo - Information about the PNOR section and side that we
- * need to know to make the request.
+ * @param[in] i_pnorInfo - Information about the PNOR section that we need to
+ * know to make the request.
*
* @param[in/out] io_cachedAddr - The address offset to the data chunk in
* PNOR.
@@ -147,8 +146,8 @@ errlHndl_t readPNOR ( uint64_t i_byteAddr,
*
* @param[in] i_target - The chip target to access the data for.
*
- * @param[in] i_pnorInfo - Information about the PNOR section and side that we
- * need to know to make the request.
+ * @param[in] i_pnorInfo - Information about the PNOR section that we need to
+ * know to make the request.
*
* @param[in/out] io_cachedAddr - The address offset to the data chunk in
* PNOR.
OpenPOWER on IntegriCloud