Skip to content

Commit

Permalink
Save and restore OBUS related firmasks
Browse files Browse the repository at this point in the history
During Hostboot IPL time it is impossible to see OBUS peers because
they exists on different nodes and Hostboot is unaware of other nodes.
Because of this we must mask off additional OBUS related firs during
Hostboot IPL time. After we have reached runtime and have re-adjusted
PEER targets we can restore the FIR values to what they were prior
to the additional masking Hostboot does during IPL time.

Change-Id: Ib9c158191c7f68f4bd7126799ba0a0aba40cee18
CQ: SW425530
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58916
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>
  • Loading branch information
crgeddes authored and dcrowell77 committed May 29, 2018
1 parent 264b8c7 commit a093275
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 3 deletions.
29 changes: 27 additions & 2 deletions src/usr/diag/attn/runtime/attn_rt.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* Contributors Listed Below - COPYRIGHT 2014,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -37,6 +37,10 @@
#include <errno.h>
#include <prdf/common/prdfMain_common.H>

#include <p9_io_obus_firmask_save_restore.H>
#include <fapi2_target.H> // fapi2::Target
#include <fapi2/plat_hwp_invoker.H> // FAPI_INVOKE_HWP

using namespace std;
using namespace TARGETING;
using namespace ATTN;
Expand All @@ -57,8 +61,29 @@ namespace ATTN_RT

do
{
// Get a list of all the processors in the system
TARGETING::TargetHandleList l_targetList;
getAllChips(l_targetList, TARGETING::TYPE_PROC);
// Loop through all processors chip targets
for (const auto & l_target: l_targetList)
{
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>l_fapi2Target(l_target);
// Restore firmask values that were stored in attributes after chiplet_scominit.
// Now that we are in HBRT , OBUS peer targets are known so it is okay to
// re-enable the firs that we masked off during Hostboot IPL
FAPI_INVOKE_HWP(err,
p9_io_obus_firmask_save_restore,
l_fapi2Target, p9iofirmasksaverestore::RESTORE);
if(err)
{
// Commit error but don't fail, we lose debug capabilties but this
// should not fail the boot
errlCommit(err, FAPI2_COMP_ID);
}
}

err = initialize();
if ( nullptr != err )
if (err)
{
ATTN_ERR( "ATTN_RT::enableAttns: Failed to initialize PRD" );

Expand Down
13 changes: 12 additions & 1 deletion src/usr/diag/attn/runtime/attn_rt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2012,2014
# Contributors Listed Below - COPYRIGHT 2012,2018
# [+] International Business Machines Corp.
#
#
Expand All @@ -23,5 +23,16 @@
#
# IBM_PROLOG_END_TAG


EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/io/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/

VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/io/

ATTN_RT_OBJS += attn_rt.o
ATTN_RT_OBJS += attnsvc.o
ATTN_RT_OBJS += p9_io_obus_firmask_save_restore.o
3 changes: 3 additions & 0 deletions src/usr/isteps/istep08/call_proc_xbus_enable_ridi.C
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,15 @@ void* call_proc_xbus_enable_ridi( void *io_pArgs )
if (INITSERVICE::isSMPWrapConfig())
{
// Make the FAPI call to p9_chiplet_scominit
// Make the FAPI call to p9_io_obus_firmask_save_restore, if previous call succeeded
// Make the FAPI call to p9_psi_scominit, if previous call succeeded
// Make the FAPI call to p9_io_obus_scominit, if previous call succeeded
// Make the FAPI call to p9_npu_scominit, if previous call succeeded
// Make the FAPI call to p9_chiplet_enable_ridi, if previous call succeeded
fapiHWPCallWrapperHandler(P9_CHIPLET_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_OBUS_FIRMASK_SAVE_RESTORE, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_PSI_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_IO_OBUS_SCOMINIT, l_stepError,
Expand Down
3 changes: 3 additions & 0 deletions src/usr/isteps/istep10/call_proc_chiplet_scominit.C
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@ void* call_proc_chiplet_scominit( void *io_pArgs )
if (!INITSERVICE::isSMPWrapConfig())
{
// Make the FAPI call to p9_chiplet_scominit
// Make the FAPI call to p9_io_obus_firmask_save_restore, if previous call succeeded
// Make the FAPI call to p9_psi_scominit, if previous call succeeded
fapiHWPCallWrapperHandler(P9_CHIPLET_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_OBUS_FIRMASK_SAVE_RESTORE, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_PSI_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
}
Expand Down
1 change: 1 addition & 0 deletions src/usr/isteps/nest/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/
EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/initfiles

OBJS += nestHwpHelperFuncs.o
OBJS += p9_io_obus_firmask_save_restore.o

VPATH += ${PROCEDURES_PATH}/hwp/initfiles
VPATH += ${PROCEDURES_PATH}/hwp/io
Expand Down
8 changes: 8 additions & 0 deletions src/usr/isteps/nest/nestHwpHelperFuncs.C
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#include <p9_fbc_eff_config_links.H>
#include <p9_sys_chiplet_scominit.H>
#include <p9_chiplet_fabric_scominit.H>
#include <p9_io_obus_firmask_save_restore.H>

namespace ISTEP
{
Expand Down Expand Up @@ -81,6 +82,7 @@ const char * hwpCallToString( HWP_CALL_TYPE i_hwpCall )
{ P9_PSI_SCOMINIT, "p9_psi_scominit" },
{ P9_SYS_CHIPLET_SCOMINIT, "p9_sys_chiplet_scominit" },
{ P9_XBUS_ENABLE_RIDI, "p9_xbus_enable_ridi" },
{ P9_OBUS_FIRMASK_SAVE_RESTORE, "p9_io_obus_firmask_save_restore" },
};

if (hwpCallToStringMap.count(i_hwpCall) > 0)
Expand Down Expand Up @@ -208,6 +210,12 @@ void fapiHWPCallWrapper(HWP_CALL_TYPE i_hwpCall,
p9_chiplet_fabric_scominit,
l_fapi2Target);
}
else if (P9_OBUS_FIRMASK_SAVE_RESTORE == i_hwpCall)
{
FAPI_INVOKE_HWP(l_err,
p9_io_obus_firmask_save_restore,
l_fapi2Target, p9iofirmasksaverestore::SAVE);
}
else
{
TRACFCOMP(g_trac_isteps_trace, "ERROR: Invalid/Uknown HWP call");
Expand Down
1 change: 1 addition & 0 deletions src/usr/isteps/nest/nestHwpHelperFuncs.H
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ enum HWP_CALL_TYPE
P9_PSI_SCOMINIT,
P9_SYS_CHIPLET_SCOMINIT, // Although it says chiplet, this uses proc chip
P9_XBUS_ENABLE_RIDI,
P9_OBUS_FIRMASK_SAVE_RESTORE, // loops on proc chip
};

/**
Expand Down

0 comments on commit a093275

Please sign in to comment.