Skip to content

Commit

Permalink
Dumping full vpd into HDAT
Browse files Browse the repository at this point in the history
Change-Id: I34f5ce9d702818254d44a0dd979b277b75ebc861
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35711
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-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>
  • Loading branch information
nagendraIBM authored and wghoffa committed Feb 6, 2017
1 parent fea19a9 commit b9fd10a
Show file tree
Hide file tree
Showing 17 changed files with 546 additions and 84 deletions.
4 changes: 3 additions & 1 deletion src/include/usr/hdat/hdat_reasoncodes.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -103,6 +103,8 @@ enum HDATModuleId
MOD_HBRT_LOAD_DATA = 0x2c,
MOD_UTIL_FULL_MVPD_READ_FUNC = 0x2d,
MOD_HDAT_SPSUBSYS_FILL_DATA_PTRS = 0x2e,
MOD_UTIL_PVPD_FULL_READ_FUNC = 0x2f,
MOD_UTIL_MVPD = 0x30,
};


Expand Down
1 change: 0 additions & 1 deletion src/include/usr/vpd/cvpdenums.H
Expand Up @@ -131,7 +131,6 @@ namespace CVPD
pd6 = 0x44, //#6
pd8 = 0x45, //#8
pdY = 0x46, //#Y
RT = 0x47,

// Last Keyword
CVPD_LAST_KEYWORD,
Expand Down
1 change: 0 additions & 1 deletion src/include/usr/vpd/mvpdenums.H
Expand Up @@ -123,7 +123,6 @@ enum mvpdKeyword
L6 = 0x28,
L7 = 0x29,
L8 = 0x2A,
RT = 0x2B,

// Last Keyword
MVPD_LAST_KEYWORD,
Expand Down
70 changes: 6 additions & 64 deletions src/usr/hdat/hdatbldda.C
Expand Up @@ -46,72 +46,13 @@

