Skip to content

Commit

Permalink
Grab RINGOVD data on FSP systems from lid
Browse files Browse the repository at this point in the history
Change-Id: Ic6acf3e0785d00618a75023a38b26bca4d77b5ed
RTC: 171484
CMVC-Prereq: 1027252
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42623
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
mderkse1 authored and dcrowell77 committed Jul 10, 2017
1 parent 8d8d4ea commit c623059
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 25 deletions.
1 change: 1 addition & 0 deletions src/include/usr/util/utillidmgr.H
Expand Up @@ -51,6 +51,7 @@ enum LidId
// Hcode Reference Image LIDs
NIMBUS_HCODE_LIDID = 0x81e00602,
CUMULUS_HCODE_LIDID = 0x81e00603,
HWREFIMG_RINGOVD_LIDID = 0x81e00620,
};

}
Expand Down
44 changes: 25 additions & 19 deletions src/usr/isteps/pm/pm_common.C
Expand Up @@ -96,6 +96,7 @@ namespace HBPM

std::shared_ptr<UtilLidMgr> g_pOccLidMgr (nullptr);
std::shared_ptr<UtilLidMgr> g_pHcodeLidMgr (nullptr);
std::shared_ptr<UtilLidMgr> g_pRingOvdLidMgr (nullptr);

/**
* @brief Convert HOMER physical address space to a vitual address
Expand Down Expand Up @@ -1049,50 +1050,55 @@ namespace HBPM
do {
io_overrideImg = nullptr;

#ifdef __HOSTBOOT_RUNTIME
break;
#endif
uint32_t l_lidId = Util::HWREFIMG_RINGOVD_LIDID;
if(g_pRingOvdLidMgr.get() == nullptr)
{
g_pRingOvdLidMgr = std::shared_ptr<UtilLidMgr>
(new UtilLidMgr(l_lidId));
}
void* l_pImageIn = nullptr;
size_t l_lidImageSize = 0;

PNOR::SectionInfo_t l_pnorRingOvd;
l_err = PNOR::getSectionInfo(PNOR::RINGOVD, l_pnorRingOvd);
if(l_err)
l_err = g_pRingOvdLidMgr->getStoredLidImage(l_pImageIn,
l_lidImageSize);
if (l_err)
{
delete l_err;
l_err = NULL;
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
INFO_MRK"getRingOvd(): RINGOVD section not found or "
"is blocked in secure mode. it is optional");
ERR_MRK"getRingOvd: get stored LID image failed!");
l_err->collectTrace("ISTEPS_TRACE",256);
l_err->collectTrace(FAPI_TRACE_NAME,256);
l_err->collectTrace(FAPI_IMP_TRACE_NAME,256);
break;
}
if(l_pnorRingOvd.size == 0)

if((l_lidImageSize == 0) || (l_pImageIn == nullptr))
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
INFO_MRK"getRingOvd(): RINGOVD section is empty in PNOR");
INFO_MRK"getRingOvd(): RINGOVD section is empty");
break;
}

TRACDBIN( ISTEPS_TRACE::g_trac_isteps_trace,
"getRingOvd():100 bytes of RINGOVD section",
(void *)l_pnorRingOvd.vaddr,100);
l_pImageIn, 100);

// If first 8 bytes are just FF's then we know there's no override
if((*(static_cast<uint64_t *>((void *)l_pnorRingOvd.vaddr))) ==
0xFFFFFFFFFFFFFFFF)
if((*(static_cast<uint64_t *>(l_pImageIn))) == 0xFFFFFFFFFFFFFFFF )
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
INFO_MRK"getRingOvd():No overrides in RINGOVD section "
"found");
INFO_MRK"getRingOvd():No overrides in RINGOVD section "
"found");
break;
}

TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
INFO_MRK"getRingOvd():Found valid ring overrides");
io_overrideImg = reinterpret_cast<void*>(l_pnorRingOvd.vaddr);
io_overrideImg = l_pImageIn;

}while(0);

return l_err;
}
} // end getRingOvd

} // end HBPM namespace

13 changes: 7 additions & 6 deletions src/usr/util/utillidpnor.H
Expand Up @@ -57,11 +57,12 @@ bool cmpLidToPnor (const std::pair<uint32_t, PNOR::SectionId> p1,
const std::pair<uint32_t, PNOR::SectionId>
lidToPnor[] =
{
std::make_pair(Util::TEST_LIDID, PNOR::TESTRO), // 0x00000111
std::make_pair(Util::OCC_LIDID, PNOR::OCC), // 0x81e00430
std::make_pair(Util::WOF_LIDID, PNOR::WOFDATA), // 0x81e00440
std::make_pair(Util::NIMBUS_HCODE_LIDID, PNOR::HCODE), // 0x81e00602
std::make_pair(Util::CUMULUS_HCODE_LIDID, PNOR::HCODE) // 0x81e00603
std::make_pair(Util::TEST_LIDID, PNOR::TESTRO), // 0x00000111
std::make_pair(Util::OCC_LIDID, PNOR::OCC), // 0x81e00430
std::make_pair(Util::WOF_LIDID, PNOR::WOFDATA), // 0x81e00440
std::make_pair(Util::NIMBUS_HCODE_LIDID, PNOR::HCODE), // 0x81e00602
std::make_pair(Util::CUMULUS_HCODE_LIDID, PNOR::HCODE), // 0x81e00603
std::make_pair(Util::HWREFIMG_RINGOVD_LIDID, PNOR::RINGOVD)// 0x81e00620
};

// Size of lidToPnor[]
Expand All @@ -70,4 +71,4 @@ const size_t NUM_LID_TO_PNOR = ( sizeof(lidToPnor) /

}

#endif
#endif

0 comments on commit c623059

Please sign in to comment.