Skip to content

Commit c02404b

Browse files
prasrangdcrowell77
authored andcommitted
p9_pstate_parameter_block: access #W and populate parameter block stucture
Change-Id: I2d996c848d893074cec0eb74408b3300b60ff1d9 RTC:167146 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35721 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: RAHUL BATRA <rbatra@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35723 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: Daniel M. Crowell <dcrowell@us.ibm.com>
1 parent f1f8117 commit c02404b

File tree

9 files changed

+438
-107
lines changed

9 files changed

+438
-107
lines changed

src/import/chips/p9/procedures/hwp/lib/p9_pstates_cmeqm.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,37 @@ typedef struct ResonantClockControl
163163

164164
} ResonantClockingSetup;
165165

166+
// #W data points (version 2)
167+
typedef struct
168+
{
169+
uint16_t ivdd_tdp_ac_current_10ma;
170+
uint16_t ivdd_tdp_dc_current_10ma;
171+
uint8_t vdm_overvold_small_thresholds;
172+
uint8_t vdm_large_extreme_thresholds;
173+
uint8_t vdm_small_frequency_drop;
174+
uint8_t vdm_large_frequency_drop;
175+
uint16_t vdm_spare;
176+
} poundw_entry_t;
166177

178+
typedef struct
179+
{
180+
uint16_t r_package_common;
181+
uint16_t r_quad;
182+
uint16_t r_core;
183+
uint16_t r_quad_header;
184+
uint16_t r_core_header;
185+
} resistance_entry_t;
186+
187+
typedef struct
188+
{
189+
poundw_entry_t poundw_nominal;
190+
poundw_entry_t poundw_powersave;
191+
poundw_entry_t poundw_turbo;
192+
poundw_entry_t poundw_ultraturbo;
193+
resistance_entry_t resistance_data;
194+
uint64_t reserved1;
195+
uint16_t reserved2;
196+
} PoundW_data;
167197
/// VDM/Droop Parameter Block
168198
///
169199
typedef struct

src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.C

Lines changed: 339 additions & 104 deletions
Large diffs are not rendered by default.

src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.H

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ typedef struct
132132
#define PDV_BUFFER_SIZE 51
133133
#define PDV_BUFFER_ALLOC 512
134134

135+
#define POUND_W_VERSION_2_BUCKET_SIZE 60
135136
//#define PDM_BUFFER_SIZE 105
136137
#define PDM_BUFFER_SIZE 257 // Value is for version 3 @ 256 + 1 for version number
137138
#define PDM_BUFFER_ALLOC 513 // Value is for version 2 @ 512 + 1 for version number
@@ -280,7 +281,8 @@ fapi2::ReturnCode
280281
proc_get_mvpd_data ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
281282
uint32_t o_attr_mvpd_data[PV_D][PV_W],
282283
uint32_t* o_valid_pdv_points,
283-
uint8_t* o_present_chiplets );
284+
uint8_t* o_present_chiplets,
285+
uint8_t& o_poundv_bucketId );
284286

285287
/// -------------------------------------------------------------------
286288
/// @brief Perform data validity check on #V data
@@ -309,7 +311,18 @@ proc_chk_valid_poundv ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_tar
309311
fapi2::ReturnCode
310312
proc_get_mvpd_iddq ( const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
311313
IddqTable* io_iddqt);
312-
314+
/// ----------------------------------------------------------------
315+
/// @brief Get #W data and put into array
316+
/// @param[in] i_target => Chip Target
317+
/// @param[in] i_poundv_bucketId => Pound V bucket id
318+
/// @param[out] o_vdmpb => Vdmparamblock data
319+
/// @return FAPI2::SUCCESS
320+
/// ----------------------------------------------------------------
321+
fapi2::ReturnCode
322+
proc_get_mvpd_poundw(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
323+
uint8_t i_poundv_bucketId,
324+
VDMParmBlock* o_vdmpb
325+
);
313326
/// -----------------------------------------------------------------------
314327
/// @brief Get needed attributes
315328
/// @param[in] i_target => Chip Target

src/import/chips/p9/procedures/hwp/pm/p9_pstate_parameter_block.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ $(call ADD_MODULE_INCDIR,$(PROCEDURE),$(PPB_INCLUDES))
3131
#$(call ADD_MODULE_SRCDIR,$(PROCEDURE),$(ROOTPATH)/chips/p9/procedures/hwp/lib)
3232
lib$(PROCEDURE)_DEPLIBS+=p9_pm_utils
3333
lib$(PROCEDURE)_DEPLIBS+=p9_pm_get_poundv_bucket
34+
lib$(PROCEDURE)_DEPLIBS+=p9_pm_get_poundw_bucket
3435
#lib$(PROCEDURE)_DEPLIBS+=p9_pstate_utils
3536
$(call BUILD_PROCEDURE)