namespace HDAT
{
/*----------------------------------------------------------------------------*/
/* Global variables */
/*----------------------------------------------------------------------------*/



/*----------------------------------------------------------------------------*/
/* Constants */
/*----------------------------------------------------------------------------*/

// Backplane keyword and record details
static vpdData pvpdData[] =
{
{ PVPD::VINI, PVPD::RT },
{ PVPD::VINI, PVPD::DR },
{ PVPD::VINI, PVPD::CE },
{ PVPD::VINI, PVPD::VZ },
{ PVPD::VINI, PVPD::FN },
{ PVPD::VINI, PVPD::SN },
{ PVPD::VINI, PVPD::CC },
{ PVPD::VINI, PVPD::HE },
{ PVPD::VINI, PVPD::CT },
{ PVPD::VINI, PVPD::B3 },
{ PVPD::VINI, PVPD::B4 },
{ PVPD::VINI, PVPD::B7 },
{ PVPD::VINI, PVPD::PF },
{ PVPD::OPFR, PVPD::RT },
{ PVPD::OPFR, PVPD::VP },
{ PVPD::OPFR, PVPD::VS },
{ PVPD::OPFR, PVPD::DR },
{ PVPD::OPFR, PVPD::VN },
{ PVPD::OSYS, PVPD::RT },
{ PVPD::OSYS, PVPD::MM },
{ PVPD::OSYS, PVPD::SS },
};
const HdatKeywordInfo l_pvpdKeywords[] =
{
{ PVPD::RT, "RT" },
{ PVPD::DR, "DR" },
{ PVPD::CE, "CE" },
{ PVPD::VZ, "VZ" },
{ PVPD::FN, "FN" },
{ PVPD::SN, "SN" },
{ PVPD::CC, "CC" },
{ PVPD::HE, "HE" },
{ PVPD::CT, "CT" },
{ PVPD::B3, "B3" },
{ PVPD::B4, "B4" },
{ PVPD::B7, "B7" },
{ PVPD::PF, "PF" },
{ PVPD::VP, "VP" },
{ PVPD::VS, "VS" },
{ PVPD::DR, "DR" },
{ PVPD::VN, "VN" },
{ PVPD::MM, "MM" },
{ PVPD::SS, "SS" },
};



/**
* @brief See the prologue in hdatbldda.H
*/
errlHndl_t hdatProcessFru(const hdatMsAddr_t &i_msAddr,
const hdatSpiraDataAreas i_dataArea,
struct vpdData i_fetchVpd[],
const IpVpdFacade::recordInfo i_fetchVpd[],
const uint8_t i_size,
vpdType i_vpdtype,
uint32_t &o_count,
Expand Down Expand Up @@ -175,6 +116,7 @@ errlHndl_t hdatProcessFru(const hdatMsAddr_t &i_msAddr,
if (NULL == l_errlHndl)
{
uint32_t l_num = i_size/sizeof (i_fetchVpd[0]);
l_num -= 1 ; // The last record is TEST record.which shouldn't be used.

assert((l_targList[l_cnt]->tryGetAttr<TARGETING::ATTR_SLCA_RID>
(l_hdatRID)));
Expand All @@ -187,7 +129,7 @@ errlHndl_t hdatProcessFru(const hdatMsAddr_t &i_msAddr,
l_cnt,
i_vpdtype,
i_fetchVpd,
l_num,l_pvpdKeywords);
l_num);


if (NULL == l_errlHndl)
Expand Down Expand Up @@ -244,7 +186,7 @@ errlHndl_t hdatBldSpecificVpd(hdatSpiraDataAreas i_dataArea,
HDAT_ENTER();

errlHndl_t l_errlHndl = NULL;
struct vpdData *l_data = NULL;
const IpVpdFacade::recordInfo *l_data = NULL;
vpdType l_type = BP;
uint8_t l_size = 0;

Expand All @@ -255,8 +197,8 @@ errlHndl_t hdatBldSpecificVpd(hdatSpiraDataAreas i_dataArea,
{
case HDAT_BACKPLANE_VPD:
case HDAT_SYS_VPD:
l_data = pvpdData;
l_size = sizeof(pvpdData);
l_data = pvpdRecords;
l_size = sizeof(pvpdRecords);
l_type = BP;
break;

Expand Down
10 changes: 8 additions & 2 deletions src/usr/hdat/hdatbldda.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016 */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -42,6 +42,12 @@
#include "hdatvpd.H"
#include <errl/errlentry.H> // ErrlEntry class definition
#include <hdat/hdat_reasoncodes.H>
#include <../vpd/mvpd.H>
#include <../vpd/ipvpd.H>
#include <../vpd/pvpd.H>
using namespace MVPD;
using namespace PVPD;
using namespace IPVPD;

namespace HDAT
{
Expand Down Expand Up @@ -142,7 +148,7 @@ errlHndl_t hdatBldSpecificVpd(hdatSpiraDataAreas i_dataArea,
*/
errlHndl_t hdatProcessFru(const hdatMsAddr_t &i_msAddr,
const hdatSpiraDataAreas i_dataArea,
struct vpdData i_fetchVpd[],
const IpVpdFacade::recordInfo i_fetchVpd[],
const uint8_t i_size,
vpdType i_vpdtype,
uint32_t &o_count,
Expand Down
2 changes: 0 additions & 2 deletions src/usr/hdat/hdatiohub.C
Expand Up @@ -39,7 +39,6 @@ namespace HDAT

vpdData mvpdData[] =
{
{ PVPD::VINI, PVPD::RT },
{ PVPD::VINI, PVPD::DR },
{ PVPD::VINI, PVPD::CE },
{ PVPD::VINI, PVPD::VZ },
Expand All @@ -58,7 +57,6 @@ vpdData mvpdData[] =

const HdatKeywordInfo l_pvpdKeywords[] =
{
{ PVPD::RT, "RT" },
{ PVPD::DR, "DR" },
{ PVPD::CE, "CE" },
{ PVPD::VZ, "VZ" },
Expand Down
2 changes: 0 additions & 2 deletions src/usr/hdat/hdatmsarea.C
Expand Up @@ -50,7 +50,6 @@ uint32_t HdatMsArea::cv_actualCnt;

static vpdData cvpdData[] =
{
{ MVPD::VINI, MVPD::RT },
{ MVPD::VINI, MVPD::DR },
{ MVPD::VINI, MVPD::FN },
{ MVPD::VINI, MVPD::PN },
Expand All @@ -68,7 +67,6 @@ static vpdData cvpdData[] =

const HdatKeywordInfo l_cvpdKeywords[] =
{
{ CVPD::RT, "RT" },
{ CVPD::DR, "DR" },
{ CVPD::FN, "FN" },
{ CVPD::PN, "PN" },
Expand Down
2 changes: 0 additions & 2 deletions src/usr/hdat/hdatpcrd.C
Expand Up @@ -47,7 +47,6 @@ extern trace_desc_t *g_trac_hdat;
*/
vpdData procVpdData[] =
{
{ MVPD::VINI, MVPD::RT },
{ MVPD::VINI, MVPD::DR },
{ MVPD::VINI, MVPD::VZ },
{ MVPD::VINI, MVPD::CC },
Expand All @@ -63,7 +62,6 @@ vpdData procVpdData[] =

const HdatKeywordInfo l_mvpdKeywords[] =
{
{ MVPD::RT, "RT" },
{ MVPD::DR, "DR" },
{ MVPD::VZ, "VZ" },
{ MVPD::CC, "CC" },
Expand Down
1 change: 0 additions & 1 deletion src/usr/hdat/hdatram.C
Expand Up @@ -49,7 +49,6 @@ uint32_t HdatRam::cv_actualCnt;

vpdData cvpdData[] =
{
{ CVPD::VINI, CVPD::RT },
{ CVPD::VINI, CVPD::DR },
{ CVPD::VINI, CVPD::FN },
{ CVPD::VINI, CVPD::PN },
Expand Down
2 changes: 0 additions & 2 deletions src/usr/hdat/hdatspsubsys.C
Expand Up @@ -61,7 +61,6 @@ uint32_t HdatSpSubsys::cv_actualCnt;

vpdData mvpdDataTable[] =
{
{ MVPD::VINI, MVPD::RT },
{ MVPD::VINI, MVPD::DR },
{ MVPD::VINI, MVPD::VZ },
{ MVPD::VINI, MVPD::CC },
Expand All @@ -77,7 +76,6 @@ vpdData mvpdDataTable[] =

const HdatKeywordInfo l_mvpdKeywords[] =
{
{ MVPD::RT, "RT" },
{ MVPD::DR, "DR" },
{ MVPD::VZ, "VZ" },
{ MVPD::CC, "CC" },
Expand Down

0 comments on commit b9fd10a

Please sign in to comment.