diff --git a/openpower/package/hostboot/hostboot-0004-targeting-support-for-backplane-VPD.patch b/openpower/package/hostboot/hostboot-0004-targeting-support-for-backplane-VPD.patch
deleted file mode 100644
index edd4941..0000000
--- a/openpower/package/hostboot/hostboot-0004-targeting-support-for-backplane-VPD.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From bc07c585c41d4c6119d8608af27ab7ad1acdaab8 Mon Sep 17 00:00:00 2001
-From: Mike Baiocchi <baiocchi@us.ibm.com>
-Date: Wed, 22 Apr 2015 10:31:08 -0500
-Subject: [PATCH] Add targeting support for backplane VPD
-
-Only the targeting support required by "Updated VPD_REC_NUM numbering"
-
-Change-Id: I24cda4d713806330a9f61d588006d63966f92550
-RTC: 118373
----
- src/usr/targeting/common/xmltohb/target_types.xml | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
-index 82ec014..759b73e 100644
---- a/src/usr/targeting/common/xmltohb/target_types.xml
-+++ b/src/usr/targeting/common/xmltohb/target_types.xml
-@@ -913,6 +913,8 @@
-     <attribute><id>FRU_ID</id></attribute>
-     <attribute><id>TPM_PRIMARY_INFO</id></attribute>
-     <attribute><id>TPM_BACKUP_INFO</id></attribute>
-+    <attribute><id>EEPROM_VPD_PRIMARY_INFO</id></attribute>
-+    <attribute><id>VPD_REC_NUM</id></attribute>
- </targetType>
- 
- <targetType>
--- 
-1.8.2.2
-
diff --git a/openpower/package/hostboot/hostboot-0010-add-support-backplane-vpd.patch b/openpower/package/hostboot/hostboot-0010-add-support-backplane-vpd.patch
new file mode 100644
index 0000000..e51afbf
--- /dev/null
+++ b/openpower/package/hostboot/hostboot-0010-add-support-backplane-vpd.patch
@@ -0,0 +1,2271 @@
+From 9597cf58b44fd0c16da9d3592e8fd586a4dbf04d Mon Sep 17 00:00:00 2001
+From: Bill Schwartz <whs@us.ibm.com>
+Date: Fri, 27 Feb 2015 15:41:10 -0600
+Subject: [PATCH] Add support for backplane VPD
+
+Replace the temporary use of mem buf to access planar vpd with new
+planar vpd interfaces.
+
+Change-Id: I24cda4d713806330a9f61d588006d63966f92550
+RTC: 118373
+Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16326
+Tested-by: Jenkins Server
+Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
+---
+ src/include/usr/devicefw/userif.H                  |  23 +
+ src/include/usr/vpd/cvpdenums.H                    |   1 -
+ src/include/usr/vpd/pvpdenums.H                    |  96 ++++
+ src/include/usr/vpd/vpd_if.H                       |   8 +
+ src/include/usr/vpd/vpdreasoncodes.H               |   4 +
+ src/usr/devtree/bld_devtree.C                      |  85 ++--
+ src/usr/hwas/hwasPlat.C                            |   6 +-
+ src/usr/hwas/hwasPlatCallout.C                     |   6 +-
+ src/usr/i2c/eepromdd.C                             |   5 +
+ src/usr/ipmi/ipmifruinv.C                          | 502 +++++++++++++--------
+ src/usr/ipmi/ipmifruinvprvt.H                      | 112 ++++-
+ src/usr/targeting/common/xmltohb/target_types.xml  |   2 +
+ .../targeting/common/xmltohb/target_types_hb.xml   |   5 +
+ src/usr/vpd/HBconfig                               |  27 ++
+ src/usr/vpd/cvpd.C                                 |  36 +-
+ src/usr/vpd/cvpd.H                                 |  22 +-
+ src/usr/vpd/ipvpd.C                                |  50 +-
+ src/usr/vpd/ipvpd.H                                |  22 +-
+ src/usr/vpd/pvpd.C                                 | 369 +++++++++++++++
+ src/usr/vpd/pvpd.H                                 | 149 ++++++
+ src/usr/vpd/vpd.C                                  |  17 +-
+ src/usr/vpd/vpd.H                                  |   1 +
+ src/usr/vpd/vpd.mk                                 |   5 +-
+ 23 files changed, 1307 insertions(+), 246 deletions(-)
+ create mode 100644 src/include/usr/vpd/pvpdenums.H
+ create mode 100644 src/usr/vpd/pvpd.C
+ create mode 100644 src/usr/vpd/pvpd.H
+
+diff --git a/src/include/usr/devicefw/userif.H b/src/include/usr/devicefw/userif.H
+index 6d041f2..eac5366 100644
+--- a/src/include/usr/devicefw/userif.H
++++ b/src/include/usr/devicefw/userif.H
+@@ -61,6 +61,7 @@ namespace DeviceFW
+         GPIO,
+         LPC,
+         IPMIBT,    // As opposed to other phy's
++        PVPD,
+ 
+         LAST_ACCESS_TYPE,
+     };
+@@ -166,6 +167,28 @@ namespace DeviceFW
+             static_cast<uint64_t>(( i_location ))
+ 
+     /**
++     * Construct the device addressing parameters for the PVPD device ops.
++     * @param[in] i_record - The enumeration of the PVPD record to access.
++     * @param[in] i_keyword - The enumeration of the PVPD keyword, located
++     *      within the i_record Record to access.
++     */
++    #define DEVICE_PVPD_ADDRESS( i_record, i_keyword )\
++        DEVICE_PVPD_FORCE_ADDRESS( i_record, i_keyword, VPD::AUTOSELECT )
++
++    /**
++     * Construct the device addressing parameters for the PVPD device ops.
++     * @param[in] i_record - The enumeration of the PVPD record to access.
++     * @param[in] i_keyword - The enumeration of the PVPD keyword, located
++     *      within the i_record Record to access.
++     * @param[in] i_location - The location of the data (PNOR/SEEPROM)
++            see vpd_if.H
++     */
++    #define DEVICE_PVPD_FORCE_ADDRESS( i_record, i_keyword, i_location )\
++        DeviceFW::PVPD, static_cast<uint64_t>(( i_record )),\
++            static_cast<uint64_t>(( i_keyword )),\
++            static_cast<uint64_t>(( i_location ))
++
++    /**
+      * Construct the device addressing parameters for the SCAN device ops.
+      * @param[in] i_ring - The ring address to scan
+      * @param[in] i_ringlen - The length of the ring to scan in bits
+diff --git a/src/include/usr/vpd/cvpdenums.H b/src/include/usr/vpd/cvpdenums.H
+index 4b5adb2..79b8109 100644
+--- a/src/include/usr/vpd/cvpdenums.H
++++ b/src/include/usr/vpd/cvpdenums.H
+@@ -45,7 +45,6 @@ namespace CVPD
+         OPFR        = 0x05,
+         VNDR        = 0x06,
+         SPDX        = 0x07,
+-        OSYS        = 0x08,
+         // Last Record
+         CVPD_LAST_RECORD,
+         CVPD_TEST_RECORD,   // Test purposes ONLY!
+diff --git a/src/include/usr/vpd/pvpdenums.H b/src/include/usr/vpd/pvpdenums.H
+new file mode 100644
+index 0000000..acf3bbd
+--- /dev/null
++++ b/src/include/usr/vpd/pvpdenums.H
+@@ -0,0 +1,96 @@
++/* IBM_PROLOG_BEGIN_TAG                                                   */
++/* This is an automatically generated prolog.                             */
++/*                                                                        */
++/* $Source: src/include/usr/vpd/pvpdenums.H $                             */
++/*                                                                        */
++/* OpenPOWER HostBoot Project                                             */
++/*                                                                        */
++/* Contributors Listed Below - COPYRIGHT 2013,2015                        */
++/* [+] International Business Machines Corp.                              */
++/*                                                                        */
++/*                                                                        */
++/* Licensed under the Apache License, Version 2.0 (the "License");        */
++/* you may not use this file except in compliance with the License.       */
++/* You may obtain a copy of the License at                                */
++/*                                                                        */
++/*     http://www.apache.org/licenses/LICENSE-2.0                         */
++/*                                                                        */
++/* Unless required by applicable law or agreed to in writing, software    */
++/* distributed under the License is distributed on an "AS IS" BASIS,      */
++/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
++/* implied. See the License for the specific language governing           */
++/* permissions and limitations under the License.                         */
++/*                                                                        */
++/* IBM_PROLOG_END_TAG                                                     */
++#ifndef __PVPDENUMS_H
++#define __PVPDENUMS_H
++
++#include <vpd/ipvpdenums.H>
++
++namespace PVPD
++{
++
++    /**
++     * @brief Enumeration for the PVPD Records that contain
++     *       the keyword enumerations below.
++     *
++     */
++    enum pvpdRecord
++    {
++        PVPD_FIRST_RECORD   = 0x00,
++        VINI        = PVPD_FIRST_RECORD,
++        OSYS        = 0x01,
++        OPFR        = 0x02,
++        VNDR        = 0x03,
++        // Last Record
++        PVPD_LAST_RECORD,
++        PVPD_TEST_RECORD,   // Test purposes ONLY!
++
++        //Start common IPVPD enums
++        PVPD_INVALID_RECORD = IPVPD::INVALID_RECORD,
++    };
++
++    /**
++     * @brief Enumerations for PVPD keywords that can be
++     *       accessed in the PVPD.
++     */
++    enum pvpdKeyword
++    {
++        PVPD_FIRST_KEYWORD      = 0x00,
++        pdI         = PVPD_FIRST_KEYWORD,
++        B3         = 0x01,
++        B4         = 0x02,
++        B7         = 0x03,
++        CC         = 0x04,
++        CE         = 0x05,
++        CT         = 0x06,
++        DR         = 0x07,
++        ET         = 0x08,
++        FN         = 0x09,
++        HE         = 0x0a,
++        HW         = 0x0b,
++        IN         = 0x0c,
++        MM         = 0x0d,
++        PF         = 0x0e,
++        PN         = 0x0f,
++        RT         = 0x10,
++        SN         = 0x11,
++        SS         = 0x12,
++        VD         = 0x13,
++        VN         = 0x14,
++        VP         = 0x15,
++        VS         = 0x16,
++        VZ         = 0x17,
++
++        // Last Keyword
++        PVPD_LAST_KEYWORD,
++        PVPD_TEST_KEYWORD,  // Test purposes ONLY!
++
++        //Start common IPVPD enums
++        FULL_RECORD = IPVPD::FULL_RECORD,
++        PVPD_INVALID_KEYWORD    = IPVPD::INVALID_KEYWORD,
++    };
++
++};  // end PVPD
++
++#endif
+diff --git a/src/include/usr/vpd/vpd_if.H b/src/include/usr/vpd/vpd_if.H
+index 0b3298a..d3915ee 100644
+--- a/src/include/usr/vpd/vpd_if.H
++++ b/src/include/usr/vpd/vpd_if.H
+@@ -71,6 +71,14 @@ namespace VPD
+     bool cvpdPresent ( TARGETING::Target * i_target );
+ 
+     /**
++     * @brief This function checks to see if the given pvpd target
++     *      is present
++     * @param[in] i_target - Target device to search for pvpd
++     * @return bool - true if pvpd is present, false if it is not.
++     */
++    bool pvpdPresent ( TARGETING::Target * i_target );
++
++    /**
+      * @brief This function checks if the PNOR cache for this target is in
+      *      sync with the SEEPROM, if not it loads the PNOR cache from SEEPROM.
+      * @param[in] i_target - Target device
+diff --git a/src/include/usr/vpd/vpdreasoncodes.H b/src/include/usr/vpd/vpdreasoncodes.H
+index 88668b7..2cfe8a6 100644
+--- a/src/include/usr/vpd/vpdreasoncodes.H
++++ b/src/include/usr/vpd/vpdreasoncodes.H
+@@ -61,6 +61,9 @@ enum vpdModuleId
+     VPD_IPVPD_LOAD_PNOR                     = 0x33,
+     VPD_IPVPD_GET_RECORD_LIST_SEEPROM       = 0x34,
+ 
++    // PVPD
++    VPD_PVPD_PRESENCEDETECT                 = 0x50,
++
+     // DIMM SPD
+     VPD_SPD_GET_KEYWORD_VALUE               = 0x61,
+     VPD_SPD_GET_VALUE                       = 0x62,
+@@ -131,6 +134,7 @@ enum vpdReasonCode
+     VPD_UNEXPECTED_TARGET_TYPE          = VPD_COMP_ID | 0x33,
+     VPD_WRITE_DEST_UNRESOLVED           = VPD_COMP_ID | 0x34,
+     VPD_CACHE_SIZE_EXCEEDED             = VPD_COMP_ID | 0x35,
++    VPD_INVALID_LENGTH                  = VPD_COMP_ID | 0x36,
+ };
+ 
+ 
+diff --git a/src/usr/devtree/bld_devtree.C b/src/usr/devtree/bld_devtree.C
+index a8ece97..a311efe 100644
+--- a/src/usr/devtree/bld_devtree.C
++++ b/src/usr/devtree/bld_devtree.C
+@@ -45,7 +45,7 @@
+ #include <fsi/fsiif.H>
+ #include <config.h>
+ #include <devicefw/userif.H>
+-#include <vpd/cvpdenums.H>
++#include <vpd/pvpdenums.H>
+ #include <i2c/i2cif.H>
+ #include <i2c/eepromif.H>
+ #include <ipmi/ipmisensor.H>
+@@ -351,12 +351,9 @@ void add_i2c_info( const TARGETING::Target* i_targ,
+                 }
+                 else if( l_type == TARGETING::TYPE_MEMBUF )
+                 {
+-                    //@fixme-RTC:118373-Remove Hab/Palm workaround
+-                    //   once node vpd is supported
+-                    sprintf( l_label, "system-vpd" );
+-                    /*sprintf( l_label, "memb-vpd-%d",
++                    sprintf( l_label, "memb-vpd-%d",
+                              eep2->assocTarg
+-                             ->getAttr<TARGETING::ATTR_POSITION>() );*/
++                             ->getAttr<TARGETING::ATTR_POSITION>() );
+                 }
+                 else if( l_type == TARGETING::TYPE_DIMM )
+                 {
+@@ -1054,39 +1051,46 @@ errlHndl_t bld_fdt_system(devTree * i_dt, bool i_smallTree)
+            3) Default to 'unknown'
+          */
+         bool foundvpd = false;
+-        // TODO RTC 118373 -- update to account for firestone/memory riser
+-        TARGETING::TargetHandleList l_membTargetList;
+-        getAllChips(l_membTargetList, TYPE_MEMBUF);
+-
+-        //if can't find a centaur for the CVPD, default to unknown
+-        if (l_membTargetList.size())
++        TARGETING::TargetHandleList l_nodeTargetList;
++        PredicateCTM predNode(CLASS_ENC, TYPE_NODE);
++        PredicateHwas predFunctional;
++        predFunctional.functional(true);
++        PredicatePostfixExpr nodeCheckExpr;
++        nodeCheckExpr.push(&predNode).push(&predFunctional).And();
++
++        targetService().getAssociated(l_nodeTargetList, sys,
++                    TargetService::CHILD, TargetService::IMMEDIATE,
++                    &nodeCheckExpr);
++
++        //if can't find a node for the PVPD, default to unknown
++        if (l_nodeTargetList.size())
+         {
+-            TARGETING::Target * l_pMem = l_membTargetList[0];
++            TARGETING::Target * l_pNode = l_nodeTargetList[0];
+             size_t vpdSize = 0x0;
+ 
+             // Note: First read with NULL for o_buffer sets vpdSize to the
+             // correct length
+-            errhdl = deviceRead( l_pMem,
++            errhdl = deviceRead( l_pNode,
+                                  NULL,
+                                  vpdSize,
+-                                 DEVICE_CVPD_ADDRESS( CVPD::OSYS,
+-                                                      CVPD::MM ));
++                                 DEVICE_PVPD_ADDRESS( PVPD::OSYS,
++                                                      PVPD::MM ));
+ 
+             if(errhdl)
+             {
+                 TRACFCOMP(g_trac_devtree,ERR_MRK" Couldn't get OSYS:MM size for HUID=0x%.8X",
+-                          TARGETING::get_huid(l_pMem));
++                          TARGETING::get_huid(l_pNode));
+ 
+                 // Try the OPFR record
+-                errlHndl_t opfr_errhdl = deviceRead( l_pMem,
++                errlHndl_t opfr_errhdl = deviceRead( l_pNode,
+                                            NULL,
+                                            vpdSize,
+-                                           DEVICE_CVPD_ADDRESS( CVPD::OPFR,
+-                                                                CVPD::DR ));
++                                           DEVICE_PVPD_ADDRESS( PVPD::OPFR,
++                                                                PVPD::DR ));
+                 if(opfr_errhdl)
+                 {
+                     TRACFCOMP(g_trac_devtree,ERR_MRK" Couldn't get OPFR:DR size for HUID=0x%.8X",
+-                              TARGETING::get_huid(l_pMem));
++                              TARGETING::get_huid(l_pNode));
+                     delete opfr_errhdl; //delete OPFR log, VPD is just bad
+                 }
+                 else
+@@ -1095,16 +1099,16 @@ errlHndl_t bld_fdt_system(devTree * i_dt, bool i_smallTree)
+                     errhdl = NULL;
+                     char drBuf[vpdSize+1];
+                     memset(&drBuf, 0x0, (vpdSize+1)); //null terminated str
+-                    errhdl = deviceRead( l_pMem,
++                    errhdl = deviceRead( l_pNode,
+                                          reinterpret_cast<void*>( &drBuf ),
+                                          vpdSize,
+-                                         DEVICE_CVPD_ADDRESS( CVPD::OPFR,
+-                                                              CVPD::DR ));
++                                         DEVICE_PVPD_ADDRESS( PVPD::OPFR,
++                                                              PVPD::DR ));
+ 
+                     if(errhdl)
+                     {
+                         TRACFCOMP(g_trac_devtree,ERR_MRK" Couldn't read OPFR:DR for HUID=0x%.8X",
+-                                  TARGETING::get_huid(l_pMem));
++                                  TARGETING::get_huid(l_pNode));
+                     }
+                     else
+                     {
+@@ -1117,16 +1121,16 @@ errlHndl_t bld_fdt_system(devTree * i_dt, bool i_smallTree)
+             {
+                 char mmBuf[vpdSize+1];
+                 memset(&mmBuf, 0x0, (vpdSize+1)); //ensure null terminated str
+-                errhdl = deviceRead( l_pMem,
++                errhdl = deviceRead( l_pNode,
+                                      reinterpret_cast<void*>( &mmBuf ),
+                                      vpdSize,
+-                                     DEVICE_CVPD_ADDRESS( CVPD::OSYS,
+-                                                          CVPD::MM ));
++                                     DEVICE_PVPD_ADDRESS( PVPD::OSYS,
++                                                          PVPD::MM ));
+ 
+                 if(errhdl)
+                 {
+                     TRACFCOMP(g_trac_devtree,ERR_MRK" Couldn't read OSYS:MM for HUID=0x%.8X",
+-                              TARGETING::get_huid(l_pMem));
++                              TARGETING::get_huid(l_pNode));
+                 }
+                 else
+                 {
+@@ -1153,42 +1157,40 @@ errlHndl_t bld_fdt_system(devTree * i_dt, bool i_smallTree)
+            1) OSYS:SS
+            2) Default to 'unavailable'
+          */
+-        // TODO RTC 118373 -- update to account for firestone/memory riser
+         foundvpd = false;
+-        if( l_membTargetList.size() )
++        if( l_nodeTargetList.size() )
+         {
+-            // TODO RTC 118373 - Should be able to read from attribute
+-            TARGETING::Target * l_pMem = l_membTargetList[0];
++            TARGETING::Target * l_pNode = l_nodeTargetList[0];
+             size_t vpdSize = 0x0;
+ 
+             // Note: First read with NULL for o_buffer sets vpdSize to the
+             // correct length
+-            errhdl = deviceRead( l_pMem,
++            errhdl = deviceRead( l_pNode,
+                                  NULL,
+                                  vpdSize,
+-                                 DEVICE_CVPD_ADDRESS( CVPD::OSYS,
+-                                                      CVPD::SS ));
++                                 DEVICE_PVPD_ADDRESS( PVPD::OSYS,
++                                                      PVPD::SS ));
+ 
+             if(errhdl)
+             {
+                 TRACFCOMP(g_trac_devtree,ERR_MRK" Couldn't get OSYS:SS size for HUID=0x%.8X",
+-                          TARGETING::get_huid(l_pMem));
++                          TARGETING::get_huid(l_pNode));
+                 // Note - not supporting old vpd versions without OSYS here
+             }
+             else
+             {
+                 char ssBuf[vpdSize+1];
+                 memset(&ssBuf, 0x0, (vpdSize+1)); //ensure null terminated str
+-                errhdl = deviceRead( l_pMem,
++                errhdl = deviceRead( l_pNode,
+                                      reinterpret_cast<void*>( &ssBuf ),
+                                      vpdSize,
+-                                     DEVICE_CVPD_ADDRESS( CVPD::OSYS,
+-                                                          CVPD::SS ));
++                                     DEVICE_PVPD_ADDRESS( PVPD::OSYS,
++                                                          PVPD::SS ));
+ 
+                 if(errhdl)
+                 {
+                     TRACFCOMP(g_trac_devtree,ERR_MRK" Couldn't read OSYS:SS for HUID=0x%.8X",
+-                              TARGETING::get_huid(l_pMem));
++                              TARGETING::get_huid(l_pNode));
+                 }
+                 else
+                 {
+@@ -1205,7 +1207,6 @@ errlHndl_t bld_fdt_system(devTree * i_dt, bool i_smallTree)
+             delete errhdl;
+             errhdl = NULL;
+         }
+-
+         if( !foundvpd ) //serial number not found, default to unavailable
+         {
+             i_dt->addPropertyString(rootNode, "system-id", "unavailable");
+diff --git a/src/usr/hwas/hwasPlat.C b/src/usr/hwas/hwasPlat.C
+index 80c36f9..ef631b5 100644
+--- a/src/usr/hwas/hwasPlat.C
++++ b/src/usr/hwas/hwasPlat.C
+@@ -421,9 +421,13 @@ errlHndl_t platPresenceDetect(TargetHandleList &io_targets)
+             HWAS_DBG("pTarget %.8X - detected present",
+                 pTarget->getAttr<ATTR_HUID>());
+ 
+-            // on to the next target
++        // If there is planar VPD, then don't skip the presence detect.
++        // The presence detect will log any problems and load pnor.
++#if !defined(CONFIG_HAVE_PVPD)
++            // on to the next target if there is no Planar VPD
+             pTarget_it++;
+             continue;
++#endif
+         }
+ 
+         // call deviceRead() to see if they are present
+diff --git a/src/usr/hwas/hwasPlatCallout.C b/src/usr/hwas/hwasPlatCallout.C
+index 0f15082..03756a8 100644
+--- a/src/usr/hwas/hwasPlatCallout.C
++++ b/src/usr/hwas/hwasPlatCallout.C
+@@ -122,10 +122,12 @@ errlHndl_t platHandleHWCallout(
+         } // switch i_deconfigState
+ 
+         // check to see if this target is the master processor
+-        //  and if it's been deconfigured.
++        //  and if it's being deconfigured.
++        //  NOTE: will be non-functional early in IPL before discovery complete.
+         TARGETING::Target *l_masterProc;
+         TARGETING::targetService().masterProcChipTargetHandle(l_masterProc);
+-        if (i_pTarget == l_masterProc)
++        if ( (i_pTarget == l_masterProc) &&
++             (NO_DECONFIG != i_deconfigState) )
+         {
+             const TARGETING::HwasState hwasState =
+                     l_masterProc->getAttr<TARGETING::ATTR_HWAS_STATE>();
+diff --git a/src/usr/i2c/eepromdd.C b/src/usr/i2c/eepromdd.C
+index 372fcc7..b2e1c90 100755
+--- a/src/usr/i2c/eepromdd.C
++++ b/src/usr/i2c/eepromdd.C
+@@ -97,6 +97,11 @@ DEVICE_REGISTER_ROUTE( DeviceFW::WILDCARD,
+                        TARGETING::TYPE_MEMBUF,
+                        eepromPerformOp );
+ 
++// Register the perform Op with the routing code for Nodes.
++DEVICE_REGISTER_ROUTE( DeviceFW::WILDCARD,
++                       DeviceFW::EEPROM,
++                       TARGETING::TYPE_NODE,
++                       eepromPerformOp );
+ 
+ // ------------------------------------------------------------------
+ // eepromPerformOp
+diff --git a/src/usr/ipmi/ipmifruinv.C b/src/usr/ipmi/ipmifruinv.C
+index cc2f06a..49c5e7e 100644
+--- a/src/usr/ipmi/ipmifruinv.C
++++ b/src/usr/ipmi/ipmifruinv.C
+@@ -29,6 +29,7 @@
+ #include <devicefw/userif.H>
+ #include <vpd/spdenums.H>
+ #include <vpd/cvpdenums.H>
++#include <vpd/pvpdenums.H>
+ #include <targeting/common/commontargeting.H>
+ #include <targeting/common/utilFilter.H>
+ #include <errl/errlmanager.H>
+@@ -51,7 +52,17 @@ inline static bool comparePairs(
+               const std::pair<TARGETING::TargetHandle_t, uint8_t>& i_lhs,
+               const std::pair<TARGETING::TargetHandle_t, uint8_t>& i_rhs)
+ {
+-        return (i_lhs.second < i_rhs.second);
++    bool l_compare = i_lhs.second < i_rhs.second;
++
++    // in case of a tie, if the left is a Node, sort it first.
++    if (i_lhs.second == i_rhs.second)
++    {
++        if (TARGETING::TYPE_NODE==i_lhs.first->getAttr<TARGETING::ATTR_TYPE>())
++        {
++           l_compare = true;
++        }
++    }
++    return l_compare;
+ }
+ 
+ IpmiFruInv::IpmiFruInv(TARGETING::TargetHandle_t i_target)
+@@ -82,7 +93,14 @@ IpmiFruInv *IpmiFruInv::Factory(TARGETING::TargetHandleList i_targets,
+             l_fru = new procIpmiFruInv(l_target, i_updateData);
+             break;
+         case TARGETING::TYPE_MEMBUF:
+-            // @todo-RTC:117702
++            // A memory riser card will have a mem buff with a distinct FRU ID
++            l_fru = new membufIpmiFruInv(l_target, i_targets, i_updateData);
++            break;
++        case TARGETING::TYPE_NODE:
++            // When the planar eeprom is shared for planar vpd and memory vpd,
++            // the node and membufs will have the same FRU ID. The node has
++            // been sorted ahead of the membufs. The membufs are extra targets
++            // for their ECIDs.
+             l_fru = new backplaneIpmiFruInv(l_target, i_targets, i_updateData);
+             break;
+         case TARGETING::TYPE_SYS:
+@@ -425,11 +443,11 @@ errlHndl_t isdimmIpmiFruInv::buildProductInfoArea(std::vector<uint8_t> &io_data)
+         io_data.push_back(uint8_t(0)); // Empty FRU File ID bytes
+         io_data.push_back(IPMIFRUINV::END_OF_CUSTOM_FIELDS);
+ 
+-        //Finalize section formatting
+-        postFormatProcessing(io_data);
+-
+     } while (0);
+ 
++    //Finalize section formatting
++    postFormatProcessing(io_data);
++
+     if (l_errl)
+     {
+         TRACFCOMP(g_trac_ipmi,"isdimIpmiFruInv::buildProductInfoArea - Errors "
+@@ -580,11 +598,11 @@ errlHndl_t procIpmiFruInv::buildBoardInfoArea(std::vector<uint8_t> &io_data)
+         //Indicate end of custom fields
+         io_data.push_back(IPMIFRUINV::END_OF_CUSTOM_FIELDS);
+ 
+-        //Complete formatting for this data record
+-        postFormatProcessing(io_data);
+-
+     } while (0);
+ 
++    //Complete formatting for this data record
++    postFormatProcessing(io_data);
++
+     if (l_errl)
+     {
+         TRACFCOMP(g_trac_ipmi,"buildBoardInfoArea - Errors Collecting ISDimm "
+@@ -610,64 +628,18 @@ errlHndl_t procIpmiFruInv::buildMultiRecordInfoArea(
+ errlHndl_t procIpmiFruInv::addVpdData(std::vector<uint8_t> &io_data,
+                                      uint8_t i_record,
+                                      uint8_t i_keyword,
+-                                     bool i_ascii)
++                                     bool i_ascii,
++                                     bool i_typeLengthByte)
+ {
+-    size_t     l_vpdSize = 0;
+     errlHndl_t l_errl = NULL;
+ 
+-    do {
+-
+-        //First get size of data by passing NULL
+-        l_errl = deviceRead(iv_target,
+-                                      NULL,
+-                                      l_vpdSize,
+-                                      DEVICE_MVPD_ADDRESS(i_record, i_keyword));
+-
+-        if (l_errl)
+-        {
+-            TRACFCOMP(g_trac_ipmi,"procIpmiFruInv::addVpdData - Error while "
+-                      "reading MVPD keyword size");
+-            break;
+-        }
+-
+-        //Assert if vpd field is too large to fit in IPMI fru inventory format
+-        assert(l_vpdSize < IPMIFRUINV::TYPELENGTH_BYTE_ASCII);
+-
+-        if (l_vpdSize > 0)
+-        {
+-            //Determine how big data is and expand it to handle the soon to
+-            //be read VPD data
+-            uint8_t l_offset = io_data.size();
+-            io_data.resize(l_offset + 1 + l_vpdSize);
+-
+-            //Add on the data to the type/length byte indicating it is ascii
+-            // otherwise leave it as binary
+-            if (i_ascii)
+-            {
+-                io_data.at(l_offset) = l_vpdSize
+-                                       + IPMIFRUINV::TYPELENGTH_BYTE_ASCII;
+-            }
+-            else
+-            {
+-                io_data.at(l_offset) = l_vpdSize;
+-            }
+-
+-            //Read the VPD data directly into fru inventory data buffer
+-            l_errl = deviceRead(iv_target,&io_data[l_offset+1],l_vpdSize,
+-                                DEVICE_MVPD_ADDRESS(i_record, i_keyword));
+-        }
+-        else
+-        {
+-            TRACFCOMP(g_trac_ipmi,"procIpmiFruInv::addVpdData - "
+-                      " No size returned for MVPD keyword");
+-        }
+-    } while(0);
+-
+-    if (l_errl)
+-    {
+-        TRACFCOMP(g_trac_ipmi, "addVpdData - Error acquiring data from Vpd.");
+-    }
+-
++    l_errl = addCommonVpdData(iv_target,
++                              io_data,
++                              DeviceFW::MVPD,
++                              i_record,
++                              i_keyword,
++                              i_ascii,
++                              i_typeLengthByte);
+     return l_errl;
+ }
+ 
+@@ -699,8 +671,7 @@ errlHndl_t backplaneIpmiFruInv::buildChassisInfoArea(
+         preFormatProcessing(io_data, false);
+         //Set Chassis Enclosure Type - Not Ascii
+         // Also, do not include type/length byte
+-        //@fixme RTC Story 118373
+-        l_errl = addVpdData(io_data, CVPD::OSYS, CVPD::ET, false, false);
++        l_errl = addVpdData(io_data, PVPD::OSYS, PVPD::ET, false, false);
+ 
+         //Support Legacy VPD without OSYS record
+         if (l_errl)
+@@ -714,12 +685,10 @@ errlHndl_t backplaneIpmiFruInv::buildChassisInfoArea(
+             //Set default chassis type
+             io_data.push_back(IPMIFRUINV::DEFAULT_CHASSIS_TYPE);
+             //Set chassis part number - ascii formatted field
+-            //@fixme RTC Story 118373
+-            l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::VP, true);
++            l_errl = addVpdData(io_data, PVPD::OPFR, PVPD::VP, true);
+             if (l_errl) { break; }
+             //Set chassis serial number - ascii formatted field
+-            //@fixme RTC Story 118373
+-            l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::VS, true);
++            l_errl = addVpdData(io_data, PVPD::OPFR, PVPD::VS, true);
+             if (l_errl) { break; }
+         }
+         else
+@@ -728,13 +697,11 @@ errlHndl_t backplaneIpmiFruInv::buildChassisInfoArea(
+                       " Using NEW OSYS RECORD FOR Chassis VPD Data");
+ 
+             //Set chassis part number - ascii formatted field
+-            //@fixme RTC Story 118373
+-            l_errl = addVpdData(io_data, CVPD::OSYS, CVPD::MM, true);
++            l_errl = addVpdData(io_data, PVPD::OSYS, PVPD::MM, true);
+             if (l_errl) { break; }
+ 
+             //Set chassis serial number - ascii formatted field
+-            //@fixme RTC Story 118373
+-            l_errl = addVpdData(io_data, CVPD::OSYS, CVPD::SS, true);
++            l_errl = addVpdData(io_data, PVPD::OSYS, PVPD::SS, true);
+             if (l_errl) { break; }
+ 
+         }
+@@ -743,10 +710,11 @@ errlHndl_t backplaneIpmiFruInv::buildChassisInfoArea(
+         io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
+         io_data.push_back(IPMIFRUINV::END_OF_CUSTOM_FIELDS);
+ 
+-        //Complete record data formatting
+-        postFormatProcessing(io_data);
+     } while (0);
+ 
++    //Complete record data formatting
++    postFormatProcessing(io_data);
++
+     if (l_errl)
+     {
+         TRACFCOMP(g_trac_ipmi,"backplaneIpmiFruInv::buildChassisInfoArea - "
+@@ -771,67 +739,39 @@ errlHndl_t backplaneIpmiFruInv::buildBoardInfoArea(
+         io_data.push_back(0);
+ 
+         //Set Vendor Name - ascii formatted data
+-        //@fixme RTC Story 118373
+-        l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::VN, true);
++        l_errl = addVpdData(io_data, PVPD::OPFR, PVPD::VN, true);
+         if (l_errl) { break; }
+ 
+         //Set Product Name - ascii formatted data
+-        //@fixme RTC Story 118373
+-        l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::DR, true);
++        l_errl = addVpdData(io_data, PVPD::OPFR, PVPD::DR, true);
+         if (l_errl) { break; }
+ 
+         //Set Product Serial number - ascii formatted data
+-        //@fixme RTC Story 118373
+-        l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::VS, true);
++        //TODO RTC:117702 use attribute when 122890 is available
++        l_errl = addVpdData(io_data, PVPD::OPFR, PVPD::VS, true);
+         if (l_errl) { break; }
+ 
+         //Set Product Part number - ascii formatted data
+-        //@fixme RTC Story 118373
+-        l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::VP, true);
+-        if (l_errl) { break; }
++        //TODO RTC:117702 use attribute when 122890 is available
++        l_errl = addVpdData(io_data, PVPD::OPFR, PVPD::VP, true);
+ 
+         //Push Fru File ID Byte - NULL
+         io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
+ 
+-        bool l_setCustomData = false;
+-        // Check if we should add ECID
+-        for (TARGETING::TargetHandleList::const_iterator extraTargets_it =
+-                iv_extraTargets.begin();
+-                extraTargets_it != iv_extraTargets.end();
+-                ++extraTargets_it
+-            )
++        //Only set the ECID Data during an update scenario
++        if (iv_isUpdate == true)
+         {
+-            TARGETING::TargetHandle_t l_extraTarget = *extraTargets_it;
+-
+-            //Only set the ECID Data during an update scenario
+-            if (iv_isUpdate == true &&
+-                (l_extraTarget->getAttr<TARGETING::ATTR_TYPE>() ==
+-                                                        TARGETING::TYPE_MEMBUF))
+-            {
+-                TARGETING::ATTR_ECID_type ecidInfo;
+-                bool getEcid =
+-                      l_extraTarget->tryGetAttr<TARGETING::ATTR_ECID>(ecidInfo);
+-                if (getEcid)
+-                {
+-                    l_setCustomData = true;
+-                    addEcidData(l_extraTarget, ecidInfo, io_data);
+-                }
+-            }
++            customEcidData (iv_extraTargets, io_data);
+         }
+ 
+-        //If no Custom data was sent, an Empty Byte is needed
+-        if (!l_setCustomData)
+-        {
+-            io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
+-        }
+         //Indicate End of Custom Fields
+         io_data.push_back(IPMIFRUINV::END_OF_CUSTOM_FIELDS);
+ 
+-        //Complete record data formatting
+-        postFormatProcessing(io_data);
+-
+     } while (0);
+ 
++    //Complete record data formatting
++    postFormatProcessing(io_data);
++
+     if (l_errl)
+     {
+         TRACFCOMP(g_trac_ipmi,"backplaneIpmiFruInv::buildBoardInfoArea - "
+@@ -860,74 +800,17 @@ errlHndl_t backplaneIpmiFruInv::addVpdData(std::vector<uint8_t> &io_data,
+                                      uint8_t i_keyword,
+                                      bool i_ascii,
+                                      bool i_typeLengthByte)
++
+ {
+-    size_t     l_vpdSize = 0;
+     errlHndl_t l_errl = NULL;
+ 
+-    do {
+-        //First get size of data with NULL parameter
+-        l_errl = deviceRead(iv_target,
+-                                      NULL,
+-                                      l_vpdSize,
+-                                      //@fixme RTC Story 118373
+-                                      DEVICE_CVPD_ADDRESS(i_record, i_keyword));
+-
+-        if (l_errl)
+-        {
+-            TRACFCOMP(g_trac_ipmi,"backplaneIpmiFruInv::addVpdData - Error "
+-                      "while reading CVPD keyword size");
+-            break;
+-        }
+-
+-        //Assert if vpd field is too large to fit in IPMI fru inventory format
+-        assert(l_vpdSize < IPMIFRUINV::TYPELENGTH_BYTE_ASCII);
+-
+-        if (l_vpdSize > 0)
+-        {
+-            uint8_t l_offset = 0;
+-            //Add on the typelength byte if requested
+-            if (i_typeLengthByte)
+-            {
+-                //Determine how big data is and expand it to handle the soon to
+-                //be read VPD data
+-                l_offset = io_data.size();
+-                io_data.resize(l_offset + 1 + l_vpdSize);
+-                //Add on the data to the type/length byte indicating it is ascii
+-                // otherwise leave it as binary
+-                if (i_ascii)
+-                {
+-                    io_data.at(l_offset) = l_vpdSize
+-                                           + IPMIFRUINV::TYPELENGTH_BYTE_ASCII;
+-                }
+-                else
+-                {
+-                    io_data.at(l_offset) = l_vpdSize;
+-                }
+-                l_offset += 1;
+-            }
+-            else
+-            {
+-                //Determine how big data is and expand it to handle the soon to
+-                //be read VPD data
+-                l_offset = io_data.size();
+-                io_data.resize(l_offset + l_vpdSize);
+-            }
+-            //Read the VPD data directly into fru inventory data buffer
+-            l_errl = deviceRead(iv_target,&io_data[l_offset],l_vpdSize,
+-                                     DEVICE_CVPD_ADDRESS(i_record, i_keyword));
+-        }
+-        else
+-        {
+-            TRACFCOMP(g_trac_ipmi,"backplaneIpmiFruInv::addVpdData - "
+-                      " No size returned for CVPD keyword");
+-        }
+-    } while(0);
+-
+-    if (l_errl)
+-    {
+-        TRACFCOMP(g_trac_ipmi, "backplaneIpmiFruInv::addVpdData - Error "
+-                  "acquiring data from Vpd.");
+-    }
++    l_errl = addCommonVpdData(iv_target,
++                              io_data,
++                              DeviceFW::PVPD,
++                              i_record,
++                              i_keyword,
++                              i_ascii,
++                              i_typeLengthByte);
+ 
+     return l_errl;
+ }
+@@ -1106,11 +989,11 @@ errlHndl_t systemFwIpmiFruInv::buildProductInfoArea(std::vector<uint8_t>
+ 
+         io_data.push_back(IPMIFRUINV::END_OF_CUSTOM_FIELDS);
+ 
+-        //Finalize section formatting
+-        postFormatProcessing(io_data);
+-
+     } while(0);
+ 
++    //Finalize section formatting
++    postFormatProcessing(io_data);
++
+     return l_errl;
+ }
+ 
+@@ -1121,7 +1004,155 @@ errlHndl_t systemFwIpmiFruInv::buildMultiRecordInfoArea(std::vector<uint8_t>
+     return IpmiFruInv::buildEmptyArea(io_data);
+ }
+ 
++//##############################################################################
++membufIpmiFruInv::membufIpmiFruInv( TARGETING::TargetHandle_t i_target,
++                                     TARGETING::TargetHandleList i_extraTargets,
++                                     bool i_isUpdate)
++    :IpmiFruInv(i_target),
++    iv_isUpdate(i_isUpdate),
++    iv_extraTargets(i_extraTargets)
++{
++};
++
++errlHndl_t membufIpmiFruInv::buildInternalUseArea(
++                                                 std::vector<uint8_t> &io_data)
++{
++    //This section not needed for the mem buf type
++    return IpmiFruInv::buildEmptyArea(io_data);
++}
++
++errlHndl_t membufIpmiFruInv::buildChassisInfoArea(
++                                                  std::vector<uint8_t> &io_data)
++{
++    //This section not needed for the mem buf type
++    return IpmiFruInv::buildEmptyArea(io_data);
++}
++
++errlHndl_t membufIpmiFruInv::buildBoardInfoArea(
++                                              std::vector<uint8_t> &io_data)
++{
++    errlHndl_t l_errl = NULL;
++
++    do {
++        //Set formatting data that goes at the beginning of the record
++        preFormatProcessing(io_data, true);
++
++        //Set MFG Date/Time - Blank
++        io_data.push_back(0);
++        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; }
++
++        //Set Product Serial number - ascii formatted data
++        //TODO RTC:117702 use attribute when 122890 is available
++        l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::VS, true);
++        if (l_errl) { break; }
++
++        //Set Product Part number - ascii formatted data
++        //TODO RTC:117702 use attribute when 122890 is available
++        l_errl = addVpdData(io_data, CVPD::OPFR, CVPD::VP, true);
++        if (l_errl) { break; }
++
++        //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
++    postFormatProcessing(io_data);
++
++    if (l_errl)
++    {
++        TRACFCOMP(g_trac_ipmi,"membufIpmiFruInv::buildBoardInfoArea - "
++                  "Errors collecting board info data");
++    }
++
++    return l_errl;
++}
++
++errlHndl_t membufIpmiFruInv::buildProductInfoArea(
++                                                  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)
++{
++    //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)
++{
++    errlHndl_t l_errl = NULL;
++
++    l_errl = addCommonVpdData(iv_target,
++                              io_data,
++                              DeviceFW::CVPD,
++                              i_record,
++                              i_keyword,
++                              i_ascii,
++                              i_typeLengthByte);
++    return l_errl;
++}
++//##############################################################################
++void IpmiFruInv::customEcidData(TARGETING::TargetHandleList i_extraTargets,
++                     std::vector<uint8_t> &io_data)
++{
++
++    bool l_setCustomData = false;
++    // Check if we should add ECID
++    for (TARGETING::TargetHandleList::const_iterator extraTargets_it =
++                i_extraTargets.begin();
++                extraTargets_it != i_extraTargets.end();
++                ++extraTargets_it
++            )
++    {
++        TARGETING::TargetHandle_t l_extraTarget = *extraTargets_it;
++
++        //Only set the ECID Data during an update scenario
++        if ( l_extraTarget->getAttr<TARGETING::ATTR_TYPE>() ==
++                                                        TARGETING::TYPE_MEMBUF)
++        {
++            TARGETING::ATTR_ECID_type ecidInfo;
++            bool getEcid =
++                      l_extraTarget->tryGetAttr<TARGETING::ATTR_ECID>(ecidInfo);
++            if (getEcid)
++            {
++                l_setCustomData = true;
++                addEcidData(l_extraTarget, ecidInfo, io_data);
++            }
++        }
++    }
+ 
++    //If no Custom data was sent, an Empty Byte is needed
++    if (!l_setCustomData)
++    {
++        io_data.push_back(IPMIFRUINV::TYPELENGTH_BYTE_NULL);
++    }
++}
+ 
+ void IpmiFruInv::addEcidData(const TARGETING::TargetHandle_t& i_target,
+                              const TARGETING::ATTR_ECID_type& i_ecidInfo,
+@@ -1149,6 +1180,94 @@ void IpmiFruInv::addEcidData(const TARGETING::TargetHandle_t& i_target,
+     return;
+ }
+ 
++errlHndl_t IpmiFruInv::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)
++{
++    size_t     l_vpdSize = 0;
++    errlHndl_t l_errl = NULL;
++
++    do {
++        // First get size with NULL call:
++        // Bypass DEVICE_?VPD_ADDRESS inorder to maximize common code
++        l_errl = deviceRead(i_target,
++                            NULL,
++                            l_vpdSize,
++                            i_accessType,
++                            i_record,
++                            i_keyword,
++                            VPD::AUTOSELECT);
++
++        if (l_errl)
++        {
++            TRACFCOMP(g_trac_ipmi,"addCommonVpdData - Error "
++                      "while reading keyword size");
++            break;
++        }
++
++        //Assert if vpd field is too large to fit in IPMI fru inventory format
++        assert(l_vpdSize < IPMIFRUINV::TYPELENGTH_BYTE_ASCII);
++
++        if (l_vpdSize > 0)
++        {
++            uint8_t l_offset = 0;
++            //Add on the typelength byte if requested
++            if (i_typeLengthByte)
++            {
++                //Determine how big data is and expand it to handle the soon to
++                //be read VPD data
++                l_offset = io_data.size();
++                io_data.resize(l_offset + 1 + l_vpdSize);
++                //Add on the data to the type/length byte indicating it is ascii
++                // otherwise leave it as binary
++                if (i_ascii)
++                {
++                    io_data.at(l_offset) = l_vpdSize
++                                           + IPMIFRUINV::TYPELENGTH_BYTE_ASCII;
++                }
++                else
++                {
++                    io_data.at(l_offset) = l_vpdSize;
++                }
++                l_offset += 1;
++            }
++            else
++            {
++                //Determine how big data is and expand it to handle the soon to
++                //be read VPD data
++                l_offset = io_data.size();
++                io_data.resize(l_offset + l_vpdSize);
++            }
++            //Read the VPD data directly into fru inventory data buffer
++            l_errl = deviceRead(i_target,
++                            &io_data[l_offset],
++                            l_vpdSize,
++                            i_accessType,
++                            i_record,
++                            i_keyword,
++                            VPD::AUTOSELECT);
++        }
++        else
++        {
++            TRACFCOMP(g_trac_ipmi,"addCommonVpdData - "
++                      " No size returned for keyword");
++        }
++    } while(0);
++
++    if (l_errl)
++    {
++        TRACFCOMP(g_trac_ipmi, "addCommonVpdData - Error "
++                  "acquiring data from Vpd.");
++    }
++
++    return l_errl;
++}
++
+ void IPMIFRUINV::clearData(uint8_t i_fruId)
+ {
+     uint8_t l_clearData[] =
+@@ -1292,10 +1411,12 @@ void IPMIFRUINV::gatherClearData(const TARGETING::Target* i_pSys,
+                                     std::map<uint8_t,bool>& io_frusToClear)
+ {
+     TARGETING::PredicateCTM predChip(TARGETING::CLASS_CHIP);
++    TARGETING::PredicateCTM predNode(TARGETING::CLASS_ENC,
++                                     TARGETING::TYPE_NODE);
+     TARGETING::PredicateCTM predDimm(TARGETING::CLASS_LOGICAL_CARD,
+                                          TARGETING::TYPE_DIMM);
+     TARGETING::PredicatePostfixExpr checkAllExpr;
+-    checkAllExpr.push(&predChip).push(&predDimm).Or();
++    checkAllExpr.push(&predChip).push(&predNode).Or().push(&predDimm).Or();
+     TARGETING::TargetHandleList l_allPossibleFrus;
+     TARGETING::targetService().getAssociated( l_allPossibleFrus, i_pSys,
+     TARGETING::TargetService::CHILD, TARGETING::TargetService::ALL,
+@@ -1336,14 +1457,19 @@ void IPMIFRUINV::gatherSetData(const TARGETING::Target* i_pSys,
+     //                    may be needed
+     l_present.present(true);
+ 
++    checkExpr.push(&predChip);
++    TARGETING::PredicateCTM predNode(TARGETING::CLASS_ENC,
++                                     TARGETING::TYPE_NODE);
++    checkExpr.push(&predNode).Or();
++
+     //When updating data on a later pass ignore dimms
+     if (i_updateData)
+     {
+-        checkExpr.push(&predChip).push(&l_present).And();
++        checkExpr.push(&l_present).And();
+     }
+     else
+     {
+-        checkExpr.push(&predChip).push(&predDimm).Or().push(&l_present).And();
++        checkExpr.push(&predDimm).Or().push(&l_present).And();
+     }
+ 
+     TARGETING::TargetHandleList pCheckPres;
+@@ -1374,6 +1500,10 @@ void IPMIFRUINV::gatherSetData(const TARGETING::Target* i_pSys,
+     }
+ 
+     //Sort the vector by FRU_ID for later use.
++    //When the planar eeprom is shared for planar and memory buffer vpd, the
++    //node and membuffs will have the same FRU ID. For this case, sort the Node
++    //to be ahead of the mem buffs. The mem buffs will be extra targets for
++    //their ECIDs.
+     std::sort(io_potentialFrus.begin(),
+               io_potentialFrus.end(),
+               comparePairs);
+diff --git a/src/usr/ipmi/ipmifruinvprvt.H b/src/usr/ipmi/ipmifruinvprvt.H
+index 468a47f..57d6e13 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
+diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
+index 82ec014..759b73e 100644
+--- a/src/usr/targeting/common/xmltohb/target_types.xml
++++ b/src/usr/targeting/common/xmltohb/target_types.xml
+@@ -913,6 +913,8 @@
+     <attribute><id>FRU_ID</id></attribute>
+     <attribute><id>TPM_PRIMARY_INFO</id></attribute>
+     <attribute><id>TPM_BACKUP_INFO</id></attribute>
++    <attribute><id>EEPROM_VPD_PRIMARY_INFO</id></attribute>
++    <attribute><id>VPD_REC_NUM</id></attribute>
+ </targetType>
+ 
+ <targetType>
+diff --git a/src/usr/targeting/common/xmltohb/target_types_hb.xml b/src/usr/targeting/common/xmltohb/target_types_hb.xml
+index b0429da..d023f50 100644
+--- a/src/usr/targeting/common/xmltohb/target_types_hb.xml
++++ b/src/usr/targeting/common/xmltohb/target_types_hb.xml
+@@ -180,6 +180,11 @@
+ </targetTypeExtension>
+ 
+ <targetTypeExtension>
++    <id>enc-node-power8</id>
++    <attribute><id>VPD_SWITCHES</id></attribute>
++</targetTypeExtension>
++
++<targetTypeExtension>
+     <id>lcard-dimm</id>
+     <attribute><id>VPD_SWITCHES</id></attribute>
+     <attribute><id>IPMI_SENSORS</id></attribute>
+diff --git a/src/usr/vpd/HBconfig b/src/usr/vpd/HBconfig
+index 1361834..1d6e6f1 100644
+--- a/src/usr/vpd/HBconfig
++++ b/src/usr/vpd/HBconfig
+@@ -33,6 +33,28 @@ config CVPD_WRITE
+     help
+         Ensure at least one of the CVPD WRITEs are enabled
+ 
++config PVPD_READ_FROM_PNOR
++    default n
++    help
++        Read Planar VPD data from PNOR cache
++
++config PVPD_READ_FROM_HW
++    default n
++    help
++        Read Planar VPD data from HW resources
++
++config PVPD_WRITE_TO_PNOR
++    default y if PVPD_READ_FROM_PNOR
++    depends on PVPD_READ_FROM_PNOR
++    help
++        Write Planar VPD data to PNOR cache
++
++config PVPD_WRITE_TO_HW
++    default y if PVPD_READ_FROM_HW
++    depends on PVPD_READ_FROM_HW
++    help
++        Write Planar VPD data to HW resources
++
+ config MVPD_READ_FROM_PNOR
+     default y
+     help
+@@ -105,6 +127,11 @@ config HAVE_MBVPD
+     help
+         Have MemBuff/Centaur VPD, PNOR or HW
+ 
++config HAVE_PVPD
++    default y if PVPD_READ_FROM_PNOR || PVPD_READ_FROM_HW
++    help
++        Have Planar VPD, PNOR or HW
++
+ config PALMETTO_PASS1
+     default n
+     help
+diff --git a/src/usr/vpd/cvpd.C b/src/usr/vpd/cvpd.C
+index 50815f1..fa37dc9 100644
+--- a/src/usr/vpd/cvpd.C
++++ b/src/usr/vpd/cvpd.C
+@@ -5,7 +5,7 @@
+ /*                                                                        */
+ /* OpenPOWER HostBoot Project                                             */
+ /*                                                                        */
+-/* Contributors Listed Below - COPYRIGHT 2013,2014                        */
++/* Contributors Listed Below - COPYRIGHT 2013,2015                        */
+ /* [+] Google Inc.                                                        */
+ /* [+] International Business Machines Corp.                              */
+ /*                                                                        */
+@@ -31,7 +31,10 @@
+ #include <trace/interface.H>
+ #include <errl/errlentry.H>
+ #include <errl/errlmanager.H>
++#include <targeting/common/commontargeting.H>
+ #include <targeting/common/targetservice.H>
++#include <targeting/common/util.H>
++#include <targeting/common/utilFilter.H>
+ #include <devicefw/driverif.H>
+ #include <vfs/vfs.H>
+ #include <vpd/vpdreasoncodes.H>
+@@ -40,6 +43,7 @@
+ #include <i2c/eepromif.H>
+ #include <config.h>
+ #include "cvpd.H"
++#include "pvpd.H"
+ #include "vpd.H"
+ 
+ // ----------------------------------------------
+@@ -233,15 +237,41 @@ IpVpdFacade(CVPD::SECTION_SIZE,
+     iv_configInfo.vpdReadHW = true;
+ #else
+     iv_configInfo.vpdReadHW = false;
+-#endif    
++#endif
+ #ifdef CONFIG_CVPD_WRITE_TO_PNOR
+     iv_configInfo.vpdWritePNOR = true;
+ #else
+     iv_configInfo.vpdWritePNOR = false;
+-#endif    
++#endif
+ #ifdef CONFIG_CVPD_WRITE_TO_HW
+     iv_configInfo.vpdWriteHW = true;
+ #else
+     iv_configInfo.vpdWriteHW = false;
+ #endif
+ }
++
++// Retrun lists of records that should be copied to pnor.
++void CvpdFacade::getRecordLists(
++                const  recordInfo* & o_primaryVpdRecords,
++                uint64_t           & o_primaryRecSize,
++                const  recordInfo* & o_altVpdRecords,
++                uint64_t           & o_altRecSize)
++{
++    // Always return this object's list
++    o_primaryVpdRecords = iv_vpdRecords;
++    o_primaryRecSize = iv_recSize;
++
++    // If the planar errprom  being shared with a mem buf,
++    // then return the pvpd list as the alternative record list.
++    // At thip point, if the membufs are be processed, then the node
++    // might not have been discovered yet. If pvpd is being cached, then
++    // include the pvpd list as the altnative.
++#ifdef CONFIG_PVPD_READ_FROM_PNOR
++    o_altVpdRecords = Singleton<PvpdFacade>::instance().iv_vpdRecords;
++    o_altRecSize = Singleton<PvpdFacade>::instance().iv_recSize;
++#else
++    o_altVpdRecords = NULL;
++    o_altRecSize = 0;
++#endif
++}
++
+diff --git a/src/usr/vpd/cvpd.H b/src/usr/vpd/cvpd.H
+index e7a2d9f..9c729c3 100644
+--- a/src/usr/vpd/cvpd.H
++++ b/src/usr/vpd/cvpd.H
+@@ -79,7 +79,6 @@ namespace CVPD
+         { OPFR, "OPFR" },
+         { VNDR, "VNDR" },
+         { SPDX, "SPDX" },
+-        { OSYS, "OSYS" },
+         // -------------------------------------------------------------------
+         // DO NOT USE!!  This is for test purposes ONLY!
+         { CVPD_TEST_RECORD, "TEST" },
+@@ -182,5 +181,26 @@ class CvpdFacade: public IpVpdFacade
+      */
+     CvpdFacade( );
+ 
++  private:
++
++    /**
++     * @brief This function returns a primary and an alternate list of records
++     *       that should be copied to pnor. The Alternate list is optional.
++     *
++     * @param[out] o_primaryVpdRecords - Pointer to array of VPD Records to use
++     *
++     * @param[out] o_primaryRecSize -    Size of o_primaryVpdRecords array
++     *
++     * @param[out] o_altVpdRecords -     Pointer to array of VPD Records to use
++     *
++     * @param[out] o_altRecSize -        Size of o_altVpdRecords array
++     *
++     */
++    void getRecordLists(
++                const  recordInfo* & o_primaryVpdRecords,
++                uint64_t           & o_primaryRecSize,
++                const  recordInfo* & o_altVpdRecords,
++                uint64_t           & o_altRecSize);
++
+ };
+ #endif  // __CVPD_H
+diff --git a/src/usr/vpd/ipvpd.C b/src/usr/vpd/ipvpd.C
+index 3da20b2..e148bc9 100644
+--- a/src/usr/vpd/ipvpd.C
++++ b/src/usr/vpd/ipvpd.C
+@@ -43,6 +43,7 @@
+ #include <vpd/ipvpdenums.H>
+ 
+ #include "vpd.H"
++#include "cvpd.H"
+ #include "ipvpd.H"
+ #include "errlud_vpd.H"
+ 
+@@ -1336,6 +1337,19 @@ IpVpdFacade::getRecordListSeeprom ( std::list<TocPtRecord> & o_recList,
+         return err;
+     }
+ 
++    // Get the list of records that should be copied to pnor.
++    // The list of records for this vpd sub class will be the primary list.
++    // If the eeprom is being shared, then their might be an alternate list
++    // to also include.
++    const  recordInfo* l_primaryVpdRecords = NULL;
++    uint64_t           l_primaryRecSize = 0;
++    const  recordInfo* l_altVpdRecords = NULL;
++    uint64_t           l_altRecSize = 0;
++    getRecordLists(l_primaryVpdRecords,
++                   l_primaryRecSize,
++                   l_altVpdRecords,
++                   l_altRecSize);
++
+     offset = le16toh( toc_rec->record_offset ) + 1;  // skip 'large resource'
+ 
+     // Read the PT keyword(s) from the VTOC
+@@ -1367,20 +1381,36 @@ IpVpdFacade::getRecordListSeeprom ( std::list<TocPtRecord> & o_recList,
+               vtoc_pt_offset < pt_len;
+               vtoc_pt_offset += sizeof(TocPtRecord) )
+         {
++            bool l_found = false;
+             toc_rec =
+                 reinterpret_cast<TocPtRecord*>(l_buffer + vtoc_pt_offset);
+ 
+             // Save record if on the list for this target
+-            for ( uint32_t rec = 0; rec < iv_recSize; rec++ )
++            for ( uint32_t rec = 0; rec < l_primaryRecSize; rec++ )
+             {
+                 if ( memcmp( toc_rec->record_name,
+-                            iv_vpdRecords[rec].recordName,
++                            l_primaryVpdRecords[rec].recordName,
+                             RECORD_BYTE_SIZE ) == 0 )
+                 {
+                     o_recList.push_back(*toc_rec);
++                    l_found = true;
+                     break;
+                 }
+             }
++            // if not found, check the alternate list
++            if (!l_found)
++            {
++                for ( uint32_t rec = 0; rec < l_altRecSize; rec++ )
++                {
++                    if ( memcmp( toc_rec->record_name,
++                            l_altVpdRecords[rec].recordName,
++                            RECORD_BYTE_SIZE ) == 0 )
++                    {
++                        o_recList.push_back(*toc_rec);
++                        break;
++                    }
++                }
++            }
+         }
+     }
+ 
+@@ -2182,3 +2212,19 @@ void IpVpdFacade::setConfigFlagsHW ( )
+         iv_configInfo.vpdWriteHW = true;
+     }
+ }
++
++// Return the lists of records that should be copied to pnor.
++// The default lists to use are this object's record list and size.
++// No Alternate.
++void IpVpdFacade::getRecordLists(
++                const  recordInfo* & o_primaryVpdRecords,
++                uint64_t           & o_primaryRecSize,
++                const  recordInfo* & o_altVpdRecords,
++                uint64_t           & o_altRecSize)
++{
++    o_primaryVpdRecords = iv_vpdRecords;
++    o_primaryRecSize = iv_recSize;
++    o_altVpdRecords = NULL;
++    o_altRecSize = 0;
++}
++
+diff --git a/src/usr/vpd/ipvpd.H b/src/usr/vpd/ipvpd.H
+index 5cc7bec..e4c4162 100644
+--- a/src/usr/vpd/ipvpd.H
++++ b/src/usr/vpd/ipvpd.H
+@@ -677,7 +677,24 @@ class IpVpdFacade
+     errlHndl_t checkBufferSize( size_t i_bufferSize,
+                                 size_t i_expectedSize,
+                                 TARGETING::Target * i_target );
+-
++    /**
++     * @brief This function returns a primary and an alternate list of records
++     *       that should be copied to pnor. The Alternate list is optional.
++     *
++     * @param[out] o_primaryVpdRecords - Pointer to array of VPD Records to use
++     *
++     * @param[out] o_primaryRecSize -    Size of o_primaryVpdRecords array
++     *
++     * @param[out] o_altVpdRecords -     Pointer to array of VPD Records to use
++     *
++     * @param[out] o_altRecSize -        Size of o_altVpdRecords array
++     *
++     */
++    virtual void getRecordLists(
++                const  recordInfo* & o_primaryVpdRecords,
++                uint64_t           & o_primaryRecSize,
++                const  recordInfo* & o_altVpdRecords,
++                uint64_t           & o_altRecSize);
+ 
+   protected: // Variables
+ 
+@@ -693,6 +710,8 @@ class IpVpdFacade
+      */
+     uint64_t iv_vpdMaxSections;
+ 
++
++  public: // Variables
+     /**
+      * @brief Pointer to array of VPD Record information
+      *
+@@ -705,6 +724,7 @@ class IpVpdFacade
+      */
+     uint64_t iv_recSize;
+ 
++  protected: // Variables
+     /**
+      * @brief Pointer to array of VPD Keyword information
+      *
+diff --git a/src/usr/vpd/pvpd.C b/src/usr/vpd/pvpd.C
+new file mode 100644
+index 0000000..ec62237
+--- /dev/null
++++ b/src/usr/vpd/pvpd.C
+@@ -0,0 +1,369 @@
++/* IBM_PROLOG_BEGIN_TAG                                                   */
++/* This is an automatically generated prolog.                             */
++/*                                                                        */
++/* $Source: src/usr/vpd/pvpd.C $                                          */
++/*                                                                        */
++/* OpenPOWER HostBoot Project                                             */
++/*                                                                        */
++/* Contributors Listed Below - COPYRIGHT 2013,2015                        */
++/* [+] International Business Machines Corp.                              */
++/*                                                                        */
++/*                                                                        */
++/* Licensed under the Apache License, Version 2.0 (the "License");        */
++/* you may not use this file except in compliance with the License.       */
++/* You may obtain a copy of the License at                                */
++/*                                                                        */
++/*     http://www.apache.org/licenses/LICENSE-2.0                         */
++/*                                                                        */
++/* Unless required by applicable law or agreed to in writing, software    */
++/* distributed under the License is distributed on an "AS IS" BASIS,      */
++/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
++/* implied. See the License for the specific language governing           */
++/* permissions and limitations under the License.                         */
++/*                                                                        */
++/* IBM_PROLOG_END_TAG                                                     */
++// ----------------------------------------------
++// Includes
++// ----------------------------------------------
++#include <string.h>
++#include <endian.h>
++#include <trace/interface.H>
++#include <errl/errlentry.H>
++#include <errl/errlmanager.H>
++#include <targeting/common/targetservice.H>
++#include <targeting/common/util.H>
++#include <targeting/common/utilFilter.H>
++#include <devicefw/driverif.H>
++#include <vfs/vfs.H>
++#include <vpd/vpdreasoncodes.H>
++#include <vpd/pvpdenums.H>
++#include <vpd/vpd_if.H>
++#include <i2c/eepromif.H>
++#include <config.h>
++#include "pvpd.H"
++#include "cvpd.H"
++#include "vpd.H"
++
++// ----------------------------------------------
++// Trace definitions
++// ----------------------------------------------
++extern trace_desc_t* g_trac_vpd;
++
++
++// ------------------------
++// Macros for unit testing
++//#define TRACUCOMP(args...)  TRACFCOMP(args)
++#define TRACUCOMP(args...)
++//#define TRACSSCOMP(args...)  TRACFCOMP(args)
++#define TRACSSCOMP(args...)
++
++namespace PVPD
++{
++    // ----------------------------------------------
++    // Globals
++    // ----------------------------------------------
++    mutex_t g_mutex = MUTEX_INITIALIZER;
++
++
++    /**
++     * @brief This function will perform the steps required to do a read from
++     *      the Hostboot PVPD data.
++     *
++     * @param[in] i_opType - Operation Type - See DeviceFW::OperationType in
++     *       driververif.H
++     *
++     * @param[in] i_target - Processor Target device
++     *
++     * @param [in/out] io_buffer - Pointer to the data that was read from
++     *       the target device.  This parameter, when set to NULL, will return
++     *       the keyword size value in io_buflen.
++     *
++     * @param [in/out] io_buflen - Length of the buffer to be read or written
++     *       to/from the target.  This value should indicate the size of the
++     *       io_buffer parameter that has been allocated.  Being returned it
++     *       will indicate the number of valid bytes in the buffer being
++     *       returned. This parameter will contain the size of a keyword when
++     *       the io_buffer parameter is passed in NULL.
++     *
++     * @param [in] i_accessType - Access Type - See DeviceFW::AccessType in
++     *       usrif.H
++     *
++     * @param [in] i_args - This is an argument list for the device driver
++     *       framework.
++     *
++     * @return errlHndl_t - NULL if successful, otherwise a pointer to the
++     *       error log.
++     */
++    errlHndl_t pvpdRead ( DeviceFW::OperationType i_opType,
++                          TARGETING::Target * i_target,
++                          void * io_buffer,
++                          size_t & io_buflen,
++                          int64_t i_accessType,
++                          va_list i_args )
++    {
++        errlHndl_t err = NULL;
++        IpVpdFacade::input_args_t args;
++        args.record = ((pvpdRecord)va_arg( i_args, uint64_t ));
++        args.keyword = ((pvpdKeyword)va_arg( i_args, uint64_t ));
++        args.location = ((VPD::vpdCmdTarget)va_arg( i_args, uint64_t ));
++
++        TRACSSCOMP( g_trac_vpd,
++                    ENTER_MRK"pvpdRead()" );
++
++        err = Singleton<PvpdFacade>::instance().read(i_target,
++                                                     io_buffer,
++                                                     io_buflen,
++                                                     args);
++
++        return err;
++    }
++
++
++    /**
++     * @brief This function will perform the steps required to do a write to
++     *      the Hostboot PVPD data.
++     *
++     * @param[in] i_opType - Operation Type - See DeviceFW::OperationType in
++     *       driververif.H
++     *
++     * @param[in] i_target - Processor Target device
++     *
++     * @param [in/out] io_buffer - Pointer to the data that was read from
++     *       the target device.  It will also be used to contain data to
++     *       be written to the device.
++     *
++     * @param [in/out] io_buflen - Length of the buffer to be read or written
++     *       to/from the target.  This value should indicate the size of the
++     *       io_buffer parameter that has been allocated.  Being returned it
++     *       will indicate the number of valid bytes in the buffer being
++     *       returned.
++     *
++     * @param [in] i_accessType - Access Type - See DeviceFW::AccessType in
++     *       usrif.H
++     *
++     * @param [in] i_args - This is an argument list for the device driver
++     *       framework.
++     *
++     * @return errlHndl_t - NULL if successful, otherwise a pointer to the
++     *       error log.
++     */
++    errlHndl_t pvpdWrite ( DeviceFW::OperationType i_opType,
++                           TARGETING::Target * i_target,
++                           void * io_buffer,
++                           size_t & io_buflen,
++                           int64_t i_accessType,
++                           va_list i_args )
++    {
++        errlHndl_t err = NULL;
++        IpVpdFacade::input_args_t args;
++        args.record = ((pvpdRecord)va_arg( i_args, uint64_t ));
++        args.keyword = ((pvpdKeyword)va_arg( i_args, uint64_t ));
++        args.location = ((VPD::vpdCmdTarget)va_arg( i_args, uint64_t ));
++
++        TRACSSCOMP( g_trac_vpd,
++                    ENTER_MRK"pvpdWrite()" );
++
++
++        err = Singleton<PvpdFacade>::instance().write(i_target,
++                                                      io_buffer,
++                                                      io_buflen,
++                                                      args);
++
++        return err;
++    }
++
++    // Register with the routing code
++    DEVICE_REGISTER_ROUTE( DeviceFW::READ,
++                           DeviceFW::PVPD,
++                           TARGETING::TYPE_NODE,
++                           pvpdRead );
++    DEVICE_REGISTER_ROUTE( DeviceFW::WRITE,
++                           DeviceFW::PVPD,
++                           TARGETING::TYPE_NODE,
++                           pvpdWrite );
++
++}; // end namespace PVPD
++
++#if !defined(__HOSTBOOT_RUNTIME)
++// --------------------------------------------------------
++// Presence Detection
++//---------------------------------------------------------
++
++/**
++ * @brief Performs a presence detect operation on a Node card.
++ *
++ * There is no FSI presence detection, just Planar vpd detection.
++ * Presence is always returned as Success (unless the unlikely case of too
++ * small of a buffer passed). A problem with planar EEPROM is logged but
++ * not passed up so that the enclosure and everything inside is not
++ * deconfigured.
++ *
++ * @param[in]   i_opType        Operation type, see DeviceFW::OperationType
++ *                              in driverif.H
++ * @param[in]   i_target        Presence detect target
++ * @param[in/out] io_buffer     Read: Pointer to output data storage
++ *                              Write: Pointer to input data storage
++ * @param[in/out] io_buflen     Input: size of io_buffer (in bytes, always 1)
++ *                              Output: Success = 1, Failure = 0
++ * @param[in]   i_accessType    DeviceFW::AccessType enum (userif.H)
++ * @param[in]   i_args          This is an argument list for DD framework.
++ *                              In this function, there are no arguments.
++ * @return  errlHndl_t
++ */
++errlHndl_t nodePresenceDetect(DeviceFW::OperationType i_opType,
++                              TARGETING::Target* i_target,
++                              void* io_buffer,
++                              size_t& io_buflen,
++                              int64_t i_accessType,
++                              va_list i_args)
++{
++    errlHndl_t l_errl = NULL;
++    bool pvpd_present = true;
++
++    if (unlikely(io_buflen < sizeof(bool)))
++    {
++        TRACFCOMP(g_trac_vpd,
++                  ERR_MRK "nodePresenceDetect> Invalid data length: %d",
++                  io_buflen);
++        /*@
++         * @errortype
++         * @moduleid     VPD::VPD_PVPD_PRESENCEDETECT
++         * @reasoncode   VPD::VPD_INVALID_LENGTH
++         * @userdata1    Data Length
++         * @devdesc      presenceDetect> Invalid data length (!= 1 bytes)
++         */
++        l_errl =
++                new ERRORLOG::ErrlEntry(ERRORLOG::ERRL_SEV_UNRECOVERABLE,
++                                        VPD::VPD_PVPD_PRESENCEDETECT,
++                                        VPD::VPD_INVALID_LENGTH,
++                                        TO_UINT64(io_buflen),
++                                        true /*SW error*/);
++        io_buflen = 0;
++        return l_errl;
++    }
++
++#if defined(CONFIG_PVPD_READ_FROM_HW) && defined(CONFIG_PVPD_READ_FROM_PNOR)
++    pvpd_present = VPD::pvpdPresent( i_target );
++    if( pvpd_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 (PVPD)" );
++            errlCommit( l_errl, FSI_COMP_ID );
++        }
++    }
++    else
++    {
++        TRACFCOMP(g_trac_vpd,
++                  ERR_MRK "nodePresenceDetect> failed presence detect");
++
++        // Invalidate PVPD in the PNOR
++        l_errl = VPD::invalidatePnorCache(i_target);
++        if (l_errl)
++        {
++            TRACFCOMP( g_trac_vpd, "Error invalidating PVPD in PNOR" );
++            errlCommit( l_errl, VPD_COMP_ID );
++        }
++        pvpd_present = true;
++    }
++#endif
++
++    // Always return presence.
++    // A returned error deconfigures the node and stops the IPL.
++    memcpy(io_buffer, &pvpd_present, sizeof(pvpd_present));
++    io_buflen = sizeof(pvpd_present);
++
++    return NULL;
++}
++
++// Register as the presence detect for nodes.
++DEVICE_REGISTER_ROUTE(DeviceFW::READ,
++                      DeviceFW::PRESENT,
++                      TARGETING::TYPE_NODE,
++                      nodePresenceDetect);
++#endif
++
++bool VPD::pvpdPresent( TARGETING::Target * i_target )
++{
++    TRACSSCOMP( g_trac_vpd, ENTER_MRK"pvpdPresent()");
++#if(defined( CONFIG_PVPD_READ_FROM_HW ) && !defined( __HOSTBOOT_RUNTIME) )
++
++    return EEPROM::eepromPresence( i_target );
++
++#else
++    return Singleton<PvpdFacade>::instance().hasVpdPresent( i_target,
++                                                            PVPD::OPFR,
++                                                            PVPD::VP );
++#endif
++}
++
++
++//PVPD Class Functions
++/**
++ * @brief  Constructor
++ * Planar VPD is included in the Centaur PNOR section.
++ * Including with Centaur vpd minimizes the number of PNOR sections.
++ */
++PvpdFacade::PvpdFacade() :
++IpVpdFacade(CVPD::SECTION_SIZE, // note use of CVPD
++            CVPD::MAX_SECTIONS, // note use of CVPD
++            PVPD::pvpdRecords,
++            (sizeof(PVPD::pvpdRecords)/sizeof(PVPD::pvpdRecords[0])),
++            PVPD::pvpdKeywords,
++            (sizeof(PVPD::pvpdKeywords)/sizeof(PVPD::pvpdKeywords[0])),
++            PNOR::CENTAUR_VPD,  // note use of CVPD
++            PVPD::g_mutex,
++            VPD::VPD_WRITE_PLANAR)
++{
++    TRACUCOMP(g_trac_vpd, "PvpdFacade::PvpdFacade> " );
++
++#ifdef CONFIG_PVPD_READ_FROM_PNOR
++    iv_configInfo.vpdReadPNOR = true;
++#else
++    iv_configInfo.vpdReadPNOR = false;
++#endif
++#ifdef CONFIG_PVPD_READ_FROM_HW
++    iv_configInfo.vpdReadHW = true;
++#else
++    iv_configInfo.vpdReadHW = false;
++#endif
++#ifdef CONFIG_PVPD_WRITE_TO_PNOR
++    iv_configInfo.vpdWritePNOR = true;
++#else
++    iv_configInfo.vpdWritePNOR = false;
++#endif
++#ifdef CONFIG_PVPD_WRITE_TO_HW
++    iv_configInfo.vpdWriteHW = true;
++#else
++    iv_configInfo.vpdWriteHW = false;
++#endif
++}
++
++// Retrun lists of records that should be copied to pnor.
++void PvpdFacade::getRecordLists(
++                const  recordInfo* & o_primaryVpdRecords,
++                uint64_t           & o_primaryRecSize,
++                const  recordInfo* & o_altVpdRecords,
++                uint64_t           & o_altRecSize)
++{
++    // Always return this object's list
++    o_primaryVpdRecords = iv_vpdRecords;
++    o_primaryRecSize = iv_recSize;
++
++    // If the planar eeprom is being shared with a mem buf,
++    // then return the cvpd list as the alternative record list.
++    // At thip point, if the node is be processed, then the mem buffs
++    // might have not been discovered yet. If cvpd is being cached, then
++    // include the cvpd list as the altnative.
++#ifdef CONFIG_CVPD_READ_FROM_PNOR
++    o_altVpdRecords = Singleton<CvpdFacade>::instance().iv_vpdRecords;
++    o_altRecSize = Singleton<CvpdFacade>::instance().iv_recSize;
++#else
++    o_altVpdRecords = NULL;
++    o_altRecSize = 0;
++#endif
++}
++
+diff --git a/src/usr/vpd/pvpd.H b/src/usr/vpd/pvpd.H
+new file mode 100644
+index 0000000..092dd45
+--- /dev/null
++++ b/src/usr/vpd/pvpd.H
+@@ -0,0 +1,149 @@
++/* IBM_PROLOG_BEGIN_TAG                                                   */
++/* This is an automatically generated prolog.                             */
++/*                                                                        */
++/* $Source: src/usr/vpd/pvpd.H $                                          */
++/*                                                                        */
++/* OpenPOWER HostBoot Project                                             */
++/*                                                                        */
++/* Contributors Listed Below - COPYRIGHT 2013,2015                        */
++/* [+] International Business Machines Corp.                              */
++/*                                                                        */
++/*                                                                        */
++/* Licensed under the Apache License, Version 2.0 (the "License");        */
++/* you may not use this file except in compliance with the License.       */
++/* You may obtain a copy of the License at                                */
++/*                                                                        */
++/*     http://www.apache.org/licenses/LICENSE-2.0                         */
++/*                                                                        */
++/* Unless required by applicable law or agreed to in writing, software    */
++/* distributed under the License is distributed on an "AS IS" BASIS,      */
++/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or        */
++/* implied. See the License for the specific language governing           */
++/* permissions and limitations under the License.                         */
++/*                                                                        */
++/* IBM_PROLOG_END_TAG                                                     */
++#ifndef __PVPD_H
++#define __PVPD_H
++
++
++/**
++ * @file pvpd.H
++ *
++ * @brief Provides the interfaces for the PVPD device driver
++ *
++ */
++
++// ----------------------------------------------
++// Includes
++// ----------------------------------------------
++#include <errl/errlentry.H>
++#include <vpd/pvpdenums.H>
++
++#include "ipvpd.H"
++#include <config.h>
++
++namespace PVPD
++{
++
++    /**
++     * @brief Conversion of PVPD Records to corresponding character
++     *        representation.
++     */
++    const IpVpdFacade::recordInfo pvpdRecords[] =
++    {
++        // -------------------------------------------------------------------
++        // NOTE: This list must remain an ordered list!  There will be a
++        //      testcase that checks this.  When adding new entries to the
++        //      list, be sure that the keyword in each entry (value 0)
++        //      are in ascending order.
++        // -------------------------------------------------------------------
++        { VINI, "VINI" },
++        { OSYS, "OSYS" },
++        { OPFR, "OPFR" },
++        { VNDR, "VNDR" },
++        // -------------------------------------------------------------------
++        // DO NOT USE!!  This is for test purposes ONLY!
++        { PVPD_TEST_RECORD, "TEST" },
++        // -------------------------------------------------------------------
++    };
++
++    /**
++     * @brief Conversion of PVPD Keywords to corresponding character
++     *        representation.
++     */
++    const IpVpdFacade::keywordInfo pvpdKeywords[] =
++    {
++        // -------------------------------------------------------------------
++        // NOTE: This list must remain an ordered list!  There will be a
++        //      testcase that checks this.  When adding new entries to
++        //      the list, be sure that the keyword in each entry (value 0)
++        //      are in ascending order.
++        // -------------------------------------------------------------------
++        { pdI, "#I" },
++        { B3,  "B3" },
++        { B4,  "B4" },
++        { B7,  "B7" },
++        { CC,  "CC" },
++        { CE,  "CE" },
++        { CT,  "CT" },
++        { DR,  "DR" },
++        { ET,  "ET" },
++        { FN,  "FN" },
++        { HE,  "HE" },
++        { HW,  "HW" },
++        { IN,  "IN" },
++        { MM,  "MM" },
++        { PF,  "PF" },
++        { PN,  "PN" },
++        { RT,  "RT" },
++        { SN,  "SN" },
++        { SS,  "SS" },
++        { VD,  "VD" },
++        { VN,  "VN" },
++        { VP,  "VP" },
++        { VS,  "VS" },
++        { VZ,  "VZ" },
++
++        // -------------------------------------------------------------------
++        // DO NOT USE!!  This is for test purposes ONLY!
++        { PVPD_TEST_KEYWORD, "XX" },
++        // -------------------------------------------------------------------
++
++        //Common ipvpd
++        { FULL_RECORD, "FL"},
++    };
++
++}; // end PVPD namespace
++
++class PvpdFacade: public IpVpdFacade
++{
++  public:
++
++    /**
++     * @brief Constructor
++     */
++    PvpdFacade( );
++
++  private:
++
++    /**
++     * @brief This function returns a primary and an alternate list of records
++     *       that should be copied to pnor. The Alternate list is optional.
++     *
++     * @param[out] o_primaryVpdRecords - Pointer to array of VPD Records to use
++     *
++     * @param[out] o_primaryRecSize -    Size of o_primaryVpdRecords array
++     *
++     * @param[out] o_altVpdRecords -     Pointer to array of VPD Records to use
++     *
++     * @param[out] o_altRecSize -        Size of o_altVpdRecords array
++     *
++     */
++    void getRecordLists(
++                const  recordInfo* & o_primaryVpdRecords,
++                uint64_t           & o_primaryRecSize,
++                const  recordInfo* & o_altVpdRecords,
++                uint64_t           & o_altRecSize);
++
++};
++#endif  // __PVPD_H
+diff --git a/src/usr/vpd/vpd.C b/src/usr/vpd/vpd.C
+index 9b4e1f8..3656696 100755
+--- a/src/usr/vpd/vpd.C
++++ b/src/usr/vpd/vpd.C
+@@ -34,10 +34,9 @@
+ #include "vpd.H"
+ #include "mvpd.H"
+ #include "cvpd.H"
++#include "pvpd.H"
+ #include "spd.H"
+ 
+-
+-
+ // ----------------------------------------------
+ // Trace definitions
+ // ----------------------------------------------
+@@ -456,6 +455,13 @@ errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target )
+         l_keywordPN = CVPD::VP;
+         l_keywordSN = CVPD::VS;
+     }
++    else if( l_type == TARGETING::TYPE_NODE )
++    {
++        l_ipvpd     = &(Singleton<PvpdFacade>::instance());
++        l_record    = PVPD::OPFR;
++        l_keywordPN = PVPD::VP;
++        l_keywordSN = PVPD::VS;
++    }
+     else if( l_type == TARGETING::TYPE_DIMM )
+     {
+         // SPD does not have a singleton instance
+@@ -487,7 +493,8 @@ errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target )
+     do
+     {
+         // Make sure we are comparing the correct pn/sn for CVPD
+-        if( l_type == TARGETING::TYPE_MEMBUF )
++        if( ( l_type == TARGETING::TYPE_MEMBUF ) ||
++            ( l_type == TARGETING::TYPE_NODE   ) )
+         {
+             bool l_zeroPN;
+             l_err = l_ipvpd->cmpSeepromToZero( i_target,
+@@ -523,6 +530,7 @@ errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target )
+         // Compare the Part Numbers in PNOR/SEEPROM
+         bool l_matchPN = false;
+         if( ( l_type == TARGETING::TYPE_PROC   ) ||
++            ( l_type == TARGETING::TYPE_NODE   ) ||
+             ( l_type == TARGETING::TYPE_MEMBUF ) )
+         {
+             l_err = l_ipvpd->cmpPnorToSeeprom( i_target,
+@@ -577,7 +585,8 @@ errlHndl_t ensureCacheIsInSync ( TARGETING::Target * i_target )
+             HWAS::markTargetChanged(i_target);
+ 
+             // Load the PNOR data from the SEEPROM
+-            if( ( l_type == TARGETING::TYPE_PROC   ) ||
++            if( ( l_type == TARGETING::TYPE_PROC ) ||
++                ( l_type == TARGETING::TYPE_NODE ) ||
+                 ( l_type == TARGETING::TYPE_MEMBUF ) )
+             {
+                 l_err = l_ipvpd->loadPnor( i_target );
+diff --git a/src/usr/vpd/vpd.H b/src/usr/vpd/vpd.H
+index 9c39a7f..e6cada7 100644
+--- a/src/usr/vpd/vpd.H
++++ b/src/usr/vpd/vpd.H
+@@ -50,6 +50,7 @@ enum VPD_MSG_TYPE
+     VPD_WRITE_DIMM    = 0x00C1, //< DIMM SPD
+     VPD_WRITE_PROC    = 0x00C2, //< Processor MVPD
+     VPD_WRITE_MEMBUF  = 0x00C3, //< Centaur FRU VPD
++    VPD_WRITE_PLANAR  = 0x00C4, //< Planar VPD
+ };
+ 
+ /**
+diff --git a/src/usr/vpd/vpd.mk b/src/usr/vpd/vpd.mk
+index 9f85755..65d22e3 100644
+--- a/src/usr/vpd/vpd.mk
++++ b/src/usr/vpd/vpd.mk
+@@ -5,7 +5,9 @@
+ #
+ # OpenPOWER HostBoot Project
+ #
+-# COPYRIGHT International Business Machines Corp. 2013,2014
++# Contributors Listed Below - COPYRIGHT 2013,2015
++# [+] International Business Machines Corp.
++#
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+@@ -24,5 +26,6 @@
+ OBJS += ipvpd.o
+ OBJS += mvpd.o
+ OBJS += cvpd.o
++OBJS += pvpd.o
+ OBJS += spd.o
+ OBJS += errlud_vpd.o
+-- 
+1.8.2.2
+
