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
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-06-23 16:19:34 -0400
commit49eae5fb8adc7df4decb59ad0e788330ba2bff16 (patch)
tree906f40609429b85d1b7f42637047d1c6ebe541a6 /src/import/chips/p9/utils/imageProcs/p9_tor.C
parente1fa7eaf38928b195acac6c636e5f0740bc2e03a (diff)
downloadtalos-hostboot-49eae5fb8adc7df4decb59ad0e788330ba2bff16.tar.gz
talos-hostboot-49eae5fb8adc7df4decb59ad0e788330ba2bff16.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/25456 Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell <dcrowell@us.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 3687237c0..a19afeaf7 100644
--- a/src/import/chips/p9/utils/imageProcs/p9_tor.C
+++ b/src/import/chips/p9/utils/imageProcs/p9_tor.C
@@ -978,6 +978,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);
@@ -1008,9 +1009,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)
{
@@ -1813,4 +1821,4 @@ int tor_get_block_of_rings ( void* i_ringSectionPt,
return rc;
}
-};
+}; \ No newline at end of file
OpenPOWER on IntegriCloud