summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/include/usr/isteps/istep21list.H9
-rw-r--r--src/makefile1
-rw-r--r--src/usr/hwpf/hwp/pstates/makefile7
-rwxr-xr-xsrc/usr/hwpf/hwp/pstates/pstates/p8_build_pstate_datablock.C54
-rwxr-xr-xsrc/usr/hwpf/hwp/pstates/pstates/proc_set_max_pstate.C165
-rwxr-xr-xsrc/usr/hwpf/hwp/pstates/pstates/proc_set_max_pstate.H43
-rwxr-xr-xsrc/usr/hwpf/hwp/pstates/pstates/pstate_tables.h9
-rwxr-xr-xsrc/usr/hwpf/hwp/pstates/pstates/pstates.h13
-rw-r--r--src/usr/hwpf/hwp/start_payload/HBconfig4
-rw-r--r--src/usr/hwpf/hwp/start_payload/makefile6
-rw-r--r--src/usr/hwpf/hwp/start_payload/start_payload.C65
-rw-r--r--src/usr/targeting/common/xmltohb/target_types.xml1
12 files changed, 370 insertions, 7 deletions
diff --git a/src/include/usr/isteps/istep21list.H b/src/include/usr/isteps/istep21list.H
index 1ba07f61b..53c02bb82 100644
--- a/src/include/usr/isteps/istep21list.H
+++ b/src/include/usr/isteps/istep21list.H
@@ -5,7 +5,10 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012,2014 */
+/* Contributors Listed Below - COPYRIGHT 2012,2014 */
+/* [+] Google Inc. */
+/* [+] 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. */
@@ -48,6 +51,7 @@
#include <initservice/initsvcstructs.H>
#include <initservice/initsvcreasoncodes.H>
+#include <config.h>
// include prototypes file
#include "../../../usr/hwpf/hwp/start_payload/start_payload.H"
@@ -83,6 +87,9 @@ const DepModInfo g_istep21Dependancies = {
DEP_LIB(libstart_payload.so),
DEP_LIB(libruntime.so),
DEP_LIB(libdevtree.so),
+#ifdef CONFIG_SET_NOMINAL_PSTATE
+ DEP_LIB(libpstates.so),
+#endif
/*
* This library is loaded dynamically when needed in start_payload.
* Adding statement here to make listdeps.pl happy.
diff --git a/src/makefile b/src/makefile
index 96ae6b4ea..33e74f778 100644
--- a/src/makefile
+++ b/src/makefile
@@ -162,6 +162,7 @@ EXTENDED_MODULES += sbe
EXTENDED_MODULES += proc_hwreconfig
EXTENDED_MODULES += $(if $(CONFIG_GPIODD),gpio,)
EXTENDED_MODULES += $(if $(CONFIG_CONSOLE),console)
+EXTENDED_MODULES += $(if $(CONFIG_SET_NOMINAL_PSTATE),pstates)
TESTCASE_MODULES += cxxtest
TESTCASE_MODULES += testtrace
diff --git a/src/usr/hwpf/hwp/pstates/makefile b/src/usr/hwpf/hwp/pstates/makefile
index 1ef54e851..defe4b1e4 100644
--- a/src/usr/hwpf/hwp/pstates/makefile
+++ b/src/usr/hwpf/hwp/pstates/makefile
@@ -5,7 +5,10 @@
#
# OpenPOWER HostBoot Project
#
-# COPYRIGHT International Business Machines Corp. 2013,2014
+# Contributors Listed Below - COPYRIGHT 2013,2014
+# [+] International Business Machines Corp.
+# [+] Google Inc.
+#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -52,6 +55,8 @@ OBJS += proc_get_voltage.o
OBJS += pstates.o
OBJS += pstate_tables.o
+OBJS += proc_set_max_pstate.o
+
## NOTE: add a new directory onto the vpaths when you add a new HWP
##@ VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/???
VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/pstates/pstates
diff --git a/src/usr/hwpf/hwp/pstates/pstates/p8_build_pstate_datablock.C b/src/usr/hwpf/hwp/pstates/pstates/p8_build_pstate_datablock.C
index 0855dc3cf..54a2290d6 100755
--- a/src/usr/hwpf/hwp/pstates/pstates/p8_build_pstate_datablock.C
+++ b/src/usr/hwpf/hwp/pstates/pstates/p8_build_pstate_datablock.C
@@ -7,6 +7,7 @@
/* */
/* Contributors Listed Below - COPYRIGHT 2013,2014 */
/* [+] International Business Machines Corp. */
+/* [+] Google Inc. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -22,7 +23,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: p8_build_pstate_datablock.C,v 1.39 2014/07/22 21:45:45 daviddu Exp $
+// $Id: p8_build_pstate_datablock.C,v 1.00039 2014/07/22 21:45:45 daviddu Exp $
// $Source: /afs/awd/projects/eclipz/KnowledgeBase/.cvsroot/eclipz/chips/p8/working/procedures/ipl/fapi/p8_build_pstate_datablock.C,v $
//------------------------------------------------------------------------------
// *! (C) Copyright International Business Machines Corp. 2012
@@ -705,6 +706,36 @@ ReturnCode proc_get_attributes(const Target& i_target,
return l_rc;
}
+const uint8_t NON_ECO_VOLTAGE_BUCKET_OFFFSET = 0x04;
+const uint8_t ALTERNATE_BUCKET_OFFSET = 0x05;
+const uint8_t BUCKET_ID_MASK = 0x0F;
+const uint8_t VPD_VINI_PR_DATA_LENGTH = 8;
+
+const uint8_t DEFAULT_BUCKET = 1;
+
+static int get_bucket_from_pr(const Target& i_target)
+{
+ ReturnCode l_rc;
+ uint8_t l_buffer[VPD_VINI_PR_DATA_LENGTH];
+ uint32_t l_bufferSize = sizeof(l_buffer);
+
+ l_rc = fapiGetMvpdField(fapi::MVPD_RECORD_VINI,
+ fapi::MVPD_KEYWORD_PR,
+ i_target,
+ l_buffer,
+ l_bufferSize);
+
+ if (l_rc)
+ {
+ return DEFAULT_BUCKET;
+ }
+
+ uint8_t l_bucketId = l_buffer[NON_ECO_VOLTAGE_BUCKET_OFFFSET] &
+ BUCKET_ID_MASK;
+
+ return l_bucketId != 0 ? l_bucketId : DEFAULT_BUCKET;
+}
+
/// ----------------------------------------------------------------
/// \brief Get #V data and put into array
/// \param[in] i_target => Chip Target
@@ -735,6 +766,7 @@ ReturnCode proc_get_mvpd_data(const Target& i_target,
uint8_t ii = 0;
uint8_t first_chplt = 1;
uint8_t bucket_id = 0;
+ uint8_t pr_bucket_id = 0;
uint16_t cal_data[4];
do
@@ -795,6 +827,16 @@ ReturnCode proc_get_mvpd_data(const Target& i_target,
break;
}
+ // Get the correct bucket according to FRU PR data.
+ pr_bucket_id = get_bucket_from_pr(i_target);
+ if (l_bufferSize < PDV_BUFFER_SIZE * pr_bucket_id) {
+ const uint32_t &BUFFER_SIZE = l_bufferSize;
+ const Target &CHIP_TARGET= i_target;
+ FAPI_ERR("**** ERROR : Not enough buckets returned from fapiGetMvpdField for #V => %d", l_bufferSize );
+ FAPI_SET_HWP_ERROR(l_rc, RC_PROCPM_PSTATE_DATABLOCK_PDV_BUFFER_SIZE_ERROR);
+ break;
+ }
+
// clear array
memset(chiplet_mvpd_data, 0, sizeof(chiplet_mvpd_data));
@@ -802,9 +844,15 @@ ReturnCode proc_get_mvpd_data(const Target& i_target,
#define UINT16_GET(__uint8_ptr) ((uint16_t)( ( (*((const uint8_t *)(__uint8_ptr)) << 8) | *((const uint8_t *)(__uint8_ptr) + 1) ) ))
// use copy of allocated buffer pointer to increment through buffer
- l_buffer_inc = l_buffer;
+ // Skip version and 'PNP' from header.
+ l_buffer_inc = l_buffer + 4;
bucket_id = *l_buffer_inc;
+ while (bucket_id != pr_bucket_id &&
+ (l_buffer_inc - l_buffer) < l_bufferSize) {
+ l_buffer_inc += PDV_BUFFER_SIZE;
+ bucket_id = *l_buffer_inc;
+ }
l_buffer_inc++;
FAPI_INF("#V chiplet = %u bucket id = %u", l_chipNum, bucket_id);
@@ -1282,7 +1330,7 @@ ReturnCode proc_res_clock (PstateSuperStructure *pss,
freq_khz = attr_list->attr_name; \
FAPI_INF("Converting %s (%u khz) to Pstate", #attr_name, freq_khz); \
rc = freq2pState(&(pss->gpst), freq_khz, &pstate); \
- if (rc) break; \
+ if ((rc) && (rc != -PSTATE_LT_PSTATE_MIN)) break; \
rc = pstate_minmax_chk(&(pss->gpst), &pstate); \
if (rc == -GPST_PSTATE_GT_GPST_PMAX) { \
pstate = gpst_pmax(&(pss->gpst)); \
diff --git a/src/usr/hwpf/hwp/pstates/pstates/proc_set_max_pstate.C b/src/usr/hwpf/hwp/pstates/pstates/proc_set_max_pstate.C
new file mode 100755
index 000000000..73032a166
--- /dev/null
+++ b/src/usr/hwpf/hwp/pstates/pstates/proc_set_max_pstate.C
@@ -0,0 +1,165 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/pstates/pstates/proc_set_max_pstate.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] Google Inc. */
+/* [+] 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 */
+/// \file proc_set_max_pstate.C
+//------------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------
+// Includes
+// ----------------------------------------------------------------------
+#include <fapi.H>
+
+#include "ecmdDataBufferBase.H"
+#include "pstate_tables.h"
+#include "lab_pstates.h"
+#include "pstates.h"
+
+#include "proc_get_voltage.H"
+#include "p8_scom_addresses.H"
+
+extern "C" {
+
+fapi::ReturnCode proc_set_max_pstate(const fapi::Target& i_proc_target)
+{
+ fapi::ReturnCode l_rc;
+ uint32_t i = 0;
+ PstateSuperStructure pss;
+ gpst_entry_t entry;
+ Pstate pnom = 0;
+ uint8_t freq_pstate_index = 0;
+ uint64_t freq_nom_khz = 0;
+ uint32_t vdd = 0;
+ uint32_t vcs = 0;
+ std::vector<fapi::Target> l_exChiplets;
+ std::vector<fapi::Target> l_coreChiplets;
+
+ // Create pstate super structure
+ FAPI_ERR("Executing proc_set_max_pstate");
+
+ FAPI_EXEC_HWP(l_rc, p8_build_pstate_datablock, i_proc_target, &pss);
+ if (!l_rc.ok()) {
+ FAPI_ERR("Error calling p8_build_pstate_datablock");
+ return l_rc;
+ }
+
+ // Get nominal frequency.
+ uint32_t sys_freq_nom = 0;
+ l_rc = FAPI_ATTR_GET(ATTR_FREQ_CORE_NOMINAL, NULL, sys_freq_nom);
+ if (l_rc) { return l_rc; }
+ sys_freq_nom *= 1000; // Convert to khz.
+
+ // Get the pstate closest to nominal frequency.
+ if (freq2pState(&pss.gpst, sys_freq_nom, &pnom))
+ {
+ // Failed to find a frequency. Use pmin.
+ FAPI_ERR("Unable to find a frequency closest to nominal. Using pmin.");
+ pnom = gpst_pmin(&pss.gpst);
+ }
+
+ freq_nom_khz = (pss.gpst.pstate0_frequency_khz +
+ pss.gpst.frequency_step_khz * pnom);
+
+ // Convert pstate to pstate table index and lookup voltages
+ freq_pstate_index = pnom - pss.gpst.pmin;
+ entry.value = revle64(pss.gpst.pstate[freq_pstate_index].value);
+ vdd = entry.fields.evid_vdd;
+ vcs = entry.fields.evid_vcs;
+
+ FAPI_INF("%s nominal pstate is %d, freq: %dKhz VDD: %dmV VCS: %dmV",
+ i_proc_target.toEcmdString(), pnom, freq_nom_khz,
+ VRM11_BASE_UV - 6250 * vdd, VRM11_BASE_UV - 6250 * vcs);
+
+ // Set the voltage.
+ ecmdDataBufferBase wdata_reg(64);
+ wdata_reg.setByte(0, 0);
+ wdata_reg.setByte(1, vdd);
+ wdata_reg.setByte(2, vcs);
+ wdata_reg.setByte(3, 0);
+ l_rc = fapiPutScom(i_proc_target, PMC_O2S_WDATA_REG_0x00062058, wdata_reg);
+ if (l_rc)
+ {
+ FAPI_ERR("SCOM to PMC_O2S_WDATA_REG_0x00062058 failed.");
+ return l_rc;
+ }
+ // Wait for voltage ramp.
+ fapiDelay(1e8, 0);
+
+ // Set the frequency on each EX.
+ l_rc = fapiGetChildChiplets (i_proc_target, fapi::TARGET_TYPE_EX_CHIPLET,
+ l_exChiplets, fapi::TARGET_STATE_FUNCTIONAL);
+ if (l_rc)
+ {
+ FAPI_ERR("Error from fapiGetChildChiplets!");
+ return l_rc;
+ }
+
+ for (i = 0; i < l_exChiplets.size(); i++)
+ {
+ uint8_t l_chipNum = 0xFF;
+ l_rc = FAPI_ATTR_GET(ATTR_CHIP_UNIT_POS, &l_exChiplets[i], l_chipNum);
+ if (l_rc)
+ {
+ FAPI_ERR("fapiGetAttribute of ATTR_CHIP_UNIT_POS error");
+ return l_rc;
+ }
+
+ ecmdDataBufferBase freqcntl_reg(64);
+ l_rc = fapiGetScom(i_proc_target,
+ EX_FREQCNTL_0x100F0151 + (l_chipNum * 0x01000000),
+ freqcntl_reg);
+ if (l_rc)
+ {
+ return l_rc;
+ }
+
+ // Set frequency multiplier based on ref clock.
+ uint32_t mult = freq_nom_khz / 1000 / 33;
+ freqcntl_reg.insertFromRight(&mult, 0, 9);
+ freqcntl_reg.insertFromRight(&mult, 9, 9);
+
+ FAPI_ERR("%s setting to multiplier %dX",
+ l_exChiplets[i].toEcmdString(),
+ mult);
+ l_rc = fapiPutScom(i_proc_target,
+ EX_FREQCNTL_0x100F0151 + (l_chipNum * 0x01000000),
+ freqcntl_reg);
+ if (l_rc)
+ {
+ return l_rc;
+ }
+
+ unsigned int freq_mhz = freq_nom_khz / 1000;
+ l_rc = FAPI_ATTR_SET(ATTR_FREQ_CORE, &l_exChiplets[i], freq_mhz);
+ if (l_rc)
+ {
+ return l_rc;
+ }
+ }
+
+ return l_rc;
+}
+
+} //end extern C
+
diff --git a/src/usr/hwpf/hwp/pstates/pstates/proc_set_max_pstate.H b/src/usr/hwpf/hwp/pstates/pstates/proc_set_max_pstate.H
new file mode 100755
index 000000000..bf3d2d0d6
--- /dev/null
+++ b/src/usr/hwpf/hwp/pstates/pstates/proc_set_max_pstate.H
@@ -0,0 +1,43 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/pstates/pstates/proc_set_max_pstate.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] International Business Machines Corp. */
+/* [+] Google Inc. */
+/* */
+/* */
+/* 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 */
+#ifndef _proc_set_max_pstate_H_
+#define _proc_set_max_pstate_H_
+
+#include <fapi.H>
+
+extern "C" {
+
+//------------------------------------------------------------------------------
+// Function prototype
+//------------------------------------------------------------------------------
+/// \brief Set Maximum pstate
+/// \param[in] i_target Chip Target
+
+fapi::ReturnCode proc_set_max_pstate(const fapi::Target& i_target);
+
+} // extern "C"
+
+#endif
diff --git a/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.h b/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.h
index be0116f10..49d56eff3 100755
--- a/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.h
+++ b/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.h
@@ -7,6 +7,7 @@
/* */
/* Contributors Listed Below - COPYRIGHT 2013,2014 */
/* [+] International Business Machines Corp. */
+/* [+] Google Inc. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -43,6 +44,10 @@
#ifndef __ASSEMBLER__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/// A VPD operating point
///
/// VPD operating points are stored without load-line correction. Frequencies
@@ -197,6 +202,10 @@ void write_HWtab_bin(ivrm_parm_data_t* i_ivrm_parms,
double C[],
PstateSuperStructure* pss);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif // __ASSEMBLER__
#endif // __PSTATE_TABLES_H__
diff --git a/src/usr/hwpf/hwp/pstates/pstates/pstates.h b/src/usr/hwpf/hwp/pstates/pstates/pstates.h
index aabd7d9c8..8c5ea2b6d 100755
--- a/src/usr/hwpf/hwp/pstates/pstates/pstates.h
+++ b/src/usr/hwpf/hwp/pstates/pstates/pstates.h
@@ -5,7 +5,10 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* COPYRIGHT International Business Machines Corp. 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* [+] International Business Machines Corp. */
+/* [+] Google Inc. */
+/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
@@ -30,6 +33,10 @@
#include "pgp_common.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
////////////////////////////////////////////////////////////////////////////
// Global and Local Pstate Tables
////////////////////////////////////////////////////////////////////////////
@@ -605,6 +612,10 @@ lpst_pmax(const LocalPstateArray* lpsa)
return (int)(lpsa->pmin) + (int)(lpsa->entries) - 1;
}
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif /* __ASSEMBLER__ */
#endif /* __PSTATES_H__ */
diff --git a/src/usr/hwpf/hwp/start_payload/HBconfig b/src/usr/hwpf/hwp/start_payload/HBconfig
new file mode 100644
index 000000000..3ab9e3e8d
--- /dev/null
+++ b/src/usr/hwpf/hwp/start_payload/HBconfig
@@ -0,0 +1,4 @@
+config SET_NOMINAL_PSTATE
+ default n
+ help
+ Set the PState to Nominal just before starting the payload.
diff --git a/src/usr/hwpf/hwp/start_payload/makefile b/src/usr/hwpf/hwp/start_payload/makefile
index 3656cf203..adde9ce6d 100644
--- a/src/usr/hwpf/hwp/start_payload/makefile
+++ b/src/usr/hwpf/hwp/start_payload/makefile
@@ -5,7 +5,10 @@
#
# OpenPOWER HostBoot Project
#
-# COPYRIGHT International Business Machines Corp. 2012,2014
+# Contributors Listed Below - COPYRIGHT 2012,2014
+# [+] International Business Machines Corp.
+# [+] Google Inc.
+#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -44,6 +47,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/start_payload
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_set_pore_bar
EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp/utility_procedures
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build
+EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/pstates/pstates
## NOTE: add new object files when you add a new HWP
OBJS += start_payload.o
diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C
index 9080628fa..19fb2dcec 100644
--- a/src/usr/hwpf/hwp/start_payload/start_payload.C
+++ b/src/usr/hwpf/hwp/start_payload/start_payload.C
@@ -73,6 +73,7 @@
#include "p8_cpu_special_wakeup.H"
#include "p8_pore_table_gen_api.H"
#include <p8_scom_addresses.H>
+#include "proc_set_max_pstate.H"
#include "start_payload.H"
#include <runtime/runtime.H>
@@ -84,6 +85,7 @@
#include <pnor/pnorif.H>
#include <sys/mm.h>
#include <algorithm>
+#include <config.h>
// Uncomment these files as they become available:
// #include "host_start_payload/host_start_payload.H"
@@ -216,6 +218,59 @@ errlHndl_t clearPoreBars ( void )
return l_errl;
}
+#ifdef CONFIG_SET_NOMINAL_PSTATE
+errlHndl_t setMaxPstate ( void )
+{
+ errlHndl_t l_errl = NULL;
+
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "Speed up to max P-state" );
+
+ TARGETING::TargetHandleList l_procTargetList;
+ getAllChips(l_procTargetList, TYPE_PROC);
+
+ // loop thru all the cpus
+ for (TargetHandleList::const_iterator
+ l_proc_iter = l_procTargetList.begin();
+ l_proc_iter != l_procTargetList.end();
+ ++l_proc_iter)
+ {
+ // make a local copy of the CPU target
+ const TARGETING::Target* l_proc_target = *l_proc_iter;
+
+ // trace HUID
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "target HUID %.8X", TARGETING::get_huid(l_proc_target));
+
+ // cast OUR type of target to a FAPI type of target.
+ fapi::Target l_fapi_proc_target( TARGET_TYPE_PROC_CHIP,
+ (const_cast<TARGETING::Target*>(
+ l_proc_target)) );
+
+ // call the HWP with each fapi::Target
+ FAPI_INVOKE_HWP( l_errl,
+ proc_set_max_pstate,
+ l_fapi_proc_target);
+ if ( l_errl )
+ {
+ // capture the target data in the elog
+ ERRORLOG::ErrlUserDetailsTarget(l_proc_target).addToLog( l_errl );
+
+ TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace,
+ "ERROR : setMaxPstate, PLID=0x%x",
+ l_errl->plid() );
+ break;
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS : setMaxPstate" );
+ }
+ } // end for
+
+ return l_errl;
+}
+#endif
//
// Wrapper function to call host_runtime_setup
@@ -314,6 +369,16 @@ void* call_host_runtime_setup( void *io_pArgs )
}
}
+#ifdef CONFIG_SET_NOMINAL_PSTATE
+ // Speed up processors.
+ l_err = setMaxPstate();
+ if (l_err)
+ {
+ l_err->setSev(ERRORLOG::ERRL_SEV_PREDICTIVE);
+ ERRORLOG::errlCommit(l_err, ISTEP_COMP_ID);
+ }
+#endif
+
if( is_sapphire_load() && (!INITSERVICE::spBaseServicesEnabled()) )
{
// Write the devtree out in Sapphire mode when SP Base Services not
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index dcd4bb895..0737c992e 100644
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -678,6 +678,7 @@
<attribute><id>OVERRIDE_MVPD_V_CS_LAB_VOLTAGE</id></attribute>
<attribute><id>OVERRIDE_MVPD_I_CS_LAB_CURRENT</id></attribute>
<attribute><id>PM_SPWUP_IGNORE_XSTOP_FLAG</id></attribute>
+ <attribute><id>FREQ_CORE</id></attribute>
</targetType>
<targetType>
OpenPOWER on IntegriCloud