Skip to content

Commit

Permalink
WOF: fix VFRT system to HOMER translation
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
stillgs authored and dcrowell77 committed Jun 19, 2017
1 parent 5a90aa2 commit 0c2bc53
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 111 deletions.
49 changes: 20 additions & 29 deletions src/import/chips/p9/procedures/hwp/lib/p9_pstates_common.h
Expand Up @@ -290,7 +290,7 @@ typedef struct


//VFRT Header fields
typedef struct __attribute__((__packed__)) VFRTHeaderLayout
typedef struct __attribute__((packed)) VFRTHeaderLayout
{
// VFRT Magic code "VT"
uint16_t magic_number;
Expand All @@ -310,7 +310,7 @@ typedef struct __attribute__((__packed__)) VFRTHeaderLayout
uint8_t VddId_QAId;
} VFRTHeaderLayout_t;// WOF Tables Header

typedef struct __attribute__((__packed__)) WofTablesHeader
typedef struct __attribute__((packed, aligned(128))) WofTablesHeader
{

/// Magic Number
Expand Down Expand Up @@ -388,34 +388,31 @@ typedef struct __attribute__((__packed__)) WofTablesHeader
/// Future usage
uint16_t Vdn_percent[8];

///Socket Power (in Watts) for the WOF Tables
/// Socket Power (in Watts) for the WOF Tables
uint16_t socket_power_w;

///Nest Frequency (in MHz) used in building the WOF Tables
/// Nest Frequency (in MHz) used in building the WOF Tables
uint16_t nest_frequency_mhz;

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

///Regulator Design Point Capacity (in Amps)
/// Regulator Design Point Capacity (in Amps)
uint16_t rdp_capacity;

///Up to 8 ASCII characters to be defined by the Table generation team to
//back reference table sources
uint64_t wof_table_source_tag;
/// Up to 8 ASCII characters to be defined by the Table generation team to
/// back reference table sources
char wof_table_source_tag[8];

///Up to 16 ASCII characters as a Package designator
uint64_t package_name;
/// Up to 16 ASCII characters as a Package designator
char package_name[16];

uint8_t reserved[6];
// Padding to 128B is left to the compiler via the following attribute.

} WofTablesHeader_t;



#define CEF_VDN_INDEX 8
#define CEF_VDD_INDEX 21
#define ACTIVE_QUADS 6
Expand All @@ -427,25 +424,23 @@ typedef struct __attribute__((__packed__)) WofTablesHeader
// 5 steps down from 100% is Fratio_step sizes
#define VFRT_FRATIO_SIZE 5

//System VFRT layout
typedef struct __attribute__((__packed__)) HomerSysVFRTLayout
// System VFRT layout
typedef struct __attribute__((packed, aligned(128))) HomerSysVFRTLayout
{
VFRTHeaderLayout_t vfrtHeader;
uint8_t vfrt_data[VFRT_FRATIO_SIZE][VFRT_VRATIO_SIZE];
} HomerSysVFRTLayout_t;



//HOMER VFRT Layout
typedef struct __attribute__((__packed__)) HomerVFRTLayout
// HOMER VFRT Layout
typedef struct __attribute__((packed, aligned(256))) HomerVFRTLayout
{
VFRTHeaderLayout_t vfrtHeader;
uint8_t vfrt_data[VFRT_FRATIO_SIZE][VFRT_VRATIO_SIZE];
uint8_t padding[128];
} HomerVFRTLayout_t;

//HOMER WOF layout
typedef struct __attribute__((__packed__)) HomerWOFLayout
// HOMER WOF layout
typedef struct __attribute__((packed)) HomerWOFLayout
{
WofTablesHeader_t wof_header_data;
HomerVFRTLayout_t homer_vfrt_data[CEF_VDN_INDEX][CEF_VDD_INDEX][ACTIVE_QUADS];
Expand All @@ -454,13 +449,9 @@ typedef struct __attribute__((__packed__)) HomerWOFLayout
typedef uint8_t VFRT_Circuit_t;
typedef Pstate VFRT_Hcode_t;



extern VFRT_Circuit_t VFRTCircuitTable[VFRT_FRATIO_SIZE][VFRT_FRATIO_SIZE];

extern VFRT_Hcode_t VFRTInputTable[VFRT_FRATIO_SIZE][VFRT_FRATIO_SIZE];


#ifdef __cplusplus
} // end extern C
#endif
Expand Down
21 changes: 10 additions & 11 deletions src/import/chips/p9/procedures/hwp/lib/p9_pstates_occ.h
Expand Up @@ -107,35 +107,34 @@ typedef struct
/// Spare
uint8_t spare[8];

/// IVDD ALL Good Cores ON; 6.25mA units
/// IVDD ALL Good Cores ON; 1mA units
iddq_entry_t ivdd_all_good_cores_on_caches_on[IDDQ_MEASUREMENTS];

/// IVDD ALL Cores OFF; 6.25mA units
/// IVDD ALL Cores OFF; 1mA units
iddq_entry_t ivdd_all_cores_off_caches_off[IDDQ_MEASUREMENTS];

/// IVDD ALL Good Cores OFF; 6.25mA units
/// IVDD ALL Good Cores OFF; 1mA units
iddq_entry_t ivdd_all_good_cores_off_good_caches_on[IDDQ_MEASUREMENTS];

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

/// IVDDN 6.25mA units
/// IVDDN; 1mA units
iddq_entry_t ivdn[IDDQ_MEASUREMENTS];


/// IVDD ALL Good Cores ON, Caches ON; 6.25mA units
/// IVDD ALL Good Cores ON, Caches ON; 0.5C units
avgtemp_entry_t avgtemp_all_good_cores_on[IDDQ_MEASUREMENTS];

/// avgtemp ALL Cores OFF, Caches OFF; 6.25mA units
/// avgtemp ALL Cores OFF, Caches OFF; 0.5C units
avgtemp_entry_t avgtemp_all_cores_off_caches_off[IDDQ_MEASUREMENTS];

/// avgtemp ALL Good Cores OFF, Caches ON; 6.25mA units
/// avgtemp ALL Good Cores OFF, Caches ON; 0.5C units
avgtemp_entry_t avgtemp_all_good_cores_off[IDDQ_MEASUREMENTS];

/// avgtemp Quad 0 Good Cores ON, Caches ON; 6.25mA units
/// avgtemp Quad 0 Good Cores ON, Caches ON; 0.5C units
avgtemp_entry_t avgtemp_quad_good_cores_on[MAXIMUM_QUADS][IDDQ_MEASUREMENTS];

/// avgtempN ; 6.25mA units
/// avgtempN; 0.5C units
avgtemp_entry_t avgtemp_vdn[IDDQ_MEASUREMENTS];

/// spare (per MVPD documentation
Expand Down

0 comments on commit 0c2bc53

Please sign in to comment.