diff options
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/isteps/pm/pm_common.C | 44 | ||||
-rw-r--r-- | src/usr/util/utillidpnor.H | 13 |
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 |