summaryrefslogtreecommitdiffstats
path: root/src/occ_405/wof
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2017-03-17 11:16:56 -0500
committerChristopher J. Cain <cjcain@us.ibm.com>2017-04-13 14:07:23 -0400
commit1f9e535d685528d666561d71518f85a571af057c (patch)
tree788de4b115c2a27fdf60a8ac6b25c4b12d9fcc98 /src/occ_405/wof
parent031e2dacb210a1a16626e7c1b4235dea393119d4 (diff)
downloadtalos-occ-1f9e535d685528d666561d71518f85a571af057c.tar.gz
talos-occ-1f9e535d685528d666561d71518f85a571af057c.zip
Merge latest hcode headers into OCC
Change-Id: I1365d14bee48c287fcfd0faab8ba8a1a517e5bcb RTC: 169886 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38107 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Diffstat (limited to 'src/occ_405/wof')
-rw-r--r--src/occ_405/wof/wof.c20
-rw-r--r--src/occ_405/wof/wof.h18
2 files changed, 20 insertions, 18 deletions
diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c
index 7e3d800..c1ed77b 100644
--- a/src/occ_405/wof/wof.c
+++ b/src/occ_405/wof/wof.c
@@ -587,13 +587,14 @@ void read_shared_sram( void )
// merge the 16-bit power-on field from quad state 0 and the 16-bit power-on
// field from quad state 1 and save it to amec.
- g_wof->core_pwr_on =
- (((uint32_t)G_quad_state_0.fields.core_poweron_state) << 16)
- | ((uint32_t)G_quad_state_1.fields.core_poweron_state);
+ // TODO: core_poweron_state not in new structure
+ //g_wof->core_pwr_on =
+ // (((uint32_t)G_quad_state_0.fields.core_poweron_state) << 16)
+ // | ((uint32_t)G_quad_state_1.fields.core_poweron_state);
// Clear out current quad pstates
- memset(g_wof->quad_x_pstates, 0 , MAX_QUADS);
+ memset(g_wof->quad_x_pstates, 0 , MAXIMUM_QUADS);
// Add the quad states to the global quad state array for easy looping.
g_wof->quad_x_pstates[0] = (uint8_t)G_quad_state_0.fields.quad0_pstate;
@@ -622,7 +623,7 @@ void calculate_core_voltage( void )
uint32_t l_voltage;
uint8_t l_quad_mask;
int l_quad_idx = 0;
- for(; l_quad_idx < MAX_QUADS; l_quad_idx++)
+ for(; l_quad_idx < MAXIMUM_QUADS; l_quad_idx++)
{
// Adjust current mask. (IVRM_STATE_QUAD_MASK = 0x80)
l_quad_mask = IVRM_STATE_QUAD_MASK >> l_quad_idx;
@@ -731,7 +732,7 @@ void calculate_core_leakage( void )
// Divide by 6 to get just one quad
g_wof->idc_quad =
G_oppb.iddq.ivdd_all_cores_off_caches_off[l_chip_v_idx] /
- MAX_QUADS;
+ MAXIMUM_QUADS;
@@ -758,7 +759,7 @@ void calculate_core_leakage( void )
G_oppb.iddq.ivdd_all_good_cores_off_good_caches_on[l_chip_v_idx] -
g_wof->all_cores_off_iso;
- l_quad_x_cache = g_wof->all_caches_on_iso / MAX_QUADS;
+ l_quad_x_cache = g_wof->all_caches_on_iso / MAXIMUM_QUADS;
// Loop through all Quads and their respective Cores to calculate
// leakage.
@@ -768,7 +769,7 @@ void calculate_core_leakage( void )
- for(quad_idx = 0; quad_idx < MAX_QUADS; quad_idx++)
+ for(quad_idx = 0; quad_idx < MAXIMUM_QUADS; quad_idx++)
{
if(g_wof->quad_x_pstates[quad_idx] == QUAD_POWERED_OFF)
{
@@ -935,7 +936,8 @@ void calculate_nest_leakage( void )
uint32_t nest_mult = calculate_multiplier( nest_delta_temp );
// Save nest leakage to amec structure
- g_wof->idc_vdn = (G_oppb.iddq.ivdn*nest_mult) >> 10;
+ // TODO: ivdn is now an array and need to handle
+ g_wof->idc_vdn = (G_oppb.iddq.ivdn[0]*nest_mult) >> 10;
}
diff --git a/src/occ_405/wof/wof.h b/src/occ_405/wof/wof.h
index ffe3e71..2a680ee 100644
--- a/src/occ_405/wof/wof.h
+++ b/src/occ_405/wof/wof.h
@@ -96,11 +96,11 @@ typedef struct
// Calculated step from start for quads
uint8_t quad_step_from_start;
// Array to hold the core voltages per quad (in 100uV)
- uint32_t v_core_100uV[MAX_QUADS];
+ uint32_t v_core_100uV[MAXIMUM_QUADS];
// Bit vector to hold the power on status of all 24 cores
uint32_t core_pwr_on;
// Number of cores on per quad
- uint8_t cores_on_per_quad[MAX_QUADS];
+ uint8_t cores_on_per_quad[MAXIMUM_QUADS];
// The most recently read value in the sensor VOLTVDDSENSE
uint32_t voltvddsense_sensor;
// The most recently read value in the sensor TEMPPROCTHRMCy where y is core num
@@ -108,7 +108,7 @@ typedef struct
// The most recently read value in the sensor TEMPNEST
uint16_t tempnest_sensor;
// The most recently read value in the sensor TEMPQx where x is the quad num
- uint16_t tempq[MAX_QUADS];
+ uint16_t tempq[MAXIMUM_QUADS];
// The most recently read value in the sensor CURVDD
uint16_t curvdd_sensor;
// The most recently read value in the sensor CURVDN
@@ -116,7 +116,7 @@ typedef struct
// The most recently read value in the sensor VOLTVDN
uint16_t voltvdn_sensor;
// Array to hold the current 1-byte pstate values read from SRAM. 0xFF=off
- uint8_t quad_x_pstates[MAX_QUADS];
+ uint8_t quad_x_pstates[MAXIMUM_QUADS];
// Bit vector to hold the ivrm states of the quads. 0=BYPASS, 1=REGULATION
uint8_t quad_ivrm_states;
// Contains the estimated core leakage based on temp, voltage, and vpd-leak
@@ -160,17 +160,17 @@ typedef struct
// Contains the final calculated value of ALL_CACHES_ON_ISO
uint32_t all_caches_on_iso;
// Contains good_cores_only (per_quad)
- uint16_t quad_good_cores_only[MAX_QUADS];
+ uint16_t quad_good_cores_only[MAXIMUM_QUADS];
// Contains on_cores
- uint16_t quad_on_cores[MAX_QUADS];
+ uint16_t quad_on_cores[MAXIMUM_QUADS];
// Contains BAD_OFF_cores
- uint16_t quad_bad_off_cores[MAX_QUADS];
+ uint16_t quad_bad_off_cores[MAXIMUM_QUADS];
// Contains the multiplier(m) used in y ~=(T*m)>>10 for nest leak calc
uint32_t nest_mult;
// Contains the multiplier(m) used in y ~=(T*m)>>10 for core leak calc 0-23
uint32_t core_mult[MAX_NUM_CORES];
// Contains the multiplier(m) used in y ~=(T*m)>>10 for quad leak calc 0-5
- uint32_t quad_mult[MAX_QUADS];
+ uint32_t quad_mult[MAXIMUM_QUADS];
// Contains the delta temp used for nest leakage calc (see G_wof_iddq_mult_table)
// TEMPNEST - tvpd_leak_off
int16_t nest_delta_temp;
@@ -179,7 +179,7 @@ typedef struct
int16_t core_delta_temp[MAX_NUM_CORES];
// Contains the delta temp used for quad leakage calc
// TEMPQx - tvpd_leak_cache (where x is the quad number)
- int16_t quad_delta_temp[MAX_QUADS];
+ int16_t quad_delta_temp[MAXIMUM_QUADS];
// tvpd leak to use when either the core is off, or the entire quad is off
uint32_t tvpd_leak_off;
// tvpd leak to use when the core is on
OpenPOWER on IntegriCloud