summaryrefslogtreecommitdiffstats
path: root/src/usr/vpd
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2017-02-01 22:12:50 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-02-07 06:49:47 -0500
commitf986133a26546254d64e65e30b00ae7f0d561ec9 (patch)
tree933d139a964447e0c9fcb9308d1799543dbb8f60 /src/usr/vpd
parent4bca31cf0a256e551802ae313b3b1aaf92c42376 (diff)
downloadtalos-hostboot-f986133a26546254d64e65e30b00ae7f0d561ec9.tar.gz
talos-hostboot-f986133a26546254d64e65e30b00ae7f0d561ec9.zip
Add mising pieces to read DVPD from HW
- Added support for MCS target to access EEPROM device - Added EEPROM_VPD_PRIMARY_INFO attribute for MCS target - Fixup caching of DVPD in PNOR Change-Id: I9fb2de82b16eb017517f5addf361c4a90b3edf30 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35767 Reviewed-by: Dean Sanner <dsanner@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> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/vpd')
-rw-r--r--src/usr/vpd/dvpd.C20
-rw-r--r--src/usr/vpd/pvpd.C3
-rwxr-xr-xsrc/usr/vpd/vpd.C14
3 files changed, 18 insertions, 19 deletions
diff --git a/src/usr/vpd/dvpd.C b/src/usr/vpd/dvpd.C
index 8e89df70f..4962d12ed 100644
--- a/src/usr/vpd/dvpd.C
+++ b/src/usr/vpd/dvpd.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2016 */
+/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -45,9 +45,6 @@
#include "vpd.H"
#include "pvpd.H"
#include <initservice/initserviceif.H>
-#ifdef CONFIG_PVPD_READ_FROM_PNOR
-#include "pvpd.H"
-#endif
// ----------------------------------------------
// Trace definitions
@@ -252,18 +249,9 @@ errlHndl_t directMemoryPresenceDetect(DeviceFW::OperationType i_opType,
dvpd_present = DVPD::dvpdPresent( i_target );
#if defined(CONFIG_MEMVPD_READ_FROM_HW) && defined(CONFIG_MEMVPD_READ_FROM_PNOR)
- if( dvpd_present )
- {
- // Check if the VPD data in the PNOR matches the SEEPROM
- l_errl = VPD::ensureCacheIsInSync( i_target );
- if( l_errl )
- {
- TRACFCOMP(g_trac_vpd,ERR_MRK "nodePresenceDetect>"
- " Error during ensureCacheIsInSync (DVPD)" );
- errlCommit( l_errl, FSI_COMP_ID );
- }
- }
- else
+ //skipping cache sync when dvpd is present as it will be taken care by node
+ //vpd
+ if( !dvpd_present )
{
TRACFCOMP(g_trac_vpd,
ERR_MRK "directMemoryPresenceDetect> failed presence detect");
diff --git a/src/usr/vpd/pvpd.C b/src/usr/vpd/pvpd.C
index 687f7fed3..c97837bf8 100644
--- a/src/usr/vpd/pvpd.C
+++ b/src/usr/vpd/pvpd.C
@@ -372,6 +372,9 @@ void PvpdFacade::getRecordLists(
#ifdef CONFIG_MEMVPD_READ_FROM_PNOR
o_altVpdRecords = Singleton<CvpdFacade>::instance().iv_vpdRecords;
o_altRecSize = Singleton<CvpdFacade>::instance().iv_recSize;
+#elif CONFIG_MEMVPD_READ_FROM_HW
+ o_altVpdRecords = Singleton<DvpdFacade>::instance().iv_vpdRecords;
+ o_altRecSize = Singleton<DvpdFacade>::instance().iv_recSize;
#else
o_altVpdRecords = NULL;
o_altRecSize = 0;
diff --git a/src/usr/vpd/vpd.C b/src/usr/vpd/vpd.C
index ebda849d4..d8c3ae5af 100755
--- a/src/usr/vpd/vpd.C
+++ b/src/usr/vpd/vpd.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2016 */
+/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -37,6 +37,7 @@
#include "pvpd.H"
#include "spd.H"
#include "ipvpd.H"
+#include "dvpd.H"
#include <map>
// ----------------------------------------------
@@ -579,6 +580,12 @@ errlHndl_t getPnAndSnRecordAndKeywords( TARGETING::Target * i_target,
io_keywordSN = PVPD::SN;
#endif
}
+ else if( i_type == TARGETING::TYPE_MCS )
+ {
+ io_record = DVPD::VINI;
+ io_keywordPN = DVPD::PN;
+ io_keywordSN = DVPD::SN;
+ }
else
{
TRACFCOMP(g_trac_vpd,ERR_MRK"VPD::getPnAndSnRecordAndKeywords() Unexpected target type, huid=0x%X",TARGETING::get_huid(i_target));
@@ -629,6 +636,7 @@ errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target )
{
l_ipvpd = &(Singleton<PvpdFacade>::instance());
}
+
do
{
// Get the correct Part and serial numbers
@@ -648,7 +656,7 @@ errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target )
bool l_matchPN = false;
if( ( l_type == TARGETING::TYPE_PROC ) ||
( l_type == TARGETING::TYPE_NODE ) ||
- ( l_type == TARGETING::TYPE_MEMBUF ) )
+ ( l_type == TARGETING::TYPE_MEMBUF ))
{
l_err = l_ipvpd->cmpPnorToSeeprom( i_target,
l_record,
@@ -705,7 +713,7 @@ errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target )
// Load the PNOR data from the SEEPROM
if( ( l_type == TARGETING::TYPE_PROC ) ||
( l_type == TARGETING::TYPE_NODE ) ||
- ( l_type == TARGETING::TYPE_MEMBUF ) )
+ ( l_type == TARGETING::TYPE_MEMBUF ))
{
l_err = l_ipvpd->loadPnor( i_target );
}
OpenPOWER on IntegriCloud