diff options
| author | Stephen Cprek <smcprek@us.ibm.com> | 2017-12-15 10:24:02 -0600 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-12-20 13:54:35 -0500 |
| commit | 34dbdc49d0d14933c317be2815302d0d558c5924 (patch) | |
| tree | d65d06b6901b0188057263519bf0b2f127b3ddd0 /src/include/usr/util | |
| parent | 1dce3206aa219d0cef4501b6795255a730f4ecba (diff) | |
| download | blackbird-hostboot-34dbdc49d0d14933c317be2815302d0d558c5924.tar.gz blackbird-hostboot-34dbdc49d0d14933c317be2815302d0d558c5924.zip | |
Convert asserts to error logs where it makes sense
Change-Id: Idd15e39cc6be44c0865f13503bfa4482d77fcf0d
RTC:181899
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51042
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/util')
| -rw-r--r-- | src/include/usr/util/util_reasoncodes.H | 2 | ||||
| -rw-r--r-- | src/include/usr/util/utillidmgr.H | 54 |
2 files changed, 33 insertions, 23 deletions
diff --git a/src/include/usr/util/util_reasoncodes.H b/src/include/usr/util/util_reasoncodes.H index 2b43b6757..587943bdd 100644 --- a/src/include/usr/util/util_reasoncodes.H +++ b/src/include/usr/util/util_reasoncodes.H @@ -51,6 +51,7 @@ namespace Util UTIL_MCL_REL_MEM = 0x11, // MasterContainerLidMgr::releaseMem UTIL_MCL_PROCESS_COMP = 0x12, // MasterContainerLidMgr::processComponent UTIL_MOD_GET_OBUS_PLL_BUCKET = 0x14, // UtilCommonAttr::getObusPllBucket + UTIL_LIDMGR_CSTOR = 0x15, // UtilLidMgr::UtilLidMgr }; enum ReasonCode @@ -81,6 +82,7 @@ namespace Util UTIL_MCL_SIZE_MISMATCH = UTIL_COMP_ID | 0x18, UTIL_ERC_NO_FREQ_LIST = UTIL_COMP_ID | 0x1A, UTIL_ERC_NO_MATCHING_FREQ = UTIL_COMP_ID | 0x1B, + UTIL_LIDMGR_INVAL_LID_REQUEST = UTIL_COMP_ID | 0x1C, }; }; diff --git a/src/include/usr/util/utillidmgr.H b/src/include/usr/util/utillidmgr.H index c2ac2d9a0..a80f67876 100644 --- a/src/include/usr/util/utillidmgr.H +++ b/src/include/usr/util/utillidmgr.H @@ -83,6 +83,7 @@ class UtilLidMgr * @par Detailed Description * Ensures member variables are initialized to sane values. * Sets the initial LID ID. + * Note will shutdown if error occurs during updateLid and not Runtime * * @param[in] i_lidId * LID ID. @@ -111,8 +112,8 @@ class UtilLidMgr * LID ID. * * @return errlHndl_t - * return errl == NULL -> success - * return errl != NULL -> failure + * return errl == nullptr -> success + * return errl != nullptr -> failure */ errlHndl_t setLidId(uint32_t i_lidId); @@ -127,8 +128,8 @@ class UtilLidMgr * Size of the LID in bytes. * * @return errlHndl_t - * return errl == NULL -> success - * return errl != NULL -> failure + * return errl == nullptr -> success + * return errl != nullptr -> failure */ errlHndl_t getLidSize(size_t& o_lidSize); @@ -150,8 +151,8 @@ class UtilLidMgr * for LID. * * @return errlHndl_t - * return errl == NULL -> success - * return errl != NULL -> failure + * return errl == nullptr -> success + * return errl != nullptr -> failure */ errlHndl_t getLid(void* i_dest, size_t i_destSize); @@ -173,8 +174,8 @@ class UtilLidMgr * * * @return errlHndl_t - * return errl == NULL -> success - * return errl != NULL -> failure + * return errl == nullptr -> success + * return errl != nullptr -> failure */ errlHndl_t getStoredLidImage(void*& o_pLidImage, size_t& o_lidImageSize); @@ -187,8 +188,8 @@ class UtilLidMgr * Clears variables associated with storing the image. * * @return errlHndl_t - * return errl == NULL -> success - * return errl != NULL -> failure + * return errl == nullptr -> success + * return errl != nullptr -> failure */ errlHndl_t releaseLidImage(void); @@ -202,7 +203,7 @@ class UtilLidMgr */ inline const void* getLidVirtAddr() const { - const void* l_addr = NULL; + const void* l_addr = nullptr; // Get pointer to PNOR vaddr if (iv_isLidInPnor) { @@ -239,8 +240,11 @@ class UtilLidMgr * * @param[in] i_lidId * LID ID. + * @return errlHndl_t + * return errl == nullptr -> success + * return errl != nullptr -> failure */ - void updateLid(uint32_t i_lidId); + errlHndl_t updateLid(uint32_t i_lidId); /** * @brief performs object cleanup when a new lidId is set @@ -272,8 +276,8 @@ class UtilLidMgr * Indicates image was found in PNOR * * @return errlHndl_t - * return errl == NULL -> success - * return errl != NULL -> failure + * return errl == nullptr -> success + * return errl != nullptr -> failure */ errlHndl_t getLidSizePnor(size_t& o_lidSize, bool& o_imgInPnor); @@ -302,8 +306,8 @@ class UtilLidMgr * Indicates image was found in PNOR * * @return errlHndl_t - * return errl == NULL -> success - * return errl != NULL -> failure + * return errl == nullptr -> success + * return errl != nullptr -> failure */ errlHndl_t getLidPnor(void* i_dest, size_t i_destSize, @@ -335,8 +339,8 @@ class UtilLidMgr * the mutex. * * @return errlHndl_t - * return errl == NULL -> success - * return errl != NULL -> failure + * return errl == nullptr -> success + * return errl != nullptr -> failure */ errlHndl_t createMsgQueue(); @@ -370,8 +374,8 @@ class UtilLidMgr * the fsp. * * @return errlHndl_t - * return errl == NULL -> success - * return errl != NULL -> failure + * return errl == nullptr -> success + * return errl != nullptr -> failure */ errlHndl_t sendMboxMessage( MBOX_MSG_TYPE i_type, msg_t * i_msg ); @@ -437,11 +441,15 @@ class UtilLidMgr * @param[in] i_lidId - lid id to search for * @param[out] o_lidPnorInfo - pnor section info associated with the lid * if it exists in pnor + * @param[out] o_isLidInPnor - True if lid is in a section, false otherwise * - * @return bool - True if lid is in a section, false otherwise + * @return errlHndl_t + * return errl == nullptr -> success + * return errl != nullptr -> failure */ - bool getLidPnorSectionInfo(uint32_t i_lidId, - PNOR::SectionInfo_t &o_lidPnorInfo); + errlHndl_t getLidPnorSectionInfo(uint32_t i_lidId, + PNOR::SectionInfo_t &o_lidPnorInfo, + bool &o_isLidInPnor); /** * @brief LID fileName */ |

