diff options
author | Prachi Gupta <pragupta@us.ibm.com> | 2014-10-28 15:41:49 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-01-16 12:34:43 -0600 |
commit | c068f50829ec46e4e5b056064dcbe9d786d549a4 (patch) | |
tree | 36c5fd8f2f6b5d420644ed83b877f6d0d8657f42 /src/include/usr | |
parent | 5412ba2270945edcfb23f60c34de01dccd44c098 (diff) | |
download | talos-hostboot-c068f50829ec46e4e5b056064dcbe9d786d549a4.tar.gz talos-hostboot-c068f50829ec46e4e5b056064dcbe9d786d549a4.zip |
hbrt interface for PNOR access
RTC:108836
Change-Id: I49e568e7f4fcad13fcd75dfdfa4aee8a263c5001
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14307
Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r-- | src/include/usr/pnor/pnor_reasoncodes.H | 23 | ||||
-rw-r--r-- | src/include/usr/pnor/pnorif.H | 30 |
2 files changed, 43 insertions, 10 deletions
diff --git a/src/include/usr/pnor/pnor_reasoncodes.H b/src/include/usr/pnor/pnor_reasoncodes.H index 96483086c..c560e5107 100644 --- a/src/include/usr/pnor/pnor_reasoncodes.H +++ b/src/include/usr/pnor/pnor_reasoncodes.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -42,6 +42,7 @@ namespace PNOR MOD_PNORRP_READFROMDEVICE = 0x07, /**< PnorRP::readFromDevice */ MOD_PNORRP_WRITETODEVICE = 0x08, /**< PnorRP::writeToDevice */ MOD_PNORRP_DIDSTARTUPFAIL = 0x09, /**< didStartupFail(rc) */ + MOD_PNORRP_FLUSH = 0x0A, /**< mm_remove_pages */ // pnorvalid.C MOD_PNORVALID_MAIN = 0x0E, /**< validateAltMaster */ @@ -81,6 +82,15 @@ namespace PNOR // nor_micron.C MOD_NORMICRON_MICRONFLAGSTATUS = 0xA0, /**< micronFlagStatus */ + + //rt_pnor.C + MOD_RTPNOR_GETSECTIONINFO = 0xB0, /**< RtPnor::getSectionInfo*/ + MOD_RTPNOR_FLUSH = 0xB1, /**< RtPnor::flush */ + MOD_RTPNOR_READFROMDEVICE = 0xB2, /**< RtPnor::readFromDevice */ + MOD_RTPNOR_WRITETODEVICE = 0xB3, /**< RtPnor::writeToDevice */ + + //pnor_common.C + MOD_PNORCOMMON_PARSETOC = 0xC0, /**< PNOR::parseTOC */ }; enum PNORReasonCode @@ -113,6 +123,17 @@ namespace PNOR RC_PNOR_INIT_FAILURE = PNOR_COMP_ID | 0x13, RC_CANNOT_ENABLE_WRITES = PNOR_COMP_ID | 0x14, RC_SFC_TIMEOUT = PNOR_COMP_ID | 0x15, + RC_PNOR_READ_FAILED = PNOR_COMP_ID | 0x16, + RC_PNOR_WRITE_FAILED = PNOR_COMP_ID | 0x17, + RC_CORRUPTED_TOCS = PNOR_COMP_ID | 0x18, + RC_BAD_TOC_HEADER = PNOR_COMP_ID | 0x19, + RC_SECTION_SIZE_IS_BIG = PNOR_COMP_ID | 0x1A, + RC_RTPNOR_INVALID_SECTION = PNOR_COMP_ID | 0x1B, + RC_UNCORRECTABLE_ECC = PNOR_COMP_ID | 0x1C, + RC_SECTION_SIZE_IS_ZERO = PNOR_COMP_ID | 0x1D, + RC_MM_REMOVE_PAGES_FAILED = PNOR_COMP_ID | 0x1E, + RC_PNOR_READ_NOT_SUPPORTED = PNOR_COMP_ID | 0x1F, + RC_PNOR_WRITE_NOT_SUPPORTED = PNOR_COMP_ID | 0x20, }; enum UserDetailsTypes diff --git a/src/include/usr/pnor/pnorif.H b/src/include/usr/pnor/pnorif.H index cfda3aeb2..6395301a9 100644 --- a/src/include/usr/pnor/pnorif.H +++ b/src/include/usr/pnor/pnorif.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -74,13 +74,14 @@ enum SectionId // Size and layout of this structure must be maintained for debug framework. struct SectionInfo_t { - SectionId id; /**< Identifier for this section */ - const char* name; /**< Name of the section */ - uint64_t vaddr; /**< Virtual address for the start of the section */ - uint64_t size; /**< Size of partition in bytes */ + SectionId id; /**< Identifier for this section */ + const char* name; /**< Name of the section */ + uint64_t vaddr; /**< Virtual address of the start of the section */ + uint32_t flashAddr; /**< Flash address of the start of the section*/ + uint64_t size; /**< Size of partition in bytes */ bool eccProtected; /**< Section is ECC protected */ bool sha512Version; /**< Version Checking */ - bool sha512perEC; /**< Version Checking perEC */ + bool sha512perEC; /**< Version Checking perEC */ }; /** @@ -93,7 +94,15 @@ struct SectionInfo_t */ errlHndl_t getSectionInfo( SectionId i_section, SectionInfo_t& o_info ); - +/** + * @brief Write the data back from hostboot memory to PNOR of a given section + * of PNOR + * + * @param[in] i_section PNOR section + * + * @return errlHndl_t Error log if request was invalid + */ +errlHndl_t flush (SectionId i_section); /** * @brief Informs caller if PNORDD is using * L3 Cache for fake PNOR or not. @@ -115,8 +124,11 @@ errlHndl_t validateAltMaster( void ); /** @brief PNOR::TEST section offsets for test cases to prevent * concurrency problems */ -const uint32_t pnorTestSec_readwrite_offset = 0x100; -const uint32_t pnorTestSec_smartwrite_offset = 0x120; +enum TestSectionOffset{ + pnorTestSec_readwrite_offset = 0x100, + pnorTestSec_smartwrite_offset = 0x120, + pnorTestSec_rt_readwrite_offset = 0x6000, +}; } |