diff options
author | Stephen Cprek <smcprek@us.ibm.com> | 2014-02-27 10:32:44 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-03-21 17:28:09 -0500 |
commit | c1b2c3d4d0030b063b06cc553c016351ce096cc3 (patch) | |
tree | 2116b1256c8f7cea10e44ddb5087c5f30d9479c1 /src/usr | |
parent | 3dbe360bc8151fb45938d1843e6b984efeb7e3d9 (diff) | |
download | talos-hostboot-c1b2c3d4d0030b063b06cc553c016351ce096cc3.tar.gz talos-hostboot-c1b2c3d4d0030b063b06cc553c016351ce096cc3.zip |
Add sha512perEC to SBEC and version to WINK
Change-Id: I2e5dadc3b8b8280d8eaa5e7662e9ecbc4dda5d88
RTC: 96020
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9211
Tested-by: Jenkins Server
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: Michael Baiocchi <baiocchi@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r-- | src/usr/pnor/pnorrp.C | 9 | ||||
-rw-r--r-- | src/usr/sbe/sbe_update.C | 15 |
2 files changed, 16 insertions, 8 deletions
diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C index 5c526ce85..e31499c7c 100644 --- a/src/usr/pnor/pnorrp.C +++ b/src/usr/pnor/pnorrp.C @@ -339,7 +339,6 @@ errlHndl_t PnorRP::getSectionInfo( PNOR::SectionId i_section, } } while(0); - if (PNOR::INVALID_SECTION != id) { TRACDCOMP( g_trac_pnor, "PnorRP::getSectionInfo: i_section=%d, id=%d", i_section, iv_TOC[i_section].id ); @@ -349,8 +348,12 @@ errlHndl_t PnorRP::getSectionInfo( PNOR::SectionId i_section, o_info.name = cv_EYECATCHER[id]; o_info.vaddr = iv_TOC[id].virtAddr; o_info.size = iv_TOC[id].size; - o_info.eccProtected = (bool)(iv_TOC[id].integrity & - FFS_INTEG_ECC_PROTECT); + o_info.eccProtected = ((iv_TOC[id].integrity & FFS_INTEG_ECC_PROTECT) + != 0) ? true : false; + o_info.sha512Version = ((iv_TOC[id].version & FFS_VERS_SHA512) + != 0) ? true : false; + o_info.sha512perEC = ((iv_TOC[id].version & FFS_VERS_SHA512_PER_EC) + != 0) ? true : false; } return l_errhdl; diff --git a/src/usr/sbe/sbe_update.C b/src/usr/sbe/sbe_update.C index d1952bc65..84bd69b7d 100644 --- a/src/usr/sbe/sbe_update.C +++ b/src/usr/sbe/sbe_update.C @@ -445,10 +445,10 @@ namespace SBE break; } - // Get SBE PNOR section info from PNOR RP err = PNOR::getSectionInfo( pnorSectionId, pnorInfo ); + if(err) { TRACFCOMP( g_trac_sbe, ERR_MRK"findSBEInPnor: Error calling " @@ -584,11 +584,16 @@ namespace SBE break; } - // The SBE Image for the corresponding EC was found and includes a - // SBE Header, so advance PNOR pointer 4k to move it past header - // page to the start of the non-customized SBE image - o_imgPtr = reinterpret_cast<void*> + // The SBE Image for the corresponding EC was found, check if + // it includes a SBE Header + if (pnorInfo.sha512perEC) + { + TRACFCOMP(g_trac_sbe,INFO_MRK"findSBEInPnor: sha512perEC Found in %s", pnorInfo.name); + // Advance PNOR pointer 4k to move it past header page to the + // start of the non-customized SBE image + o_imgPtr = reinterpret_cast<void*> (reinterpret_cast<char*>(hdr_Ptr)+0x1000); + } if(NULL != o_version) |