summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/utils/imageProcs/p9_tor.C
diff options
context:
space:
mode:
authorGirisankar Paulraj <gpaulraj@in.ibm.com>2016-06-01 06:13:31 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2016-09-26 02:49:13 -0400
commit08ea0b977772997fbf42328da57e977e093d12df (patch)
treea3829ae5af8bdf404d6d1eaf7f3f24850e47f1c6 /src/import/chips/p9/utils/imageProcs/p9_tor.C
parent13f64eae601e48826929175a45e746e55fbdb29e (diff)
downloadtalos-sbe-08ea0b977772997fbf42328da57e977e093d12df.tar.gz
talos-sbe-08ea0b977772997fbf42328da57e977e093d12df.zip
Validating DD level is present or not
Old code did not report error, when particular dd level did not list in the dd level tor table. It reported wrong error. new workaround reports error, when there is no dd level listed in the dd level tor table. Change-Id: I4c4ef2a42306069fd4963ce13bed77011e79aab5 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25234 Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Martin Peschke <mpeschke@de.ibm.com> Reviewed-by: Prachi Gupta <pragupta@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30243 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips/p9/utils/imageProcs/p9_tor.C')
-rw-r--r--src/import/chips/p9/utils/imageProcs/p9_tor.C10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/import/chips/p9/utils/imageProcs/p9_tor.C b/src/import/chips/p9/utils/imageProcs/p9_tor.C
index 8070d961..7a4d4a0d 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_tor.C
+++ b/src/import/chips/p9/utils/imageProcs/p9_tor.C
@@ -984,6 +984,7 @@ int tor_get_ring( void*
if (i_magic == P9_XIP_MAGIC_HW)
{
+ uint8_t dd_check = 0;
ddLevelCount = *((uint32_t*)i_ringSectionPtr + 0);
ddLevelCount = htobe32(ddLevelCount);
@@ -1014,9 +1015,16 @@ int tor_get_ring( void*
local = local + 1;
temp1 = *((uint32_t*)i_ringSectionPtr + local);
temp1 = htobe32(temp1);
+ dd_check = 1;
break;
}
}
+
+ if(!dd_check)
+ {
+ MY_INF(" invalid DD level input \n");
+ return IMGBUILD_TGR_DD_LVL_INFO_NOT_FOUND;
+ }
}
else if( i_magic == P9_XIP_MAGIC_SEEPROM)
{
@@ -1819,4 +1827,4 @@ int tor_get_block_of_rings ( void* i_ringSectionPt,
return rc;
}
-};
+}; \ No newline at end of file
OpenPOWER on IntegriCloud