From 9b7aad9ea276eda21ae35e2bfa69f6dffed5133b Mon Sep 17 00:00:00 2001 From: Dan Crowell Date: Thu, 5 Jan 2017 16:34:08 -0600 Subject: More improvements to memory vpd error handling Noticed that the error we really end up seeing is not the one I expected. I combined the two redundant error paths and included additional FFDC. Change-Id: Ic2ae2850fc9ff8f76f9889c7af565c3308c57b3a Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34458 Tested-by: Jenkins Server Tested-by: Hostboot CI Reviewed-by: Matt K. Light Reviewed-by: Christian R. Geddes Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34497 Reviewed-by: Hostboot Team Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- .../hwp/accessors/p9_get_mem_vpd_keyword.C | 49 ++++++++-------------- 1 file changed, 17 insertions(+), 32 deletions(-) (limited to 'src/import/chips/p9/procedures/hwp/accessors') diff --git a/src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.C b/src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.C index 8a7e7f6ce..bd8be32fb 100644 --- a/src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.C +++ b/src/import/chips/p9/procedures/hwp/accessors/p9_get_mem_vpd_keyword.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -423,43 +423,28 @@ extern "C" } //Was a matching row found? - FAPI_ASSERT(0 != l_second, - fapi2::GET_MEM_VPD_NO_MATCH_FOUND(). - set_MCS(fapi2::ATTR_MEMVPD_POS_Type(l_mcsPos)). - set_FREQ(uint32_t(i_vpd_info.iv_freq_mhz)). - set_DIMM0RANK(uint64_t(i_vpd_info.iv_rank_count_dimm_0)). - set_DIMM1RANK(uint64_t(i_vpd_info.iv_rank_count_dimm_1)). - set_HEADER(mappingHeader_t(*l_mappingHeader)). - set_TARGET(i_target). - set_VPDTYPE(i_vpd_info.iv_vpd_type). - set_MAPROW0(l_ffdc_MAPROW[0]). - set_MAPROW1(l_ffdc_MAPROW[1]). - set_MAPROW2(l_ffdc_MAPROW[2]). - set_MAPROW3(l_ffdc_MAPROW[3]). - set_MAPROW4(l_ffdc_MAPROW[4]). - set_MAPROW5(l_ffdc_MAPROW[5]). - set_MAPROW6(l_ffdc_MAPROW[6]). - set_MAPROW7(l_ffdc_MAPROW[7]). - set_MAPROW8(l_ffdc_MAPROW[8]). - set_MAPROW9(l_ffdc_MAPROW[9]), - "No match in mapping table"); - //Was a valid keyword name found? - // Cast needed due to implicit int of enums - FAPI_ASSERT( static_cast(MAPPING_LAYOUT_INVALID) != l_second, - fapi2::GET_MEM_VPD_UNSUPPORTED_CONFIGURATION(). + FAPI_ASSERT( (0 != l_second) && + (static_cast(MAPPING_LAYOUT_INVALID) != l_second), + fapi2::GET_MEM_VPD_UNSUPPORTED_CONFIG(). set_MCS(fapi2::ATTR_MEMVPD_POS_Type(l_mcsPos)). set_FREQ(uint32_t(i_vpd_info.iv_freq_mhz)). set_DIMM0RANK(uint64_t(i_vpd_info.iv_rank_count_dimm_0)). set_DIMM1RANK(uint64_t(i_vpd_info.iv_rank_count_dimm_1)). - set_VPDMCSMASK(uint16_t(((l_mapping[l_index].mcsMaskMSB) << 8) | - l_mapping[l_index].mcsMaskLSB)). - set_VPDFREQMASK(uint8_t(l_mapping[l_index].freqMask)). - set_VPDRANKMASK(uint8_t(((l_mapping[l_index].rankMaskMSB) << 8) | - l_mapping[l_index].rankMaskLSB)). + set_HEADER(mappingHeader_t(*l_mappingHeader)). set_TARGET(i_target). - set_VPDTYPE(i_vpd_info.iv_vpd_type), - "Unsupported configuration"); + set_VPDTYPE(i_vpd_info.iv_vpd_type). + set_MAPROW0(l_ffdc_MAPROW[0]). + set_MAPROW1(l_ffdc_MAPROW[1]). + set_MAPROW2(l_ffdc_MAPROW[2]). + set_MAPROW3(l_ffdc_MAPROW[3]). + set_MAPROW4(l_ffdc_MAPROW[4]). + set_MAPROW5(l_ffdc_MAPROW[5]). + set_MAPROW6(l_ffdc_MAPROW[6]). + set_MAPROW7(l_ffdc_MAPROW[7]). + set_MAPROW8(l_ffdc_MAPROW[8]). + set_MAPROW9(l_ffdc_MAPROW[9]), + "Unsupported configuration, no match in memory vpd mapping table"); // build the keyword name o_keywordInfo.kwName[0] = l_first; -- cgit v1.2.1