summaryrefslogtreecommitdiffstats
path: root/src/occ_405/amec
diff options
context:
space:
mode:
authormbroyles <mbroyles@us.ibm.com>2017-06-15 12:33:02 -0500
committerWilliam A. Bryan <wilbryan@us.ibm.com>2017-06-16 13:53:52 -0400
commit2c557cd7a08573c142fb508ae729887531af51c2 (patch)
treedda2ceb12032b149f4339043e38bc92847f3c9bf /src/occ_405/amec
parentca4e0ea382d03376fba5a1d3400fc22d7ba66dd5 (diff)
downloadtalos-occ-2c557cd7a08573c142fb508ae729887531af51c2.tar.gz
talos-occ-2c557cd7a08573c142fb508ae729887531af51c2.zip
Stop State and Throttle Sensor Updates
Change-Id: Ic2589a9e3fb5bad67ce85fb7a5f2c3e9af9f5047 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41887 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Shawn M. McCarney <shawnmm@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_405/amec')
-rwxr-xr-xsrc/occ_405/amec/amec_analytics.c13
-rw-r--r--src/occ_405/amec/amec_controller.c23
-rw-r--r--src/occ_405/amec/amec_init.c1
-rwxr-xr-xsrc/occ_405/amec/amec_pcap.c20
-rwxr-xr-xsrc/occ_405/amec/amec_sensors_core.c38
-rwxr-xr-xsrc/occ_405/amec/amec_slave_smh.c11
-rwxr-xr-xsrc/occ_405/amec/amec_sys.h13
7 files changed, 61 insertions, 58 deletions
diff --git a/src/occ_405/amec/amec_analytics.c b/src/occ_405/amec/amec_analytics.c
index 5c8edf5..9cca40d 100755
--- a/src/occ_405/amec/amec_analytics.c
+++ b/src/occ_405/amec/amec_analytics.c
@@ -190,13 +190,6 @@ void amec_analytics_main(void)
return;
}
- g_amec->packednapsleep[0] = (g_amec->proc[0].winkcnt4ms.sample<<8) +
- g_amec->proc[0].sleepcnt4ms.sample;
- // There are no other elements in proc[] array other than element 0
- g_amec->packednapsleep[1] = 0;
- g_amec->packednapsleep[2] = 0;
- g_amec->packednapsleep[3] = 0;
-
switch (g_amec->analytics_group)
{
case 45: // Group 45
@@ -342,12 +335,6 @@ void amec_analytics_main(void)
l=l+1;
}
- g_amec->g44_avg[(i*MSA)+48] = g_amec->g44_avg[(i*MSA)+48] +
- (UINT32)(g_amec->proc[i].winkcnt4ms.sample<<3); // counter of cores that entered winkle for at least part of the 2msec interval: 1/8th resolution
- g_amec->g44_avg[(i*MSA)+49] = g_amec->g44_avg[(i*MSA)+49] +
- (UINT32)(g_amec->proc[i].sleepcnt4ms.sample<<3); // counter of cores that entered sleep for at least part of the 2msec interval: 1/8th resolution
-
-
m=0; // counter for actual configured # of cores - 1.
for (j=0; j<12; j++) // Group 45 supports up to 12 cores to be configured per OCC chip
{
diff --git a/src/occ_405/amec/amec_controller.c b/src/occ_405/amec/amec_controller.c
index 9da01de..25901c7 100644
--- a/src/occ_405/amec/amec_controller.c
+++ b/src/occ_405/amec/amec_controller.c
@@ -143,6 +143,17 @@ void amec_controller_proc_thermal()
g_amec->thermalproc.freq_request = amec_controller_speed2freq(
g_amec->thermalproc.speed_request,
g_amec->sys.fmax);
+
+ // Update the Processor OT Throttle Sensor
+ if(g_amec->thermalproc.freq_request < g_amec->sys.fmax)
+ {
+ // frequency is less than max indicate throttle due to OT
+ sensor_update(AMECSENSOR_PTR(PROCOTTHROT), 1);
+ }
+ else // not currently throttled due to OT
+ {
+ sensor_update(AMECSENSOR_PTR(PROCOTTHROT), 0);
+ }
}
//*************************************************************************
@@ -235,6 +246,18 @@ void amec_controller_dimm_thermal()
// Generate the new thermal speed request
g_amec->thermaldimm.speed_request = (uint16_t) l_mem_speed;
+
+ // Update the Memory OT Throttle Sensor
+ if(g_amec->thermaldimm.speed_request < AMEC_MEMORY_MAX_STEP)
+ {
+ // Memory speed is less than max indicate throttle due to OT
+ sensor_update(AMECSENSOR_PTR(MEMOTTHROT), 1);
+ }
+ else // not currently throttled due to OT
+ {
+ sensor_update(AMECSENSOR_PTR(MEMOTTHROT), 0);
+ }
+
}
diff --git a/src/occ_405/amec/amec_init.c b/src/occ_405/amec/amec_init.c
index 9e4f623..7e70ed9 100644
--- a/src/occ_405/amec/amec_init.c
+++ b/src/occ_405/amec/amec_init.c
@@ -334,7 +334,6 @@ void amec_init_gamec_struct(void)
g_amec->index_probe250us[l_idx] = 0; // Initialize all offsets to 0 (used only if size > 2)
}
-// g_amec->ptr_probe250us[1] = g_amec->proc[0].sleepcnt2ms.sample;
// g_amec->ptr_probe250us[2] = &g_amec->g44_avg[(0*MSA)+49];
// g_amec->ptr_probe250us[2] = g_amec->ptr_probe250us[2]+2; // Point to low 16 bits of g44_avg
// g_amec->ptr_probe250us[3] = &g_amec->proc[0].core[0].thread[0].util2ms_thread;
diff --git a/src/occ_405/amec/amec_pcap.c b/src/occ_405/amec/amec_pcap.c
index 512a82c..286921d 100755
--- a/src/occ_405/amec/amec_pcap.c
+++ b/src/occ_405/amec/amec_pcap.c
@@ -389,6 +389,26 @@ void amec_power_control(void)
// Calculate the performance preserving bounds voting box input freq
amec_ppb_fmax_calc();
}
+
+ // Update the Processor and Memory Throttle due to power sensors
+ if(g_amec->proc[0].pwr_votes.proc_pcap_vote < G_proc_fmax_mhz)
+ {
+ // Frequency is being throttled due to power cap
+ sensor_update(AMECSENSOR_PTR(PROCPWRTHROT), 1);
+ }
+ else // not currently throttled due to power
+ {
+ sensor_update(AMECSENSOR_PTR(PROCPWRTHROT), 0);
+ }
+ if(g_amec->pcap.active_mem_level != 0)
+ {
+ // Memory is being throttled due to power cap
+ sensor_update(AMECSENSOR_PTR(MEMPWRTHROT), 1);
+ }
+ else // not currently throttled due to power
+ {
+ sensor_update(AMECSENSOR_PTR(MEMPWRTHROT), 0);
+ }
}
else
{
diff --git a/src/occ_405/amec/amec_sensors_core.c b/src/occ_405/amec/amec_sensors_core.c
index 6ec8e94..e9fab2b 100755
--- a/src/occ_405/amec/amec_sensors_core.c
+++ b/src/occ_405/amec/amec_sensors_core.c
@@ -494,38 +494,24 @@ void amec_calc_freq_and_util_sensors(CoreData * i_core_data_ptr, uint8_t i_core)
// No sensors to update for perThread Util
// ------------------------------------------------------
- // Per Core Sleep/Winkle Count
+ // Per Core Stop State Sensors
// ------------------------------------------------------
- // Get deepest idle state entered by the chiplet since the last read
+ // Get deepest idle state requested since the last read. bits 12:15 OCC stop state hist reg
+ temp16 = CONVERT_UINT64_UINT16_UPPER(i_core_data_ptr->stop_state_hist);
+ temp16 &= 0x000F;
+ if(temp16 != 0x000F) // Don't update with reset value
+ {
+ sensor_update(AMECSENSOR_ARRAY_PTR(STOPDEEPREQC0,i_core), temp16);
+ }
- // The SLEEPCNT and WINKLECNT sensors are updated in amec_slv_state_0() function
+ // Get deepest idle state entered by the chiplet since the last read bits 16:19 OCC stop state hist reg
temp16 = CONVERT_UINT64_UINT16_MIDUPPER(i_core_data_ptr->stop_state_hist);
- temp16 = temp16 & 0xF000;
temp16 = temp16 >> 12;
- switch(temp16)
+ temp16 = temp16 & 0x000F;
+ if(temp16 != 0x000F) // Don't update with reset value
{
- case 0: // Stop 0: Run State
- case 1: // Stop 1: Nap
- break;
- case 2: // Stop 2: Fast Sleep
- case 3: // Stop 3: Fast Sleep @ Vmin
- case 4: // Stop 4: Deep Sleep "instant on"
- case 5: // Stop 5-7: Higher Latency Deep Sleep
- case 6:
- case 7:
- case 8: // Stop 8-10: Deep Sleep+
- case 9:
- case 10:
- SETBIT(g_amec->proc[0].sleep_cnt,i_core);
- break;
- case 11: // Stop 11-15: Quad Deep Winkle
- case 12:
- case 13:
- case 14:
- case 15:
- SETBIT(g_amec->proc[0].winkle_cnt,i_core);
- break;
+ sensor_update(AMECSENSOR_ARRAY_PTR(STOPDEEPACTC0,i_core), temp16);
}
// ------------------------------------------------------
diff --git a/src/occ_405/amec/amec_slave_smh.c b/src/occ_405/amec/amec_slave_smh.c
index e92308a..56fcd76 100755
--- a/src/occ_405/amec/amec_slave_smh.c
+++ b/src/occ_405/amec/amec_slave_smh.c
@@ -399,17 +399,6 @@ void amec_slv_state_0(void)
amec_update_centaur_sensors(CENTAUR_0);
*/
//-------------------------------------------------------
- // Update Sleep Count & Winkle Count Sensors
- //-------------------------------------------------------
- sensor_update(AMECSENSOR_PTR(SLEEPCNT4MSP0),
- __builtin_popcount( g_amec->proc[0].sleep_cnt));
- g_amec->proc[0].sleep_cnt = 0;
-
- sensor_update(AMECSENSOR_PTR(WINKCNT4MSP0),
- __builtin_popcount(g_amec->proc[0].winkle_cnt));
- g_amec->proc[0].winkle_cnt = 0;
-
- //-------------------------------------------------------
// Update vector sensors
//-------------------------------------------------------
sensor_vector_update(AMECSENSOR_PTR(TEMPPROCAVG), 1);
diff --git a/src/occ_405/amec/amec_sys.h b/src/occ_405/amec/amec_sys.h
index d72a49b..d3127df 100755
--- a/src/occ_405/amec/amec_sys.h
+++ b/src/occ_405/amec/amec_sys.h
@@ -298,6 +298,8 @@ typedef struct
sensor_t ppic;
sensor_t pwrpx250us;
sensor_t tempc;
+ sensor_t stopdeepreqc;
+ sensor_t stopdeepactc;
//-----------------------------------
// Previous Tick Data
@@ -456,8 +458,6 @@ typedef struct
sensor_t curvdd;
sensor_t pwrvcsviovdn;
sensor_t pwr250usmem;
- sensor_t sleepcnt4ms;
- sensor_t winkcnt4ms;
sensor_t sp250us;
sensor_t tempprocavg;
vectorSensor_t temp4ms_vector;
@@ -471,6 +471,8 @@ typedef struct
sensor_t temp2mscent;
sensor_t tempdimmthrm;
sensor_t memsp2ms_tls;
+ sensor_t mempwrthrot;
+ sensor_t memotthrot;
// Nimbus DIMM Sensors
sensor_t tempdimm[NUM_DIMM_PORTS*NUM_DIMMS_PER_I2CPORT];
@@ -483,11 +485,10 @@ typedef struct
sensor_t curvdn;
sensor_t pwrvdd;
sensor_t pwrvdn;
+ sensor_t procpwrthrot;
+ sensor_t procotthrot;
// Calculations & Interim Data
- uint16_t sleep_cnt;
- uint16_t winkle_cnt;
-
uint16_t core_max_freq; // Maximum requested freq for all cores on chip.
// Parameters used through Amester interface
@@ -727,8 +728,6 @@ typedef struct
uint8_t analytics_slot;
// Used to hold selected analytics group
uint16_t analytics_array[STREAM_VECTOR_SIZE_EX];
- // for group 44 support core bit maps of their napping cores (upper byte) and sleeping cores (lower byte)
- uint16_t packednapsleep[MAX_NUM_CHIP_MODULES];
// holds the sum of all the memory power sensors (32msec)
uint16_t total_memory_power;
uint16_t probetemp[NUM_AMEC_FW_PROBES]; // array holding temporary probe data
OpenPOWER on IntegriCloud