Skip to content

Commit

Permalink
Support multiple nodes in HBRT - Update Functions
Browse files Browse the repository at this point in the history
Existing targeting functions were written to support a single node
implementation.  There are functions currently linked to HBRT, but
not needed by HBRT that break with the multiple nodes support. Those
functions will be compiled out of HBRT.

Change-Id: I7d70caa4721c52c032e099f75dae2fce5c6fe3be
RTC: 186580
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53233
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>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
mgloff authored and dcrowell77 committed Apr 5, 2018
1 parent c39a13d commit 379efca
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 59 deletions.
5 changes: 4 additions & 1 deletion src/include/usr/targeting/attrrp.H
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class AttrRP
{

// add some friends for the attribute sync features
#ifndef __HOSTBOOT_RUNTIME
friend bool TargetService::writeSectionData(
const std::vector<sectionRefData>& i_pages );

Expand All @@ -110,7 +111,7 @@ class AttrRP
const SECTION_TYPE i_sectionId,
const TARGETING::NODE_ID i_nodeId);

#ifdef __HOSTBOOT_RUNTIME
#else
friend errlHndl_t RT_TARG::saveRestoreAttrs(void *,
void *,
uint64_t&);
Expand Down Expand Up @@ -373,6 +374,7 @@ class AttrRP
*/
~AttrRP();

#ifndef __HOSTBOOT_RUNTIME
/**
* @brief Copies the section data buffer from the vector to the
* appropriate section offset with respect to the node target ptr
Expand Down Expand Up @@ -402,6 +404,7 @@ class AttrRP
std::vector <sectionRefData>& o_pages,
const SECTION_TYPE i_sectionType,
const NODE_ID i_nodeId = 0) const;
#endif


private:
Expand Down
34 changes: 1 addition & 33 deletions src/include/usr/targeting/attrsync.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -109,36 +109,6 @@ namespace TARGETING
errlHndl_t syncSectionToFsp(
TARGETING::SECTION_TYPE i_section_to_sync );

#else
/**
* @brief Setup the internal variables to point to the correct
* attribute section.
*
* @par Detailed Description:
* This function will call into the AttRP:: to have the
* correct attribute section paged into accessible memory.
* This function may be called multiple times with
* different section names.
*
* @pre None:
*
* @post The entire section from the HB attribute section
* passed in has been synchronized to new AttrRP.
*
* @param[in] i_section_to_sync
* TARGETING::SECTION_TYPE is passed in to
* identify the section to be synced to the
* new AttrRP.
*
* @return std::vector <TARGETING::sectionRefData> with
* attribute section pages.
*
*/
std::vector <TARGETING::sectionRefData> syncSectionFromAttrRP(
TARGETING::SECTION_TYPE i_section_to_sync);
#endif

#ifndef __HOSTBOOT_RUNTIME
/**
* @brief Sends a request to the FSP to sync its data to Hostboot
* for a specific attribute section. Write the data
Expand Down Expand Up @@ -187,7 +157,6 @@ namespace TARGETING
ASYNCHRONOUS,
SYNCHRONOUS
};
#endif

/**
* @brief Setup the internal variables to point to the correct
Expand All @@ -200,7 +169,6 @@ namespace TARGETING
*/
void getSectionData();

#ifndef __HOSTBOOT_RUNTIME
/**
* @brief Write the attribute data received from the FSP to
* the attribute section.
Expand Down
2 changes: 2 additions & 0 deletions src/include/usr/targeting/common/targetservice.H
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ class TargetService
*/
void dump() const;

#ifndef __HOSTBOOT_RUNTIME
/**
* @brief Updates the targeting/attribute section data with the
* specified vector parameters.
Expand Down Expand Up @@ -597,6 +598,7 @@ class TargetService
void readSectionData(std::vector<sectionRefData>& o_pages,
const SECTION_TYPE i_sectionId,
const NODE_ID i_nodeId = NODE0);
#endif

/**
* @brief Get the Next initialized node in the Target Service
Expand Down
2 changes: 2 additions & 0 deletions src/usr/targeting/attrrp_common.C
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ namespace TARGETING
Singleton<AttrRP>::instance().startup(io_taskRetErrl, i_isMpipl);
}

#ifndef __HOSTBOOT_RUNTIME
bool AttrRP::writeSectionData(
const std::vector<TARGETING::sectionRefData>& i_pages) const
{
Expand Down Expand Up @@ -204,4 +205,5 @@ namespace TARGETING
}
}
}
#endif
}
22 changes: 2 additions & 20 deletions src/usr/targeting/attrsync.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -41,6 +41,7 @@ namespace TARGETING
AttributeSync::~AttributeSync()
{};

#ifndef __HOSTBOOT_RUNTIME
void AttributeSync::getSectionData()
{
// make sure we have a clean slate
Expand All @@ -61,7 +62,6 @@ namespace TARGETING

}

#ifndef __HOSTBOOT_RUNTIME
ATTR_SYNC_RC AttributeSync::updateSectionData() const
{
TARG_INF( ENTER_MRK "AttributeSync::updateSectionData - "
Expand Down Expand Up @@ -91,23 +91,6 @@ namespace TARGETING
return l_rc;
}

#else
std::vector<TARGETING::sectionRefData> AttributeSync::syncSectionFromAttrRP(
TARGETING::SECTION_TYPE i_section_to_sync)
{
iv_section_to_sync = i_section_to_sync;

do
{
// set up the pointers to the data area
getSectionData();
} while(0);

return iv_pages;
}
#endif

#ifndef __HOSTBOOT_RUNTIME
errlHndl_t AttributeSync::syncSectionToFsp(
TARGETING::SECTION_TYPE i_section_to_sync )
{
Expand All @@ -116,7 +99,6 @@ namespace TARGETING

iv_section_to_sync = i_section_to_sync;


do{

// set up the pointers to the data area
Expand Down
3 changes: 2 additions & 1 deletion src/usr/targeting/common/targetservice.C
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@ void TargetService::dump() const
#undef TARG_FN
}


#ifndef __HOSTBOOT_RUNTIME
//******************************************************************************
// TargetService::writeSectionData
//******************************************************************************
Expand Down Expand Up @@ -1148,6 +1148,7 @@ void TargetService::readSectionData(

#undef TARG_FN
}
#endif

//******************************************************************************
// TargetService::_configureTargetPool
Expand Down
4 changes: 0 additions & 4 deletions src/usr/targeting/runtime/attrrp_rt.C
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <errl/errlentry.H>
#include <targeting/common/targreasoncodes.H>
#include <targeting/targplatreasoncodes.H>
#include <targeting/attrsync.H>
#include <util/runtime/util_rt.H>
#include <sys/internode.h>

Expand All @@ -45,9 +44,6 @@ namespace TARGETING

do
{
// Create AttributeSync
AttributeSync l_attributeSync = AttributeSync();

// Allocate section structures based on section count in header.
iv_sectionCount = i_header->numSections;
iv_sections = new AttrRP_Section[iv_sectionCount]();
Expand Down

0 comments on commit 379efca

Please sign in to comment.