summaryrefslogtreecommitdiffstats
path: root/src/usr/isteps/istep08
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2016-06-24 15:03:47 -0500
committerMatthew A. Ploetz <maploetz@us.ibm.com>2016-07-08 15:59:09 -0400
commit57d56447cf064b25f749b22e4a1698f78ca48291 (patch)
tree0376d8967131f5d5795c5a9d6026fd8af9a4a973 /src/usr/isteps/istep08
parent08b685d0d4715d6bb631ac1a6a3e99400e3aa43c (diff)
downloadtalos-hostboot-57d56447cf064b25f749b22e4a1698f78ca48291.tar.gz
talos-hostboot-57d56447cf064b25f749b22e4a1698f78ca48291.zip
IStep changes and HWP integration for 8.7 host_set_voltages
Change-Id: I0fb1c5ddfdefee742b0fd1cd7907b2f4cbeba2a6 RTC:144620 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26437 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Andrew J. Geissler <andrewg@us.ibm.com> Reviewed-by: Matthew A. Ploetz <maploetz@us.ibm.com>
Diffstat (limited to 'src/usr/isteps/istep08')
-rw-r--r--src/usr/isteps/istep08/call_host_set_voltages.C107
-rw-r--r--src/usr/isteps/istep08/makefile12
2 files changed, 119 insertions, 0 deletions
diff --git a/src/usr/isteps/istep08/call_host_set_voltages.C b/src/usr/isteps/istep08/call_host_set_voltages.C
new file mode 100644
index 000000000..bbe6f10cf
--- /dev/null
+++ b/src/usr/isteps/istep08/call_host_set_voltages.C
@@ -0,0 +1,107 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/isteps/istep08/call_host_set_voltages.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2016 */
+/* [+] 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 */
+/******************************************************************************/
+// Includes
+/******************************************************************************/
+#include <stdint.h>
+#include <trace/interface.H>
+#include <errl/errlentry.H>
+#include <initservice/isteps_trace.H>
+#include <isteps/hwpisteperror.H>
+// targeting support
+#include <targeting/common/commontargeting.H>
+#include <targeting/common/utilFilter.H>
+#include <errl/errlmanager.H>
+#include <fapi2/target.H>
+#include <fapi2/plat_hwp_invoker.H>
+
+
+#include <p9_setup_evid.H>
+
+
+using namespace TARGETING;
+using namespace ERRORLOG;
+using namespace ISTEP_ERROR;
+
+namespace ISTEP_08
+{
+
+//*****************************************************************************
+// call_host_set_voltages()
+//*****************************************************************************
+void* call_host_set_voltages(void *io_pArgs)
+{
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_host_set_voltages enter");
+
+ errlHndl_t l_err = NULL;
+ TargetHandleList l_procList;
+ IStepError l_stepError;
+
+ do
+ {
+ // Get the systems procs
+ getAllChips( l_procList,
+ TYPE_PROC,
+ true ); // true: return functional procs
+
+ // Iterate over the found procs calling p9_setup_evid
+ for( const auto & l_procTarget : l_procList )
+ {
+ // Cast to fapi2 target
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>
+ l_fapiProcTarget( l_procTarget );
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Running p9_setup_evid HWP on processor target %.8X",
+ get_huid( l_procTarget ) );
+
+ FAPI_INVOKE_HWP( l_err,
+ p9_setup_evid,
+ l_fapiProcTarget,
+ APPLY_VOLTAGE_SETTINGS);
+
+ if( l_err )
+ {
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "Error running p9_setup_evid on processor target %.8X",
+ get_huid( l_procTarget ) );
+ l_stepError.addErrorDetails( l_err );
+
+ errlCommit( l_err, HWPF_COMP_ID );
+ }
+ } // Processor loop
+
+ }while( 0 );
+
+
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "call_host_set_voltages exit");
+
+ // end task, returning any errorlogs to IStepDisp
+ return l_stepError.getErrorHandle();
+}
+
+}; // end namespace
diff --git a/src/usr/isteps/istep08/makefile b/src/usr/isteps/istep08/makefile
index fcaebcf77..da41c61bf 100644
--- a/src/usr/isteps/istep08/makefile
+++ b/src/usr/isteps/istep08/makefile
@@ -32,12 +32,14 @@ EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/sbe/
EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/nest/
EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/io/
EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/initfiles/
+EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/lib
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/usr/isteps/
+EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/pm/include/registers
OBJS += call_host_slave_sbe_config.o
OBJS += call_host_setup_sbe.o
@@ -57,10 +59,13 @@ OBJS += call_proc_pcie_scominit.o
OBJS += call_proc_scomoverride_chiplets.o
OBJS += call_proc_chiplet_enable_ridi.o
OBJS += call_host_rng_bist.o
+OBJS += call_host_set_voltages.o
VPATH += ${PROCEDURES_PATH}/hwp/perv/ ${PROCEDURES_PATH}/hwp/nest/
VPATH += ${PROCEDURES_PATH}/hwp/io/ ${PROCEDURES_PATH}/hwp/initfiles/
VPATH += ${PROCEDURES_PATH}/hwp/sbe/
+VPATH += ${PROCEDURES_PATH}/hwp/pm/
+VPATH += ${PROCEDURES_PATH}/hwp/lib
include ${ROOTPATH}/procedure.rules.mk
@@ -132,4 +137,11 @@ include ${PROCEDURES_PATH}/hwp/perv/p9_chiplet_enable_ridi.mk
# host_rng_bist : Trigger Built In Self Test
# HWP not ready - p9_trigger_rng_bist.mk
+# p9_setup_evid : apply voltage settings
+include ${PROCEDURES_PATH}/hwp/pm/p9_setup_evid.mk
+include ${PROCEDURES_PATH}/hwp/lib/p9_avsbus_lib.mk
+
+MODULE=istep08
+
+
include ${ROOTPATH}/config.mk
OpenPOWER on IntegriCloud