diff options
author | Marty Gloff <mgloff@us.ibm.com> | 2017-10-17 08:23:52 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-01-08 13:23:52 -0500 |
commit | 0a1b60c34e55018e233c64b292e16c3479d2145c (patch) | |
tree | 0595baf0046a2f7391fbf772b0e231b76b3a5f2c /src/include/usr/targeting/attrrp.H | |
parent | 1d862697f0b1256e7f7d1d620bf124eb2504d169 (diff) | |
download | talos-hostboot-0a1b60c34e55018e233c64b292e16c3479d2145c.tar.gz talos-hostboot-0a1b60c34e55018e233c64b292e16c3479d2145c.zip |
Concurrent code update of HBRT - Update Structure
Update Hostboot targeting data in the new targeting structure from the
current targeting data. It will have the logic to save and restore values
as appropriate.
Change-Id: I7ae4a0c2e58548f6f1a6229f40b9fda833670e86
RTC: 180908
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48504
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Brian E. Bakke <bbakke@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/targeting/attrrp.H')
-rw-r--r-- | src/include/usr/targeting/attrrp.H | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/src/include/usr/targeting/attrrp.H b/src/include/usr/targeting/attrrp.H index 02772cb6d..1d5698d74 100644 --- a/src/include/usr/targeting/attrrp.H +++ b/src/include/usr/targeting/attrrp.H @@ -40,7 +40,6 @@ #include <sys/msg.h> #include <targeting/adapters/types.H> #include <targeting/common/targetservice.H> -#include <targeting/attrsync.H> #include <targeting/common/attributeTank.H> namespace TARGETING @@ -73,6 +72,11 @@ class AttrRP const SECTION_TYPE i_sectionId, const TARGETING::NODE_ID i_nodeId); +#ifdef __HOSTBOOT_RUNTIME + friend int RT_TARG::saveRestoreAttrs(void *, + void *); +#endif + public: /** @@ -216,6 +220,16 @@ class AttrRP static errlHndl_t saveOverrides( uint8_t* i_dest, size_t& io_size ); +#else + /** + * @brief Fill in new attribute resource provider for HBRT. + * + * @param[in] i_header + * TargetingHeader to use with filling in the new RT AttrRP. + * + * @return void + */ + void fillInAttrRP(TargetingHeader* i_header); #endif protected: @@ -228,22 +242,40 @@ class AttrRP */ AttrRP() #ifndef __HOSTBOOT_RUNTIME - : iv_msgQ(NULL), iv_sections(NULL), iv_sectionCount(0), iv_isMpipl(false) + : iv_msgQ(NULL), iv_sections(NULL), iv_sectionCount(0), + iv_isMpipl(false) #else - : iv_sections(NULL), iv_sectionCount(0), iv_isMpipl(false) + : iv_isTempInstance(false), iv_sections(NULL), iv_sectionCount(0), + iv_isMpipl(false) #endif { }; +#ifdef __HOSTBOOT_RUNTIME + /** + * @brief Initialize temporary attribute resource provider + * + * @par Detailed Description" + * Ensures member variables are initialized to sane values. + */ + AttrRP(TargetingHeader* i_header) + : iv_isTempInstance(true), iv_isMpipl(false) + { + // Fill in member variables + fillInAttrRP(i_header); + }; +#endif + /** * @brief Destroy the attribute resource provider * * @par Detailed Description: * Frees any memory allocated by the resource provider. * - * @note This should never actually be used because the daemon - * thread and the vmm blocks are unable to be reclaimed. - * Function will assert if called due to leaky behavior. + * @note This should never actually be used for the singleton + * instance because the daemon thread and the vmm blocks + * are unable to be reclaimed. Function will assert if + * called due to leaky behavior. */ ~AttrRP(); @@ -388,6 +420,9 @@ class AttrRP // Message Queue for VMM requests msg_q_t iv_msgQ; +#else + // Indicator that AttrRP instance is a temporary one, not the singleton + bool iv_isTempInstance; #endif // Parsed structures of the attribute sections. AttrRP_Section* iv_sections; |