diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2013-10-29 16:50:08 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-11-07 14:58:22 -0600 |
commit | c46a0d9db4701cca885329a29adf589da75f0ba7 (patch) | |
tree | 06acb104a582182de2c0093d1eb04310df7a735f /src/include/usr/util | |
parent | 61716e5c9f9ffd3acc5169688739d223c0344a93 (diff) | |
download | blackbird-hostboot-c46a0d9db4701cca885329a29adf589da75f0ba7.tar.gz blackbird-hostboot-c46a0d9db4701cca885329a29adf589da75f0ba7.zip |
Runtime LidMgr.
Change-Id: Ib456f3a41d79775a2af027e0bf80e36ce1d49232
RTC: 76679
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/6971
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/util')
-rw-r--r-- | src/include/usr/util/util_reasoncodes.H | 3 | ||||
-rw-r--r-- | src/include/usr/util/utillidmgr.H | 87 |
2 files changed, 54 insertions, 36 deletions
diff --git a/src/include/usr/util/util_reasoncodes.H b/src/include/usr/util/util_reasoncodes.H index 4295bc4d6..2ca895f18 100644 --- a/src/include/usr/util/util_reasoncodes.H +++ b/src/include/usr/util/util_reasoncodes.H @@ -34,7 +34,8 @@ namespace Util UTIL_MOD_MEM_WRITE = 0x02, // UtilMem::Write UTIL_LIDMGR_GETLID = 0x03, // UtilLidMgr::getLid UTIL_LIDMGR_GETLIDSIZE = 0x04, // UtilLidMgr::getLidSize - UTIL_LIDMGR_GETLIDPNOR = 0x06, // UtilLidMgr::getLidPnor + UTIL_LIDMGR_GETLIDPNOR = 0x05, // UtilLidMgr::getLidPnor + UTIL_LIDMGR_RT = 0x06, }; enum ReasonCode diff --git a/src/include/usr/util/utillidmgr.H b/src/include/usr/util/utillidmgr.H index d6839a802..53560faa8 100644 --- a/src/include/usr/util/utillidmgr.H +++ b/src/include/usr/util/utillidmgr.H @@ -58,7 +58,7 @@ class UtilLidMgr * Ensures member variables are initialized to sane values. * Sets the initial LID ID. * - * @param[in] i_lidId + * @param[in] i_lidId * LID ID. * */ @@ -81,7 +81,7 @@ class UtilLidMgr * to work with. It can also be used to reset the * object to a different LID Id.. * - * @param[in] i_lidId + * @param[in] i_lidId * LID ID. * * @return errlHndl_t @@ -97,7 +97,7 @@ class UtilLidMgr * Returns useful LID metrics to the user. Currently * this is only the size of the LID in bytes. * - * @param[out] o_lidSize + * @param[out] o_lidSize * Size of the LID in bytes. * * @return errlHndl_t @@ -115,11 +115,11 @@ class UtilLidMgr * allocate the indicated memory space before * calling this function. * - * @param[in] i_dest + * @param[in] i_dest * Pointer to where LID should be stored in * hostboot memory * - * @param[in] i_destSeze + * @param[in] i_destSeze * Reserved space in bytes at destintion address * for LID. * @@ -132,6 +132,29 @@ class UtilLidMgr protected: /** + * @brief Updates the lidId in the object + * + * @par Detailed Description: + * Updates the lidId in the object + * Also composes the LID filename + * This function assumes the lid name is of the format + * <uppercase hex>.lidbin + * The file is not technically a lid, thus the slightly + * different name + * + * @param[in] i_lidId + * LID ID. + */ + void updateLid(uint32_t i_lidId); + + /** + * @brief performs object cleanup when a new lidId is set + * Function is also called by the destructor. + */ + errlHndl_t cleanup(); + +#ifndef __HOSTBOOT_RUNTIME + /** * @brief Get LID Size PNOR * * @par Detailed Description: @@ -142,10 +165,10 @@ class UtilLidMgr * The file is not technically a lid, thus the slightly * different name * - * @param[out] o_lidSize + * @param[out] o_lidSize * Size of the LID in bytes. * - * @param[out] o_imgInPnor + * @param[out] o_imgInPnor * Indicates image was found in PNOR * * @return errlHndl_t @@ -167,15 +190,15 @@ class UtilLidMgr * The file is not technically a lid, thus the slightly * different name * - * @param[in] i_dest + * @param[in] i_dest * pointer where LID should be stored in * hostboot memory * - * @param[in] i_destSeze + * @param[in] i_destSeze * Reserved space in bytes at destintion address * for LID. * - * @param[out] o_imgInPnor + * @param[out] o_imgInPnor * Indicates image was found in PNOR * * @return errlHndl_t @@ -187,30 +210,6 @@ class UtilLidMgr bool& o_imgInPnor); /** - * @brief performs object cleanup when a new lidId is set - * Function is also called by the destructor. - */ - errlHndl_t cleanup(); - - - /** - * @brief Updates the lidId in the object - * - * @par Detailed Description: - * Updates the lidId in the object - * Also composes the LID filename - * This function assumes the lid name is of the format - * <uppercase hex>.lidbin - * The file is not technically a lid, thus the slightly - * different name - * - * @param[in] i_lidId - * LID ID. - */ - void updateLid(uint32_t i_lidId); - - - /** * @enum UtilLidMgr::MBOX_MSG_TYPE * * @brief Message enum to determine if msg should be sent @@ -261,7 +260,7 @@ class UtilLidMgr * ::MBOX_MSG_TYPE passed in to define the * message sending policy. * - * @param[in/out] i_msg + * @param[in/out] i_msg * This parameter is used as both input and an * output parameter. If the message is sent * synchronusly the response will be populated @@ -296,6 +295,24 @@ class UtilLidMgr * @brief Pointer to message queue */ msg_q_t iv_HbMsgQ; +#else // __HOSTBOOT_RUNTIME + + /** + * @brief Loads the LID using the Host interfaces. + */ + errlHndl_t loadLid(); + + /** + * @brief Cached value of the LID location. (Host vs PNOR) + */ + bool iv_isPnor; + + /** + * @brief Pointer to the buffer containing the LID. + */ + void* iv_lidBuffer; + +#endif // __HOSTBOOT_RUNTIME /** * @brief LID fileName |