summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPrasad Bg Ranganath <prasadbgr@in.ibm.com>2016-12-06 10:44:50 -0600
committerspashabk-in <shakeebbk@in.ibm.com>2016-12-20 05:18:51 -0600
commit2c5d1b4332ed2dd3780f38582ea28ac134a00d62 (patch)
treebdeb045534801ecf2c5a089f66970b41b914248a /src
parent81c2b3f6f5a04f79320230b0d961470a38b15356 (diff)
downloadtalos-sbe-2c5d1b4332ed2dd3780f38582ea28ac134a00d62.tar.gz
talos-sbe-2c5d1b4332ed2dd3780f38582ea28ac134a00d62.zip
SBE: Handle error part in putring code
Change-Id: I11391e341b688a38a672a657494a5f1e29542489 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33467 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: RAJA DAS <rajadas2@in.ibm.com> Reviewed-by: PARVATHI RACHAKONDA <prachako@in.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33472 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/import/chips/p9/utils/p9_putRingUtils.C8
-rw-r--r--src/import/hwpf/fapi2/include/return_code_defs.H2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/import/chips/p9/utils/p9_putRingUtils.C b/src/import/chips/p9/utils/p9_putRingUtils.C
index 3731e788..d150f478 100644
--- a/src/import/chips/p9/utils/p9_putRingUtils.C
+++ b/src/import/chips/p9/utils/p9_putRingUtils.C
@@ -1096,8 +1096,6 @@ fapi2::ReturnCode rs4DecompressionSvc(
uint64_t l_nibbleIndx = 0;
uint64_t l_bitsDecoded = 0;
bool l_decompressionDone = false;
- uint64_t l_scanRegion = rs4_revle64(l_rs4Header->iv_scanSelect);
- uint8_t l_chipletId = l_rs4Header->iv_chipletId;
fapi2::ReturnCode l_rc;
struct restoreOpcgRegisters l_opcgData;
uint8_t l_mask = 0x08;
@@ -1105,12 +1103,16 @@ fapi2::ReturnCode rs4DecompressionSvc(
do
{
- if (l_rs4Header->iv_length == 0)
+ if ( (l_rs4Header == NULL) || (l_rs4Header->iv_length == 0))
{
+ l_rc = fapi2::FAPI2_RC_PLAT_RS4_HEADER_DATA_INVALID;
FAPI_ERR("Invalid ring length in RS4 image");
break;
}
+ uint64_t l_scanRegion = rs4_revle64(l_rs4Header->iv_scanSelect);
+ uint8_t l_chipletId = l_rs4Header->iv_chipletId;
+
if ((i_ringMode & fapi2::RING_MODE_SET_PULSE_NSL) ||
(i_ringMode & fapi2::RING_MODE_SET_PULSE_SL) ||
(i_ringMode & fapi2::RING_MODE_SET_PULSE_ALL))
diff --git a/src/import/hwpf/fapi2/include/return_code_defs.H b/src/import/hwpf/fapi2/include/return_code_defs.H
index d7417ab1..2d5cdd9e 100644
--- a/src/import/hwpf/fapi2/include/return_code_defs.H
+++ b/src/import/hwpf/fapi2/include/return_code_defs.H
@@ -112,7 +112,7 @@ enum ReturnCodes : uint32_t
//Operation on putring fail because of decode length greater than actual
//ring length.
- FAPI2_RC_PLAT_RING_ID_NOT_FOUND_IN_RS4_IMAGE = FAPI2_RC_PLAT_MASK | 0x06,
+ FAPI2_RC_PLAT_RS4_HEADER_DATA_INVALID = FAPI2_RC_PLAT_MASK | 0x06,
//Operation on putring fail because of ringId not found in RS4 image
};
OpenPOWER on IntegriCloud