diff options
7 files changed, 62 insertions, 34 deletions
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 508a56248..844e1b32c 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 @@ -20,7 +20,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: p8_build_pstate_datablock.C,v 1.35 2014/04/09 22:00:46 stillgs Exp $ +// $Id: p8_build_pstate_datablock.C,v 1.37 2014/06/03 16:59:05 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 @@ -51,11 +51,13 @@ // Includes // ---------------------------------------------------------------------- #include <fapi.H> -#include "pstate_tables.h" -#include "lab_pstates.h" -#include "pstates.h" -#include "p8_pm.H" -#include "p8_build_pstate_datablock.H" +#include <pstate_tables.h> +#include <lab_pstates.h> +#include <pstates.h> +#include <p8_pm.H> +#include <p8_build_pstate_datablock.H> + + extern "C" { @@ -313,6 +315,32 @@ p8_build_pstate_datablock(const Target& i_target, l_rc = proc_boost_gpst (io_pss, attr.attr_cpm_turbo_boost_percent); if (l_rc) break; + // -------------------------------------------------------------------- + // Setup psafe_pstate via attr_pm_safe_frequency (added per SW260812) + // -------------------------------------------------------------------- + Pstate psafe_freq_pstate; + FAPI_INF("Converting attr_pm_safe_frequency in %u MHz to Pstate", attr.attr_pm_safe_frequency); + rc = freq2pState (&((*io_pss).gpst), attr.attr_pm_safe_frequency*1000, &psafe_freq_pstate); + if (rc) break; + FAPI_INF("Producing pstate = %d for attr_pm_safe_frequency = %u Mhz", psafe_freq_pstate, attr.attr_pm_safe_frequency); + rc = pstate_minmax_chk(&((*io_pss).gpst), &psafe_freq_pstate); + if (rc) break; + FAPI_IMP("Now set psafe in Global Pstate Table to be pstate of attr_pm_safe_frequency"); + (*io_pss).gpst.psafe = psafe_freq_pstate; + + // -------------------------------------------------------------------- + // Setup pmin_clip via attr_freq_core_floor (added per SW260911) + // -------------------------------------------------------------------- + Pstate floor_freq_pstate; + FAPI_INF("Converting attr_freq_core_floor in %u MHz to Pstate", attr.attr_freq_core_floor); + rc = freq2pState (&((*io_pss).gpst), attr.attr_freq_core_floor*1000, &floor_freq_pstate); + if (rc) break; + FAPI_INF("Producing pstate = %d for attr_freq_core_floor = %u Mhz", floor_freq_pstate, attr.attr_freq_core_floor); + rc = pstate_minmax_chk(&((*io_pss).gpst), &floor_freq_pstate); + if (rc) break; + FAPI_IMP("Now set pfloor in Global Pstate Table to be pstate of attr_freq_core_floor"); + (*io_pss).gpst.pfloor = floor_freq_pstate; + // ----------------------------- // Create the Local Pstate table // ----------------------------- @@ -531,6 +559,7 @@ ReturnCode proc_get_attributes(const Target& i_target, DATABLOCK_GET_ATTR(ATTR_FREQ_PROC_REFCLOCK, NULL, attr_freq_proc_refclock); DATABLOCK_GET_ATTR(ATTR_FREQ_CORE_MAX, NULL, attr_freq_core_max); DATABLOCK_GET_ATTR(ATTR_PM_SAFE_FREQUENCY, NULL, attr_pm_safe_frequency); + DATABLOCK_GET_ATTR(ATTR_FREQ_CORE_FLOOR, NULL, attr_freq_core_floor); DATABLOCK_GET_ATTR(ATTR_BOOT_FREQ_MHZ, NULL, attr_boot_freq_mhz); DATABLOCK_GET_ATTR(ATTR_CPM_TURBO_BOOST_PERCENT, NULL, attr_cpm_turbo_boost_percent); DATABLOCK_GET_ATTR(ATTR_PROC_R_LOADLINE_VDD, NULL, attr_proc_r_loadline_vdd); diff --git a/src/usr/hwpf/hwp/pstates/pstates/p8_build_pstate_datablock.H b/src/usr/hwpf/hwp/pstates/pstates/p8_build_pstate_datablock.H index 94489e05c..d5447810e 100755 --- a/src/usr/hwpf/hwp/pstates/pstates/p8_build_pstate_datablock.H +++ b/src/usr/hwpf/hwp/pstates/pstates/p8_build_pstate_datablock.H @@ -20,7 +20,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: p8_build_pstate_datablock.H,v 1.13 2014/01/15 17:37:16 jimyac Exp $ +// $Id: p8_build_pstate_datablock.H,v 1.14 2014/05/27 15:33:49 daviddu Exp $ #ifndef _P8_BUILD_PSTATE_DATABLOCK_H_ #define _P8_BUILD_PSTATE_DATABLOCK_H_ @@ -91,7 +91,8 @@ typedef struct { uint32_t attr_dpll_bias; uint32_t attr_undervolting; - uint8_t attr_pm_safe_frequency; + uint32_t attr_pm_safe_frequency; + uint32_t attr_freq_core_floor; uint32_t attr_boot_freq_mhz; uint32_t attr_pm_resonant_clock_full_clock_sector_buffer_frequency; diff --git a/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.c b/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.c index 502f46f01..56a79f21e 100755 --- a/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.c +++ b/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.c @@ -20,7 +20,7 @@ /* permissions and limitations under the License. */ /* */ /* IBM_PROLOG_END_TAG */ -// $Id: pstate_tables.c,v 1.20 2014/04/16 17:56:30 cmolsen Exp $ +// $Id: pstate_tables.c,v 1.21 2014/05/27 15:33:49 daviddu Exp $ /// \file pstate_tables.c /// \brief This file contains code used to generate Pstate tables from real or @@ -565,7 +565,7 @@ gpst_create(GlobalPstateTable *gpst, // Fill in the defaults - gpst->pvsafe = gpst->pmin; + gpst->pvsafe = gpst->pmin+1; fNom = revle32(gpst->pstate0_frequency_khz) / revle32(gpst->frequency_step_khz); diff --git a/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.h b/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.h index 2784a4f1e..12ef17888 100755 --- a/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.h +++ b/src/usr/hwpf/hwp/pstates/pstates/pstate_tables.h @@ -23,13 +23,13 @@ #ifndef __PSTATE_TABLES_H__ #define __PSTATE_TABLES_H__ -// $Id: pstate_tables.h,v 1.8 2014/02/18 16:07:34 jimyac Exp $ +// $Id: pstate_tables.h,v 1.9 2014/06/03 16:59:05 daviddu Exp $ /// \file pstate_tables.h /// \brief Code used to generate Pstate tables from real or imagined chip /// characterizations. -#include "pstates.h" +#include <pstates.h> // Constants associated with VRM stepping diff --git a/src/usr/hwpf/hwp/pstates/pstates/pstates.h b/src/usr/hwpf/hwp/pstates/pstates/pstates.h index c41484d6f..aabd7d9c8 100755 --- a/src/usr/hwpf/hwp/pstates/pstates/pstates.h +++ b/src/usr/hwpf/hwp/pstates/pstates/pstates.h @@ -23,7 +23,7 @@ #ifndef __PSTATES_H__ #define __PSTATES_H__ -// $Id: pstates.h,v 1.10 2013/10/04 18:38:18 jimyac Exp $ +// $Id: pstates.h,v 1.11 2014/05/27 15:33:49 daviddu Exp $ /// \file pstates.h /// \brief Pstate structures and support routines for OCC product firmware @@ -97,7 +97,7 @@ /// kept up to date as changes are made to the layout or contents of the /// structure. -#define PSTATE_SUPERSTRUCTURE_MAGIC 0x5053544154453032ull /* PSTATE02 */ +#define PSTATE_SUPERSTRUCTURE_MAGIC 0x5053544154453033ull /* PSTATE03 */ /// \defgroup pstate_options Pstate Options @@ -388,8 +388,8 @@ typedef struct { /// The significand of the exponential encoding of Pstate stepping delay uint8_t vrm_stepdelay_value; - /// Pad structure to 8-byte alignment - uint8_t pad; + /// The Pstate for minimum core frequency in the system, defined by MRW + uint8_t pfloor; } GlobalPstateTable; diff --git a/src/usr/hwpf/hwp/runtime_attributes/pm_plat_attributes.xml b/src/usr/hwpf/hwp/runtime_attributes/pm_plat_attributes.xml index 433dd7cf6..c3c38108d 100644 --- a/src/usr/hwpf/hwp/runtime_attributes/pm_plat_attributes.xml +++ b/src/usr/hwpf/hwp/runtime_attributes/pm_plat_attributes.xml @@ -20,7 +20,7 @@ <!-- permissions and limitations under the License. --> <!-- --> <!-- IBM_PROLOG_END_TAG --> -<!-- $Id: pm_plat_attributes.xml,v 1.7 2014/01/13 20:49:25 stillgs Exp $ --> +<!-- $Id: pm_plat_attributes.xml,v 1.9 2014/05/20 19:33:20 daviddu Exp $ --> <!-- XML file specifying Power Management HWPF attributes. These attributes are initialized by the platform. @@ -145,12 +145,12 @@ <id>ATTR_PM_SAFE_FREQUENCY</id> <targetType>TARGET_TYPE_SYSTEM</targetType> <description> - Indicates the frequency that the cores will be moved to in the event of - the loss of the OCC Heartbeat. This value needs to be at or below the - boot frequency (as defined by ATTR_BOOT_FREQ_MHZ) to make sure safe operation - of all chiplets. + Frequency (binary in KHz) indicating the frequency that the cores will be moved + to in the event of the loss of the OCC Heartbeat. This value needs to be the maximum + of the DpoMin frequency for proper PowerBus operation and the PowerSave value for + the present part. - Valid Values:-128 thru 127 + Provided by the Machine Readable Workbook after system characterization. The value is translated to the Pstate space. @@ -160,7 +160,7 @@ DYNAMIC_ATTRIBUTE: ATTR_PM_SAFE_PSTATE </description> - <valueType>uint8</valueType> + <valueType>uint32</valueType> <platInit/> </attribute> <!-- ********************************************************************* --> diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml index f46e0d1a8..2887cccc0 100644 --- a/src/usr/targeting/common/xmltohb/attribute_types.xml +++ b/src/usr/targeting/common/xmltohb/attribute_types.xml @@ -4652,25 +4652,23 @@ Divider for the 1us PBAX hang pulse. A hang is detected after two divided hang <attribute> <id>PM_SAFE_FREQUENCY</id> <description> - SYSTEM Attribute - Indicates the frequency that the cores will be moved to in the event of - the loss of the OCC Heartbead. This value needs to be at or below the - nominal frequency to make sure safe operation of all chiplets. + Frequency (binary in KHz) indicating the frequency that the cores will be moved + to in the event of the loss of the OCC Heartbeat. This value needs to be the maximum + of the DpoMin frequency for proper PowerBus operation and the PowerSave value for + the present part. - Valid Values:-128 thru 127 + Provided by the Machine Readable Workbook after system characterization. The value is translated to the Pstate space. - Consumer: proc_pm_effective.C + Producer: Machine Readable Workbook - DYNAMIC_ATTRIBUTE: ATTR_PM_SAFE_PSTATE - - Consumer: proc_pcbs_init.C + Consumers: p8_build_gpstate_table.C - Provided by the Machine Readable Workbook + DYNAMIC_ATTRIBUTE: ATTR_PM_SAFE_PSTATE </description> <simpleType> - <uint8_t></uint8_t> + <uint32_t></uint32_t> </simpleType> <persistency>non-volatile</persistency> <readable/> |