summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2017-08-28 11:39:53 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-09-08 15:55:03 -0400
commit513299a5b565b066816fe31b1ba224f8d195ca27 (patch)
treef54948083ef5a77eed53229160f2c842f4d4d46c /src/usr
parent948bff49730d59eb2c84c545b5fcec157b08bfbb (diff)
downloadtalos-hostboot-513299a5b565b066816fe31b1ba224f8d195ca27.tar.gz
talos-hostboot-513299a5b565b066816fe31b1ba224f8d195ca27.zip
Re-enable OCC parition in pnor
Additional Changes - Created isEmpty check for pnor sections to handle lack of FSP support when loading Lids - Removed not needed PNOR partitions from FSP layout Change-Id: I326831a1b389ef25b6f5f557d332c74f3b5e77d8 RTC:178164 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45251 Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> 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: 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/pnor/pnor_common.C33
-rw-r--r--src/usr/runtime/populate_hbruntime.C12
-rw-r--r--src/usr/util/runtime/utillidmgr_rt.C8
-rw-r--r--src/usr/util/utillidpnor.C11
4 files changed, 48 insertions, 16 deletions
diff --git a/src/usr/pnor/pnor_common.C b/src/usr/pnor/pnor_common.C
index 20d6bd760..3b0195756 100644
--- a/src/usr/pnor/pnor_common.C
+++ b/src/usr/pnor/pnor_common.C
@@ -533,3 +533,36 @@ errlHndl_t PNOR::hasKnownHeader(
return pError;
}
+// @TODO CQ:SW400352 remove function
+bool PNOR::isSectionEmpty(const PNOR::SectionId i_section)
+{
+ errlHndl_t l_errhdl = nullptr;
+ bool l_result = true;
+
+ PNOR::SectionInfo_t l_sectionInfo;
+ l_errhdl = PNOR::getSectionInfo( i_section, l_sectionInfo );
+ if (l_errhdl)
+ {
+ // If section is not in PNOR, just delete error and return false
+ delete l_errhdl;
+ l_errhdl = nullptr;
+ }
+ else
+ {
+ std::array<uint8_t,PAGESIZE> empty_buffer{};
+ // Empty ECC sections are filled with 0xFF's to ensure good ECC
+ if (l_sectionInfo.eccProtected)
+ {
+ empty_buffer.fill(0xFF);
+ }
+
+ l_result = memcmp(&empty_buffer,
+ reinterpret_cast<uint8_t*>(l_sectionInfo.vaddr),
+ sizeof(empty_buffer)) ==0;
+ }
+
+ TRACFCOMP(g_trac_pnor, "PNOR::isSectionEmpty: i_section=%s isSectionEmpty=%d",
+ PNOR::SectionIdToString(i_section), l_result);
+
+ return l_result;
+}
diff --git a/src/usr/runtime/populate_hbruntime.C b/src/usr/runtime/populate_hbruntime.C
index 450ff22fd..b4af2f3d6 100644
--- a/src/usr/runtime/populate_hbruntime.C
+++ b/src/usr/runtime/populate_hbruntime.C
@@ -1169,15 +1169,11 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId)
// -- HCODE
// -- Non-verified Images
/// -- RINGOVD
- // @TODO RTC:178164 add OCC PNOR support for fsp back
- if (!INITSERVICE::spBaseServicesEnabled())
+ l_elog = hbResvLoadSecureSection(PNOR::OCC, i_nodeId,
+ l_prevDataAddr, l_prevDataSize);
+ if (l_elog)
{
- l_elog = hbResvLoadSecureSection(PNOR::OCC, i_nodeId,
- l_prevDataAddr, l_prevDataSize);
- if (l_elog)
- {
- break;
- }
+ break;
}
l_elog = hbResvLoadSecureSection(PNOR::WOFDATA, i_nodeId,
l_prevDataAddr, l_prevDataSize);
diff --git a/src/usr/util/runtime/utillidmgr_rt.C b/src/usr/util/runtime/utillidmgr_rt.C
index 2fe72d655..cbaaac3fa 100644
--- a/src/usr/util/runtime/utillidmgr_rt.C
+++ b/src/usr/util/runtime/utillidmgr_rt.C
@@ -327,14 +327,6 @@ const uint32_t * UtilLidMgr::getLidList(size_t * o_num)
bool UtilLidMgr::lidInHbResvMem(const uint32_t i_lidId) const
{
- // @TODO RTC:178164 Remove this and add OCC PNOR support for fsp back
- // hostboot could not verify it from pnor, so it is not in hb resv meomory
- if (iv_spBaseServicesEnabled &&
- (i_lidId == Util::OCC_LIDID || i_lidId == Util::OCC_CONTAINER_LIDID))
- {
- return false;
- }
-
return i_lidId == Util::OCC_LIDID ||
i_lidId == Util::OCC_CONTAINER_LIDID ||
i_lidId == Util::WOF_LIDID ||
diff --git a/src/usr/util/utillidpnor.C b/src/usr/util/utillidpnor.C
index 1545ffc57..48381e0d7 100644
--- a/src/usr/util/utillidpnor.C
+++ b/src/usr/util/utillidpnor.C
@@ -106,6 +106,7 @@ bool UtilLidMgr::getLidPnorSectionInfo(uint32_t i_lidId,
// Search if a lid id maps to pnor section
auto l_secId = Util::getLidPnorSection(static_cast<Util::LidId>(i_lidId));
+ do {
// LidToPnor will return INVALID_SECITON if no mapping found
if (l_secId == PNOR::INVALID_SECTION)
{
@@ -156,7 +157,17 @@ bool UtilLidMgr::getLidPnorSectionInfo(uint32_t i_lidId,
}
#endif
#endif
+ // @TODO CQ:SW400352 remove this check
+ if ((l_secId == PNOR::OCC) && PNOR::isSectionEmpty(l_secId))
+ {
+ UTIL_FT("UtilLidMgr::getLidPnorSection PNOR section %s is empty get data from LID transfer",
+ PNOR::SectionIdToString(l_secId));
+ l_lidInPnor = false;
+ break;
+ }
}
}
+ } while(0);
+
return l_lidInPnor;
} \ No newline at end of file
OpenPOWER on IntegriCloud