summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2017-06-22 12:04:19 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-07-10 12:24:45 -0400
commitc623059686ee2da857b2db64f3a0c85664213420 (patch)
tree692acc70b4f927b2b2aa1be86a45b326d38b8708 /src/usr
parent8d8d4eae265c2f9ae6443a7f252231d9362ce5f4 (diff)
downloadtalos-hostboot-c623059686ee2da857b2db64f3a0c85664213420.tar.gz
talos-hostboot-c623059686ee2da857b2db64f3a0c85664213420.zip
Grab RINGOVD data on FSP systems from lid
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>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/isteps/pm/pm_common.C44
-rw-r--r--src/usr/util/utillidpnor.H13
2 files changed, 32 insertions, 25 deletions
diff --git a/src/usr/isteps/pm/pm_common.C b/src/usr/isteps/pm/pm_common.C
index 5a5189aad..995686747 100644
--- a/src/usr/isteps/pm/pm_common.C
+++ b/src/usr/isteps/pm/pm_common.C
@@ -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
@@ -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
diff --git a/src/usr/util/utillidpnor.H b/src/usr/util/utillidpnor.H
index acec01462..f4da469dc 100644
--- a/src/usr/util/utillidpnor.H
+++ b/src/usr/util/utillidpnor.H
@@ -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[]
@@ -70,4 +71,4 @@ const size_t NUM_LID_TO_PNOR = ( sizeof(lidToPnor) /
}
-#endif \ No newline at end of file
+#endif
OpenPOWER on IntegriCloud