Skip to content

Commit

Permalink
changes to move configureHbrt target type to IPC path to run on slave…
Browse files Browse the repository at this point in the history
… nodes

Change-Id: Iee5e5231851e6f6389f83607da35121dbfe5a0b9
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54855
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-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: Richard J. Knight <rjknight@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
  • Loading branch information
Prachi Gupta authored and wghoffa committed Mar 7, 2018
1 parent b456c82 commit 5ca1d49
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 12 deletions.
8 changes: 0 additions & 8 deletions src/usr/isteps/istep21/call_host_runtime_setup.C
Original file line number Diff line number Diff line change
Expand Up @@ -480,14 +480,6 @@ void* call_host_runtime_setup (void *io_pArgs)
break;
}

// Configure the ATTR_HBRT_HYP_ID attributes so that runtime code and
// whichever hypervisor is loaded can reference equivalent targets
l_err = RUNTIME::configureHbrtHypIds(TARGETING::is_phyp_load());
if(l_err)
{
break;
}

// Verify PAYLOAD and Move PAYLOAD+HDAT from Temporary TCE-related
// memory region to the proper location
l_err = verifyAndMovePayload();
Expand Down
37 changes: 33 additions & 4 deletions src/usr/runtime/populate_hbruntime.C
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#include <limits.h>
#include <errno.h>
#include <vmmconst.h>

#include <runtime/customize_attrs_for_payload.H>
namespace RUNTIME
{

Expand Down Expand Up @@ -859,7 +859,23 @@ errlHndl_t populate_HbRsvMem(uint64_t i_nodeId, bool i_master_node)
auto l_hbrtSecurelyLoaded = false;
#endif

do {
do
{
// Configure the ATTR_HBRT_HYP_ID attributes so that runtime code and
// whichever hypervisor is loaded can reference equivalent targets
// When populating hbRuntimeData, we make IPC calls if we are running
// on a multi-node configuration. The message handler for that IPC call,
// calls populateHbRsvMem. We want to setup hbrt target types for all
// the nodes. That's why, we moved this call here instead of directly
// calling it from istep21.
l_elog = RUNTIME::configureHbrtHypIds(TARGETING::is_phyp_load());
if (l_elog)
{
TRACFCOMP(g_trac_runtime, ERR_MRK"populate_HbRsvMem> i_nodeId=%d"
" configureHbrtHypIds failed");
break;
}

// Wipe out our cache of the NACA/SPIRA pointers
RUNTIME::rediscover_hdat();

Expand Down Expand Up @@ -2829,7 +2845,7 @@ errlHndl_t populate_hbRuntimeData( void )
TARGETING::ATTR_HB_EXISTING_IMAGE_type hb_images =
sys->getAttr<TARGETING::ATTR_HB_EXISTING_IMAGE>();

TRACFCOMP( g_trac_runtime, "ATTR_HB_EXISTING_IMAGE (hb_images) = %#x",
TRACFCOMP( g_trac_runtime, "ATTR_HB_EXISTING_IMAGE (hb_images) = %x",
hb_images);

// Figure out which node we are running on
Expand All @@ -2844,7 +2860,7 @@ errlHndl_t populate_hbRuntimeData( void )

uint64_t nodeid = pe.instance;

TRACFCOMP( g_trac_runtime, "Master node nodid = %#x",
TRACFCOMP( g_trac_runtime, "Master node nodid = %x",
nodeid);

// ATTR_HB_EXISTING_IMAGE only gets set on a multi-drawer system.
Expand All @@ -2863,6 +2879,19 @@ errlHndl_t populate_hbRuntimeData( void )
}
else
{
//When PAYLOAD_KIND = NONE (aka simics)
//Configure the ATTR_HBRT_HYP_ID attributes
//When PAYLOAD_KIND is set, we call this function from
//populate_HbRsvMem as that function is also executed on slave
//nodes in a multi-node config. But, moving it there removes
//this call in simics case. Therefore, adding it here.
l_elog = RUNTIME::configureHbrtHypIds(TARGETING::is_phyp_load());
if (l_elog)
{
TRACFCOMP(g_trac_runtime, ERR_MRK"populate_HbRsvMem> i_nodeId=%d"
" configureHbrtHypIds failed");
break;
}
// still fill in HB DATA for testing
uint64_t l_startAddr = cpu_spr_value(CPU_SPR_HRMOR) +
VMM_HB_DATA_TOC_START_OFFSET;
Expand Down

0 comments on commit 5ca1d49

Please sign in to comment.