summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDzuy Nguyen <dzuy@us.ibm.com>2017-06-21 14:58:40 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-06-27 17:57:58 -0400
commit0ffbb55230683d680c3a4dbc6ba40b4af5c61572 (patch)
treeb607f8e6daf821110ee46e02237fca2de1866bae
parent91ee8be3c9b450281313bab09c2f99c0611a5eff (diff)
downloadtalos-hostboot-0ffbb55230683d680c3a4dbc6ba40b4af5c61572.tar.gz
talos-hostboot-0ffbb55230683d680c3a4dbc6ba40b4af5c61572.zip
Add host_load_io_ppe to istep16
Change-Id: I41313465a0780eccc458b23a999fdfa357a84965 RTC: 174364 CMVC-Prereq: 1026204 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41501 Reviewed-by: Martin Gloff <mgloff@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: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/include/usr/isteps/istep16list.H17
-rw-r--r--src/usr/isteps/istep16/call_host_load_io_ppe.C224
-rw-r--r--src/usr/isteps/istep16/makefile7
3 files changed, 247 insertions, 1 deletions
diff --git a/src/include/usr/isteps/istep16list.H b/src/include/usr/isteps/istep16list.H
index 5ccac0e5a..13fbd5868 100644
--- a/src/include/usr/isteps/istep16list.H
+++ b/src/include/usr/isteps/istep16list.H
@@ -99,6 +99,17 @@ void* call_mss_scrub( void *io_pArgs );
*
*/
void* call_host_ipl_complete( void *io_pArgs );
+
+/**
+ * @brief host_load_io_ppe
+ *
+ * param[in,out] - pointer to any arguments, usually NULL
+ *
+ * return any errlogs to istep
+ *
+ */
+void* call_host_load_io_ppe( void *io_pArgs );
+
};
@@ -137,6 +148,11 @@ namespace INITSERVICE
ISTEP_16::call_host_ipl_complete,
{ START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false }
},
+ {
+ ISTEPNAME(16,06,"host_load_io_ppe"),
+ ISTEP_16::call_host_load_io_ppe,
+ { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false }
+ },
};
const DepModInfo g_istep16Dependancies = {
@@ -144,6 +160,7 @@ const DepModInfo g_istep16Dependancies = {
DEP_LIB(libistep16.so),
DEP_LIB(libp9_cpuWkup.so),
DEP_LIB(libisteps_mss.so),
+ DEP_LIB(libpm.so),
#ifdef CONFIG_IPLTIME_CHECKSTOP_ANALYSIS
DEP_LIB(libocc.so),
#endif
diff --git a/src/usr/isteps/istep16/call_host_load_io_ppe.C b/src/usr/isteps/istep16/call_host_load_io_ppe.C
new file mode 100644
index 000000000..3d193bf74
--- /dev/null
+++ b/src/usr/isteps/istep16/call_host_load_io_ppe.C
@@ -0,0 +1,224 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/isteps/istep16/call_host_load_io_ppe.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+
+#include <errl/errlentry.H>
+#include <initservice/isteps_trace.H>
+#include <isteps/hwpisteperror.H>
+#include <errl/errludtarget.H>
+#include <errl/errlmanager.H>
+
+// targeting support
+#include <targeting/common/commontargeting.H>
+#include <targeting/common/utilFilter.H>
+#include <fapi2/target.H>
+#include <fapi2/plat_hwp_invoker.H>
+
+#include <p9_io_obus_image_build.H>
+#include <p9_io_xbus_image_build.H>
+
+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)
+ {
+ 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;
+ }
+
+ // Get all OBUS targets
+ TARGETING::TargetHandleList l_obusTargetList;
+ getAllChiplets(l_obusTargetList, TYPE_OBUS);
+ // Get all XBUS targets
+ TARGETING::TargetHandleList l_xbusTargetList;
+ getAllChiplets(l_xbusTargetList, TYPE_XBUS);
+
+ // 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));
+// TODO RTC 176314
+#if 0
+
+ FAPI_INVOKE_HWP( l_err,
+ p9_io_obus_image_build,
+ l_obusTarget,
+ 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);
+ }
+#endif
+ }
+
+ // Loop through XBUS
+ for (const auto & l_xbusTarget: l_xbusTargetList)
+ {
+
+ const fapi2::Target<fapi2::TARGET_TYPE_XBUS>
+ l_xbusFapi2Target(
+ (const_cast<TARGETING::Target*>(l_xbusTarget)));
+
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running p9_io_xbus_image_build HWP on "
+ "XBUS target %.8X",
+ TARGETING::get_huid(l_xbusTarget));
+
+// TODO RTC 176314
+#if 0
+ FAPI_INVOKE_HWP( l_err,
+ p9_io_xbus_image_build,
+ l_xbusTarget,
+ 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_xbusTarget),
+ l_err->plid());
+
+ l_stepError.addErrorDetails(l_err);
+ errlCommit(l_err, HWPF_COMP_ID);
+ }
+#endif
+ } // end of looping through Obus pairs
+ } 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 ");
+
+ return l_stepError.getErrorHandle();
+}
+
+
+};
diff --git a/src/usr/isteps/istep16/makefile b/src/usr/isteps/istep16/makefile
index 03841b227..54d409358 100644
--- a/src/usr/isteps/istep16/makefile
+++ b/src/usr/isteps/istep16/makefile
@@ -32,28 +32,33 @@ EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/perv/
EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/nest/
EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/lib/
EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/memory
+EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/io/
EXTRAINCDIR += ${ROOTPATH}/src/import
EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/xip/
OBJS += call_host_activate_master.o
OBJS += call_host_activate_slave_cores.o
OBJS += call_host_secure_rng.o
OBJS += call_mss_scrub.o
OBJS += call_host_ipl_complete.o
-
+OBJS += call_host_load_io_ppe.o
include ${ROOTPATH}/procedure.rules.mk
include ${PROCEDURES_PATH}/hwp/pm/p9_dump_stop_info.mk
include ${PROCEDURES_PATH}/hwp/perv/p9_switch_cfsim.mk
include ${PROCEDURES_PATH}/hwp/perv/p9_switch_rec_attn.mk
include ${PROCEDURES_PATH}/hwp/nest/p9_rng_init_phase2.mk
+include ${PROCEDURES_PATH}/hwp/io/p9_io_xbus_image_build.mk
+include ${PROCEDURES_PATH}/hwp/io/p9_io_obus_image_build.mk
include ${ROOTPATH}/config.mk
VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/pm/
VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/perv/
VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/nest/
+VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/io/
OpenPOWER on IntegriCloud