summaryrefslogtreecommitdiffstats
path: root/src/usr/pnor/pnorrp.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/pnor/pnorrp.C')
-rw-r--r--src/usr/pnor/pnorrp.C25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C
index 1df1f7001..c9a5e5336 100644
--- a/src/usr/pnor/pnorrp.C
+++ b/src/usr/pnor/pnorrp.C
@@ -96,6 +96,14 @@ errlHndl_t PNOR::getSectionInfo( PNOR::SectionId i_section,
}
/**
+ * @brief Returns whether a given section is available or not
+ */
+bool PNOR::isSectionAvailable(const PNOR::SectionId i_section)
+{
+ return Singleton<PnorRP>::instance().isSectionAvailable(i_section);
+}
+
+/**
* @brief Clear pnor section
*/
errlHndl_t PNOR::clearSection(PNOR::SectionId i_section)
@@ -395,6 +403,23 @@ errlHndl_t PnorRP::getSideInfo( PNOR::SideId i_side,
}
/**
+ * @brief Returns whether a given section is available or not
+ */
+bool PnorRP::isSectionAvailable(const PNOR::SectionId i_section)
+{
+ bool available = false;
+ uint64_t rc = 0;
+ if( (!didStartupFail(rc))
+ && (i_section < PNOR::NUM_SECTIONS)
+ && (!isInhibitedSection(i_section))
+ && (iv_TOC[i_section].size != 0))
+ {
+ available = true;
+ }
+ return available;
+}
+
+/**
* @brief Return the size and address of a given section of PNOR data
*/
errlHndl_t PnorRP::getSectionInfo( PNOR::SectionId i_section,
OpenPOWER on IntegriCloud