summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/utils/imageProcs
diff options
context:
space:
mode:
Diffstat (limited to 'src/import/chips/p9/utils/imageProcs')
-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