Skip to content

Commit 0c2bc53

Browse files
stillgsdcrowell77
authored andcommitted
WOF: fix VFRT system to HOMER translation
- Clipped WOF frequencies that are faster than the base PState VPD frequency to a WOF clip PState of 0. - Added compiler directive to pad WOFTablesHeader structure to 128B - Added compiler directives to align HOMERVFRT to 256B (for assurance) - Captured old FAPI_ERR message for freq2Pstate to FAPI_INF for now. - Reduced VFRT processing traces to just the firt 8 entries so that HB trace is not overrun down the road - Loaded IDDQ data into occ parameter block with 1mA reasolution - Updated p9_pstates_occ.h comments to fix the iddq resolution. The header did NOT change in structure. - Little endian fix on iddq traces - Fix Iddq and temp resolution data - Removed temp resolution calculation Change-Id: Iaf9e1de8f58c43a8a52353b53155956aa71ff09e Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41518 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA <prasadbgr@in.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: BRIAN D. VICTOR <brian.d.victor1@ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41520 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
1 parent 5a90aa2 commit 0c2bc53

File tree

4 files changed

+220
-111
lines changed

4 files changed

+220
-111
lines changed

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

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ typedef struct
290290

291291

292292
//VFRT Header fields
293-
typedef struct __attribute__((__packed__)) VFRTHeaderLayout
293+
typedef struct __attribute__((packed)) VFRTHeaderLayout
294294
{
295295
// VFRT Magic code "VT"
296296
uint16_t magic_number;
@@ -310,7 +310,7 @@ typedef struct __attribute__((__packed__)) VFRTHeaderLayout
310310
uint8_t VddId_QAId;
311311
} VFRTHeaderLayout_t;// WOF Tables Header
312312

313-
typedef struct __attribute__((__packed__)) WofTablesHeader
313+
typedef struct __attribute__((packed, aligned(128))) WofTablesHeader
314314
{
315315

316316
/// Magic Number
@@ -388,34 +388,31 @@ typedef struct __attribute__((__packed__)) WofTablesHeader
388388
/// Future usage
389389
uint16_t Vdn_percent[8];
390390

391-
///Socket Power (in Watts) for the WOF Tables
391+
/// Socket Power (in Watts) for the WOF Tables
392392
uint16_t socket_power_w;
393393

394-
///Nest Frequency (in MHz) used in building the WOF Tables
394+
/// Nest Frequency (in MHz) used in building the WOF Tables
395395
uint16_t nest_frequency_mhz;
396396

397-
//Core Sort Power Target Frequency (in MHz) – The #V frequency associated
398-
//with the sort power target for this table set. This will be either the
399-
//Nominal or
400-
//Turbo #V frequency
397+
/// Core Sort Power Target Frequency (in MHz) – The #V frequency associated
398+
/// with the sort power target for this table set. This will be either the
399+
/// Nominal or Turbo #V frequency
401400
uint16_t sort_power_freq_mhz;
402401

403-
///Regulator Design Point Capacity (in Amps)
402+
/// Regulator Design Point Capacity (in Amps)
404403
uint16_t rdp_capacity;
405404

406-
///Up to 8 ASCII characters to be defined by the Table generation team to
407-
//back reference table sources
408-
uint64_t wof_table_source_tag;
405+
/// Up to 8 ASCII characters to be defined by the Table generation team to
406+
/// back reference table sources
407+
char wof_table_source_tag[8];
409408

410-
///Up to 16 ASCII characters as a Package designator
411-
uint64_t package_name;
409+
/// Up to 16 ASCII characters as a Package designator
410+
char package_name[16];
412411

413-
uint8_t reserved[6];
412+
// Padding to 128B is left to the compiler via the following attribute.
414413

415414
} WofTablesHeader_t;
416415

417-
418-
419416
#define CEF_VDN_INDEX 8
420417
#define CEF_VDD_INDEX 21
421418
#define ACTIVE_QUADS 6
@@ -427,25 +424,23 @@ typedef struct __attribute__((__packed__)) WofTablesHeader
427424
// 5 steps down from 100% is Fratio_step sizes
428425
#define VFRT_FRATIO_SIZE 5
429426

430-
//System VFRT layout
431-
typedef struct __attribute__((__packed__)) HomerSysVFRTLayout
427+
// System VFRT layout
428+
typedef struct __attribute__((packed, aligned(128))) HomerSysVFRTLayout
432429
{
433430
VFRTHeaderLayout_t vfrtHeader;
434431
uint8_t vfrt_data[VFRT_FRATIO_SIZE][VFRT_VRATIO_SIZE];
435432
} HomerSysVFRTLayout_t;
436433

