summaryrefslogtreecommitdiffstats
path: root/src/usr/pnor
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2013-10-23 09:41:49 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-10-25 13:26:55 -0500
commit9cd34b6ba83aad88ba54aad529f1a46aa8f20189 (patch)
tree724cafa90db89a42e36410336d2fe1e6dce3fe1c /src/usr/pnor
parent5d810f0d2954e068f8bf1dddb6741a843230cda3 (diff)
downloadtalos-hostboot-9cd34b6ba83aad88ba54aad529f1a46aa8f20189.tar.gz
talos-hostboot-9cd34b6ba83aad88ba54aad529f1a46aa8f20189.zip
Add version header to extended image
Change-Id: Iac1cbae0d9c7ecf74cc1d5f4b28cf5a56f24b5f2 RTC: 80985 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/6858 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/pnor')
-rw-r--r--src/usr/pnor/pnorrp.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/usr/pnor/pnorrp.C b/src/usr/pnor/pnorrp.C
index dd782058f..3d859c48b 100644
--- a/src/usr/pnor/pnorrp.C
+++ b/src/usr/pnor/pnorrp.C
@@ -440,6 +440,7 @@ errlHndl_t PnorRP::readTOC()
//Walk through all the entries in the table and parse the data.
ffs_entry* cur_entry = (l_ffs_hdr->entries);
+
for(uint32_t i=0; i<l_ffs_hdr->entry_count; i++)
{
TRACUCOMP(g_trac_pnor, "PnorRp::readTOC: Entry %d, name=%s, pointer=0x%X", i, cur_entry->name, (uint64_t)cur_entry);
@@ -489,6 +490,22 @@ errlHndl_t PnorRP::readTOC()
iv_TOC[cur_side][secId].version = ffsUserData->verCheck;
iv_TOC[cur_side][secId].misc = ffsUserData->miscFlags;
+ TRACFCOMP(g_trac_pnor, "PnorRp::readTOC: User Data %s", cur_entry->name);
+ TRACFBIN(g_trac_pnor, "PnorRp::readTOC: Bin Dump",ffsUserData, sizeof(ffs_hb_user_t) );
+
+ if (iv_TOC[cur_side][secId].version == FFS_VERS_SHA512)
+ {
+ TRACFCOMP(g_trac_pnor, "PnorRp::readTOC: Incrementing Flash Address for SHA Header");
+ if (iv_TOC[cur_side][secId].integrity == FFS_INTEG_ECC_PROTECT)
+ {
+ iv_TOC[cur_side][secId].flashAddr += (PAGESIZE*9)/8;
+ }
+ else
+ {
+ iv_TOC[cur_side][secId].flashAddr += PAGESIZE;
+ }
+ }
+
if((iv_TOC[cur_side][secId].flashAddr + iv_TOC[cur_side][secId].size) > (l_ffs_hdr->block_count*PAGESIZE))
{
TRACFCOMP(g_trac_pnor, "E>PnorRp::readTOC: Partition(%s) at base address (0x%.8x) extends past end of flash device",
OpenPOWER on IntegriCloud