Skip to content

Commit

Permalink
SMP wrap mode - Run host_load_io_ppe earlier in Wrap mode.
Browse files Browse the repository at this point in the history
This is done in order to avoid an error if the PPE code
isn't loaded when we attempt to start the PPE.

CQ:SW446328
Change-Id: I32f5ae0c617cf4d29dd6a6744158febe7b05e9da
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66885
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
ibmthi authored and dcrowell77 committed Oct 3, 2018
1 parent a4e14b2 commit bf70b2a
Show file tree
Hide file tree
Showing 6 changed files with 271 additions and 283 deletions.
1 change: 1 addition & 0 deletions src/include/usr/isteps/istep16list.H
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ const DepModInfo g_istep16Dependancies = {
DEP_LIB(libisteps_mss.so),
DEP_LIB(libpm.so),
DEP_LIB(libimageprocs.so),
DEP_LIB(libisteps_nest.so),
NULL
}
};
Expand Down
8 changes: 7 additions & 1 deletion src/usr/isteps/istep08/call_host_set_voltages.C
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,13 @@ void* call_host_set_voltages(void *io_pArgs)
fapiHWPCallWrapperHandler(P9_FBC_EFF_CONFIG_LINKS_F_T, l_stepError,
HWPF_COMP_ID, TYPE_PROC) &&
fapiHWPCallWrapperHandler(P9_SYS_CHIPLET_SCOMINIT, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
HWPF_COMP_ID, TYPE_PROC) &&
// Make call to p9_io_obus_image_build
fapiHWPCallWrapperHandler(P9_IO_OBUS_IMAGE_BUILD, l_stepError,
HWPF_COMP_ID, TYPE_OBUS) &&
// Make call to p9_io_xbus_image_build
fapiHWPCallWrapperHandler(P9_IO_XBUS_IMAGE_BUILD, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
}
}while( 0 );

Expand Down
161 changes: 13 additions & 148 deletions src/usr/isteps/istep16/call_host_load_io_ppe.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -35,175 +35,40 @@
#include <fapi2/target.H>
#include <fapi2/plat_hwp_invoker.H>

#include <p9_io_obus_image_build.H>
#include <p9_io_xbus_image_build.H>
// isSMPWrapConfig call support
#include <initservice/initserviceif.H>

// HWP call support
#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip

using namespace ERRORLOG;
using namespace TARGETING;
using namespace ISTEP;
using namespace ISTEP_ERROR;
using namespace fapi2;


namespace ISTEP_16
{

/**
* @brief Load HCODE image and return a pointer to it, or NULL
* @param[out] - address of the HCODE image
* @return NULL if success, errorlog if failure
*/
errlHndl_t loadHcodeImage(char *& o_rHcodeAddr)
{
errlHndl_t l_err = NULL;
PNOR::SectionInfo_t l_info;

do
{

#ifdef CONFIG_SECUREBOOT
l_err = loadSecureSection(PNOR::HCODE);
if (l_err)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
ERR_MRK"loadHcodeImage() - Error from "
"loadSecureSection(PNOR::HCODE)");

//No need to commit error here, it gets handled later
//just break out to escape this function
break;
}
#endif

// Get HCODE/WINK PNOR section info from PNOR RP
l_err = PNOR::getSectionInfo( PNOR::HCODE, l_info );
if( l_err )
{
//No need to commit error here, it gets handled later
//just break out to escape this function
break;
}

o_rHcodeAddr = reinterpret_cast<char*>(l_info.vaddr);

TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"HCODE addr = 0x%p ",
o_rHcodeAddr);

} while ( 0 );

return l_err;
}

void* call_host_load_io_ppe (void *io_pArgs)
{
errlHndl_t l_err = NULL;
IStepError l_stepError;

char* l_pHcodeImage = NULL;

TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"host_load_io_ppe entry" );