437-
438-
439-
//HOMER VFRT Layout
440-
typedef struct __attribute__((__packed__)) HomerVFRTLayout
434+
// HOMER VFRT Layout
435+
typedef struct __attribute__((packed, aligned(256))) HomerVFRTLayout
441436
{
442437
VFRTHeaderLayout_t vfrtHeader;
443438
uint8_t vfrt_data[VFRT_FRATIO_SIZE][VFRT_VRATIO_SIZE];
444439
uint8_t padding[128];
445440
} HomerVFRTLayout_t;
446441

447-
//HOMER WOF layout
448-
typedef struct __attribute__((__packed__)) HomerWOFLayout
442+
// HOMER WOF layout
443+
typedef struct __attribute__((packed)) HomerWOFLayout
449444
{
450445
WofTablesHeader_t wof_header_data;
451446
HomerVFRTLayout_t homer_vfrt_data[CEF_VDN_INDEX][CEF_VDD_INDEX][ACTIVE_QUADS];
@@ -454,13 +449,9 @@ typedef struct __attribute__((__packed__)) HomerWOFLayout
454449
typedef uint8_t VFRT_Circuit_t;
455450
typedef Pstate VFRT_Hcode_t;
456451

457-
458-
459452
extern VFRT_Circuit_t VFRTCircuitTable[VFRT_FRATIO_SIZE][VFRT_FRATIO_SIZE];
460-
461453
extern VFRT_Hcode_t VFRTInputTable[VFRT_FRATIO_SIZE][VFRT_FRATIO_SIZE];
462454

463-
464455
#ifdef __cplusplus
465456
} // end extern C
466457
#endif

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

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,35 +107,34 @@ typedef struct
107107
/// Spare
108108
uint8_t spare[8];
109109

110-
/// IVDD ALL Good Cores ON; 6.25mA units
110+
/// IVDD ALL Good Cores ON; 1mA units
111111
iddq_entry_t ivdd_all_good_cores_on_caches_on[IDDQ_MEASUREMENTS];
112112

113-
/// IVDD ALL Cores OFF; 6.25mA units
113+
/// IVDD ALL Cores OFF; 1mA units
114114
iddq_entry_t ivdd_all_cores_off_caches_off[IDDQ_MEASUREMENTS];
115115

116-
/// IVDD ALL Good Cores OFF; 6.25mA units
116+
/// IVDD ALL Good Cores OFF; 1mA units
117117
iddq_entry_t ivdd_all_good_cores_off_good_caches_on[IDDQ_MEASUREMENTS];
118118

119-
/// IVDD Quad 0 Good Cores ON, Caches ON; 6.25mA units
119+
/// IVDD Quad 0 Good Cores ON, Caches ON; 1mA units
120120
iddq_entry_t ivdd_quad_good_cores_on_good_caches_on[MAXIMUM_QUADS][IDDQ_MEASUREMENTS];
121121

122-
/// IVDDN 6.25mA units
122+
/// IVDDN; 1mA units
123123
iddq_entry_t ivdn[IDDQ_MEASUREMENTS];
124124

125-
126-
/// IVDD ALL Good Cores ON, Caches ON; 6.25mA units
125+
/// IVDD ALL Good Cores ON, Caches ON; 0.5C units
127126
avgtemp_entry_t avgtemp_all_good_cores_on[IDDQ_MEASUREMENTS];
128127

129-
/// avgtemp ALL Cores OFF, Caches OFF; 6.25mA units
128+
/// avgtemp ALL Cores OFF, Caches OFF; 0.5C units
130129
avgtemp_entry_t avgtemp_all_cores_off_caches_off[IDDQ_MEASUREMENTS];
131130

132-
/// avgtemp ALL Good Cores OFF, Caches ON; 6.25mA units
131+
/// avgtemp ALL Good Cores OFF, Caches ON; 0.5C units
133132
avgtemp_entry_t avgtemp_all_good_cores_off[IDDQ_MEASUREMENTS];
134133

135-
/// avgtemp Quad 0 Good Cores ON, Caches ON; 6.25mA units
134+
/// avgtemp Quad 0 Good Cores ON, Caches ON; 0.5C units
136135
avgtemp_entry_t avgtemp_quad_good_cores_on[MAXIMUM_QUADS][IDDQ_MEASUREMENTS];
137136

138-
/// avgtempN ; 6.25mA units
137+
/// avgtempN; 0.5C units
139138
avgtemp_entry_t avgtemp_vdn[IDDQ_MEASUREMENTS];
140139

141140
/// spare (per MVPD documentation

0 commit comments

Comments
 (0)