diff options
Diffstat (limited to 'src/import')
-rw-r--r-- | src/import/chips/p9/utils/p9_putRingUtils.C | 8 | ||||
-rw-r--r-- | src/import/hwpf/fapi2/include/return_code_defs.H | 2 |
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 }; |