do
{

l_err = loadHcodeImage(l_pHcodeImage);
if (l_err)
if (!INITSERVICE::isSMPWrapConfig())
{
TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
"call_host_load_io_ppe ERROR : "
"Unable to load HCODE image errorlog PLID=0x%x",
l_err->plid());

l_stepError.addErrorDetails(l_err);
errlCommit( l_err, ISTEP_COMP_ID );
break;
// Make call to p9_io_obus_image_build
fapiHWPCallWrapperHandler(P9_IO_OBUS_IMAGE_BUILD, l_stepError,
HWPF_COMP_ID, TYPE_OBUS) &&
// Make call to p9_io_xbus_image_build
fapiHWPCallWrapperHandler(P9_IO_XBUS_IMAGE_BUILD, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
}

// Get all OBUS targets
TARGETING::TargetHandleList l_obusTargetList;
getAllChiplets(l_obusTargetList, TYPE_OBUS);
// Get all PROC targets for XBUS
TARGETING::TargetHandleList l_procTargetList;
getAllChips(l_procTargetList, TYPE_PROC);

// Loop through OBUS
for (const auto & l_obusTarget: l_obusTargetList)
{
const fapi2::Target<fapi2::TARGET_TYPE_OBUS>
l_obusFapi2Target(
(const_cast<TARGETING::Target*>(l_obusTarget)));

TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"Running p9_io_obus_image_build HWP on "
"OBUS target %.8X",
TARGETING::get_huid(l_obusTarget));

FAPI_INVOKE_HWP( l_err,
p9_io_obus_image_build,
l_obusFapi2Target,
reinterpret_cast<void*>(l_pHcodeImage));

if(l_err)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR 0x%.8X: returned from p9_io_obus_image_build on "
"OBUS target %.8X, PLID=0x%x",
l_err->reasonCode(),
TARGETING::get_huid(l_obusTarget),
l_err->plid());

l_stepError.addErrorDetails(l_err);
errlCommit(l_err, HWPF_COMP_ID);
}
} // end of looping through obus

// Loop through PROC (for XBUS)
for (const auto & l_procTarget: l_procTargetList)
{
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
l_procFapi2Target(
(const_cast<TARGETING::Target*>(l_procTarget)));

TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"Running p9_io_xbus_image_build HWP on "
"XBUS target %.8X",
TARGETING::get_huid(l_procTarget));

FAPI_INVOKE_HWP( l_err,
p9_io_xbus_image_build,
l_procFapi2Target,
reinterpret_cast<void*>(l_pHcodeImage));

if(l_err)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"ERROR 0x%.8X: returned from p9_io_xbus_image_build on "
"XBUS target %.8X, PLID=0x%x",
l_err->reasonCode(),
TARGETING::get_huid(l_procTarget),
l_err->plid());

l_stepError.addErrorDetails(l_err);
errlCommit(l_err, HWPF_COMP_ID);
}
} // end of looping through xbus
} while( 0 );

#ifdef CONFIG_SECUREBOOT
l_err = unloadSecureSection(PNOR::HCODE);
if (l_err)
{
TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
ERR_MRK"host_load_io_ppe() - Error from "
"unloadSecureSection(PNOR::HCODE)");

l_stepError.addErrorDetails( l_err );
errlCommit( l_err, ISTEP_COMP_ID );
}
#endif

TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
"host_load_io_ppe exit ");

Expand Down
5 changes: 5 additions & 0 deletions src/usr/isteps/nest/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/isteps/
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/xip/

EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/initfiles

Expand Down Expand Up @@ -83,4 +84,8 @@ include ${PROCEDURES_PATH}/hwp/initfiles/p9_npu_scom.mk
include ${PROCEDURES_PATH}/hwp/nest/p9_npu_scominit.mk
include ${PROCEDURES_PATH}/hwp/perv/p9_nv_ref_clk_enable.mk

# p9_io_obus_image_build & p9_io_xbus_image_build
include ${PROCEDURES_PATH}/hwp/io/p9_io_obus_image_build.mk
include ${PROCEDURES_PATH}/hwp/io/p9_io_xbus_image_build.mk

include ${ROOTPATH}/config.mk

0 comments on commit bf70b2a

Please sign in to comment.