src/import/chips/p9/procedures/hwp/pm/p9_setup_evid.C

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,9 @@ avsInitAttributes(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
217217
!attrs->vcs_voltage_mv ||
218218
!attrs->vdn_voltage_mv)
219219
{
220+
uint8_t l_poundv_bucketId = 0;
220221
// Get #V data from MVPD for VDD/VDN and VCS voltage values
221-
FAPI_TRY(proc_get_mvpd_data(i_target, attr_mvpd_data, &valid_pdv_points, &present_chiplets));
222+
FAPI_TRY(proc_get_mvpd_data(i_target, attr_mvpd_data, &valid_pdv_points, &present_chiplets, l_poundv_bucketId));
222223

223224
// set VDD voltage to PowerSave Voltage from MVPD data (if no override)
224225
if (attrs->vdd_voltage_mv)

src/import/chips/p9/procedures/xml/attribute_info/pm_plat_attributes.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,4 +1629,27 @@
16291629
<initToZero/>
16301630
</attribute>
16311631
<!-- ********************************************************************* -->
1632+
<attribute>
1633+
<id>ATTR_POUND_W_STATIC_DATA_ENABLE</id>
1634+
<description>
1635+
1636+
Enables pstate parameter block code to use the static #W data
1637+
Consumer: p9_pstate_parameter_block.C ->
1638+
1639+
Platform default: OFF
1640+
<!--
1641+
@todo RTC 169662 at some point in the program, this default may be switched to
1642+
the opposite setting. However, coordination needs to occur with all CIs
1643+
as this will enable functions that may not be modeled across the board.
1644+
-->
1645+
</description>
1646+
<targetType>TARGET_TYPE_SYSTEM</targetType>
1647+
<valueType>uint8</valueType>
1648+
<enum>
1649+
OFF = 0x00, ON = 0x01
1650+
</enum>
1651+
<platInit/>
1652+
<initToZero/>
1653+
</attribute>
1654+
<!-- ********************************************************************* -->
16321655
</attributes>

src/import/hwpf/fapi2/xml/attribute_info/hb_temp_defaults.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@
107107
<id>ATTR_CME_INSTRUCTION_TRACE_ENABLE</id>
108108
<default>0x0</default>
109109
</attribute>
110+
<attribute>
111+
<id>ATTR_POUND_W_STATIC_DATA_ENABLE</id>
112+
<!-- this setting enables to use #W static data-->
113+
<default>0x0</default>
114+
</attribute>
115+
110116
<attribute>
111117
<id>ATTR_IO_OBUS_DCCAL_FLAGS</id>
112118
<default>0x0</default>

src/usr/targeting/common/xmltohb/attribute_types.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32909,6 +32909,27 @@ Measured in GB</description>
3290932909
</hwpfToHbAttrMap>
3291032910
</attribute>
3291132911

32912+
<attribute>
32913+
<id>POUND_W_STATIC_DATA_ENABLE</id>
32914+
<description>
32915+
Enables pstate parameter block code to use the static #W data
32916+
Consumer: p9_pstate_parameter_block.C ->
32917+
32918+
Platform default: OFF=0
32919+
</description>
32920+
<simpleType>
32921+
<uint8_t>
32922+
<default>0</default>
32923+
</uint8_t>
32924+
</simpleType>
32925+
<persistency>non-volatile</persistency>
32926+
<readable/>
32927+
<hwpfToHbAttrMap>
32928+
<id>ATTR_POUND_W_STATIC_DATA_ENABLE</id>
32929+
<macro>DIRECT</macro>
32930+
</hwpfToHbAttrMap>
32931+
</attribute>
32932+
3291232933
<attribute>
3291332934
<id>PGPE_HCODE_FUNCTION_ENABLE</id>
3291432935
<description>

src/usr/targeting/common/xmltohb/target_types.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -915,6 +915,7 @@
915915
<attribute><id>SYSTEM_RING_DBG_MODE</id></attribute>
916916
<attribute><id>NEST_LEAKAGE_PERCENT</id></attribute>
917917
<attribute><id>MSS_MRW_DRAM_WRITE_CRC</id></attribute>
918+
<attribute><id>POUND_W_STATIC_DATA_ENABLE</id></attribute>
918919
<attribute><id>PGPE_HCODE_FUNCTION_ENABLE</id></attribute>
919920
<attribute><id>SYSTEM_DISABLE_QUEUED_SCAN</id></attribute>
920921
</targetType>

0 commit comments

Comments
 (0)