summaryrefslogtreecommitdiffstats
path: root/src/usr/pnor/pnorrp.H
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2014-11-14 14:39:53 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-02-02 13:37:42 -0600
commit67c5a1ebe73f81bca1bb6608bbb8f204f0f37fa8 (patch)
tree2770690ea72f29f51ff7db676178474a25b9ced0 /src/usr/pnor/pnorrp.H
parentf0d809efddca10be40e2e5b7a60e8c5106522c31 (diff)
downloadtalos-hostboot-67c5a1ebe73f81bca1bb6608bbb8f204f0f37fa8.tar.gz
talos-hostboot-67c5a1ebe73f81bca1bb6608bbb8f204f0f37fa8.zip
Support for Redundant Copy of HB code in PNOR
- 2 TOC's per side - side, sideless, preserved, and readOnly tags - Determine which SEEPROM side HB booted from - Modify gaurd code to not run when gaurd section DNE Change-Id: I62dd27c9aa79c3111d27e647f1b66a7c938ad6e8 RTC:109398 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14629 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/pnor/pnorrp.H')
-rw-r--r--src/usr/pnor/pnorrp.H26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/usr/pnor/pnorrp.H b/src/usr/pnor/pnorrp.H
index 3703afe8a..509cf1436 100644
--- a/src/usr/pnor/pnorrp.H
+++ b/src/usr/pnor/pnorrp.H
@@ -76,9 +76,18 @@ class PnorRP
*/
errlHndl_t fixECC(PNOR::SectionId i_section);
+ /**
+ * @brief Get TOC offset of specified TOC on active side
+ *
+ * @param[in] i_toc TOC offset desired on active side
+ *
+ * @return uint64_t TOC offset
+ */
+ uint64_t getTocOffset(PNOR::TOCS i_toc) const;
+
protected:
/**
- * @brief Constructor
+ * @brief Constructor, default TOC offsets to side A
*/
PnorRP();
@@ -89,16 +98,23 @@ class PnorRP
private:
+
+ // TOC 0 and 1 offsets of both PNOR sides. The active PNOR side determined
+ // by the Seeprom the SBE booted from
+ std::pair<uint64_t, uint64_t> iv_activeTocOffsets;
+ std::pair<uint64_t, uint64_t> iv_altTocOffsets;
+
enum
{
BASE_VADDR = VMM_VADDR_PNOR_RP, /**< 2GB = 0x80000000*/
TOTAL_SIZE = 64*MEGABYTE, /**< Allocate 64 MB (0x4000000)*/
LAST_VADDR = BASE_VADDR + TOTAL_SIZE, /**< End of our VA range */
};
+
/**
* Which TOC (0 or 1) is used after verifying both.
*/
- uint32_t iv_TOC_used;
+ PNOR::TOCS iv_TOC_used;
/**
* Flash statistics
@@ -138,7 +154,8 @@ class PnorRP
/**
* @brief Verify both TOC's and store section information from one of the
- * verified TOC's
+ * verified TOC's. Additionally set each section permissions
+ * (e.g. readOnly)
*
* @return Error from device
*/
@@ -224,7 +241,6 @@ class PnorRP
return false;
};
-
// allow local helper function to call private methods
friend void* wait_for_message( void* unused );
@@ -237,7 +253,7 @@ class PnorRP
friend errlHndl_t PNOR::validateAltMaster( void );
/**
- * @brief Static instance function for testcase only
+ * @brief Static instance function
*/
static PnorRP& getInstance();
};
OpenPOWER on IntegriCloud