summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbroyles <mbroyles@us.ibm.com>2019-07-12 11:01:38 -0500
committerMartha Broyles <mbroyles@us.ibm.com>2019-07-22 16:25:28 -0500
commit788814140419c907001c59934da7be39a046820c (patch)
tree18085a0e25f83cab4d4196df69b80ac5131a8f3a
parentd467852fe039a980180df22178ae09a89a3ed6d9 (diff)
downloadtalos-occ-788814140419c907001c59934da7be39a046820c.tar.gz
talos-occ-788814140419c907001c59934da7be39a046820c.zip
Support for 16 OCMBs
Change-Id: I906c797176f0ea2a683e6f05c7e6094cdf11693a Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/80364 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J Cain <cjcain@us.ibm.com> Reviewed-by: Douglas R Gilbert <dgilbert@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
-rwxr-xr-xsrc/occ_405/amec/amec_amester.c4
-rw-r--r--src/occ_405/amec/amec_controller.c5
-rwxr-xr-xsrc/occ_405/amec/amec_freq.c4
-rwxr-xr-xsrc/occ_405/amec/amec_health.c84
-rwxr-xr-xsrc/occ_405/amec/amec_health.h4
-rw-r--r--src/occ_405/amec/amec_sensors_centaur.c10
-rw-r--r--src/occ_405/amec/amec_sensors_ocmb.c10
-rwxr-xr-xsrc/occ_405/amec/amec_slave_smh.c63
-rwxr-xr-xsrc/occ_405/amec/amec_sys.h2
-rwxr-xr-xsrc/occ_405/cent/centaur_data.c14
-rwxr-xr-xsrc/occ_405/cent/centaur_data.h23
-rw-r--r--src/occ_405/cent/ocmb_data.c12
-rwxr-xr-xsrc/occ_405/dcom/dcom.h52
-rwxr-xr-xsrc/occ_405/dimm/dimm.c2
-rw-r--r--src/occ_405/mem/memory.h13
-rwxr-xr-xsrc/occ_405/occ_sys_config.h5
-rwxr-xr-xsrc/occ_405/occbuildname.c2
-rwxr-xr-xsrc/occ_405/sensor/sensor_enum.h19
-rwxr-xr-xsrc/occ_405/sensor/sensor_info.c36
-rw-r--r--src/occ_405/sensor/sensor_main_memory.c12
-rw-r--r--src/occ_405/sensor/sensor_main_memory.h2
-rwxr-xr-xsrc/occ_405/sensor/sensor_table.c81
-rwxr-xr-xsrc/occ_405/thread/chom.c14
23 files changed, 322 insertions, 151 deletions
diff --git a/src/occ_405/amec/amec_amester.c b/src/occ_405/amec/amec_amester.c
index 4406d38..fcc3877 100755
--- a/src/occ_405/amec/amec_amester.c
+++ b/src/occ_405/amec/amec_amester.c
@@ -278,9 +278,9 @@ static uint8_t amester_get_sensor_info( uint8_t* o_resp, uint16_t* io_resp_lengt
if( (MEM_TYPE_CUMULUS != G_sysConfigData.mem_type) &&
( ((i_sensor >= MRDM0) &&
- (i_sensor <= MRDM7)) ||
+ (i_sensor <= MRDM11)) ||
((i_sensor >= MWRM0) &&
- (i_sensor <= MWRM7)) ) )
+ (i_sensor <= MWRM11)) ) )
{
*((uint32_t *)o_resp) = AMEFP(64, -5);
}
diff --git a/src/occ_405/amec/amec_controller.c b/src/occ_405/amec/amec_controller.c
index 9e3b132..1f02eda 100644
--- a/src/occ_405/amec/amec_controller.c
+++ b/src/occ_405/amec/amec_controller.c
@@ -35,7 +35,7 @@
// Externs
//*************************************************************************
extern dimm_sensor_flags_t G_dimm_temp_expired_bitmap;
-extern uint8_t G_cent_temp_expired_bitmap;
+extern uint16_t G_cent_temp_expired_bitmap;
//*************************************************************************
// Macros
//*************************************************************************
@@ -271,7 +271,8 @@ void amec_controller_dimm_thermal()
// Get TEMPDIMMTHRM sensor value
l_sensor = getSensorByGsid(TEMPDIMMTHRM);
- if(G_dimm_temp_expired_bitmap.bigword)
+ if(G_dimm_temp_expired_bitmap.dw[0] ||
+ G_dimm_temp_expired_bitmap.dw[1])
{
//we were not able to read one or more dimm temperatures.
//Assume temperature is at the setpoint plus 1 degree C.
diff --git a/src/occ_405/amec/amec_freq.c b/src/occ_405/amec/amec_freq.c
index baef813..4275b68 100755
--- a/src/occ_405/amec/amec_freq.c
+++ b/src/occ_405/amec/amec_freq.c
@@ -796,8 +796,8 @@ void amec_slv_mem_voting_box(void)
l_reason,
l_vote,
G_cent_temp_expired_bitmap,
- G_dimm_temp_expired_bitmap.words[0],
- G_dimm_temp_expired_bitmap.words[1]);
+ (uint32_t)(G_dimm_temp_expired_bitmap.dw[0] >> 32),
+ (uint32_t)G_dimm_temp_expired_bitmap.dw[0]);
}
}
else
diff --git a/src/occ_405/amec/amec_health.c b/src/occ_405/amec/amec_health.c
index 562038d..0d99f20 100755
--- a/src/occ_405/amec/amec_health.c
+++ b/src/occ_405/amec/amec_health.c
@@ -48,22 +48,22 @@ extern bool G_log_gpe1_error;
//*************************************************************************/
// Have we already called out the dimm for overtemp (bitmap of dimms)?
-dimm_sensor_flags_t G_dimm_overtemp_logged_bitmap = {0};
+dimm_sensor_flags_t G_dimm_overtemp_logged_bitmap = {{0}};
// Have we already called out the dimm for timeout (bitmap of dimms)?
-dimm_sensor_flags_t G_dimm_timeout_logged_bitmap = {0};
+dimm_sensor_flags_t G_dimm_timeout_logged_bitmap = {{0}};
// Are any dimms currently in the timedout state (bitmap of dimm)?
-dimm_sensor_flags_t G_dimm_temp_expired_bitmap = {0};
+dimm_sensor_flags_t G_dimm_temp_expired_bitmap = {{0}};
// Have we already called out the centaur for timeout (bitmap of centaurs)?
-uint8_t G_cent_timeout_logged_bitmap = 0;
+uint16_t G_cent_timeout_logged_bitmap = 0;
// Have we already called out the centaur for overtemp (bitmap of centaurs)?
-uint8_t G_cent_overtemp_logged_bitmap = 0;
+uint16_t G_cent_overtemp_logged_bitmap = 0;
-// Are any dimms currently in the timedout state (bitmap of centaurs)?
-uint8_t G_cent_temp_expired_bitmap = 0;
+// Are any mem controllers currently in the timedout state (bitmap of centaurs)?
+uint16_t G_cent_temp_expired_bitmap = 0;
// Array to store the update tag of each core's temperature sensor
uint32_t G_core_temp_update_tag[MAX_NUM_CORES] = {0};
@@ -113,8 +113,8 @@ uint64_t amec_mem_get_huid(uint8_t i_cent, uint8_t i_dimm)
//that the dimm should be marked.
void amec_mem_mark_logged(uint8_t i_cent,
uint8_t i_dimm,
- uint8_t* i_clog_bitmap,
- uint8_t* i_dlog_bitmap)
+ uint16_t* i_clog_bitmap,
+ uint8_t* i_dlog_bitmap)
{
if(i_dimm == 0xff)
{
@@ -158,6 +158,11 @@ void amec_health_check_dimm_temp()
l_max_port = NUM_DIMM_PORTS;
l_max_dimm_per_port = NUM_DIMMS_PER_I2CPORT;
}
+ else if(G_sysConfigData.mem_type == MEM_TYPE_OCM)
+ {
+ l_max_port = MAX_NUM_OCMBS;
+ l_max_dimm_per_port = NUM_DIMMS_PER_OCMB;
+ }
else // MEM_TYPE_CUMULUS
{
l_max_port = MAX_NUM_CENTAURS;
@@ -166,7 +171,8 @@ void amec_health_check_dimm_temp()
// Check to see if any dimms have reached the error temperature that
// haven't been called out already
- if(G_dimm_overtemp_bitmap.bigword == G_dimm_overtemp_logged_bitmap.bigword)
+ if( (G_dimm_overtemp_bitmap.dw[0] == G_dimm_overtemp_logged_bitmap.dw[0]) &&
+ (G_dimm_overtemp_bitmap.dw[1] == G_dimm_overtemp_logged_bitmap.dw[1]) )
{
return;
}
@@ -282,7 +288,7 @@ void amec_health_check_dimm_temp()
*/
void amec_health_check_dimm_timeout()
{
- static dimm_sensor_flags_t L_temp_update_bitmap_prev = {0};
+ static dimm_sensor_flags_t L_temp_update_bitmap_prev = {{0}};
dimm_sensor_flags_t l_need_inc, l_need_clr, l_temp_update_bitmap;
uint8_t l_dimm, l_port;
fru_temp_t* l_fru;
@@ -300,33 +306,47 @@ void amec_health_check_dimm_timeout()
//3) sensor is enabled and updated and was updated on previous check (do nothing)
//Grab snapshot of G_dimm_temp_updated_bitmap and clear it
- l_temp_update_bitmap.bigword = G_dimm_temp_updated_bitmap.bigword;
- G_dimm_temp_updated_bitmap.bigword = 0;
+ l_temp_update_bitmap.dw[0] = G_dimm_temp_updated_bitmap.dw[0];
+ l_temp_update_bitmap.dw[1] = G_dimm_temp_updated_bitmap.dw[1];
+ G_dimm_temp_updated_bitmap.dw[0] = 0;
+ G_dimm_temp_updated_bitmap.dw[1] = 0;
//check if we need to increment any timers (haven't been updated in the last second)
- l_need_inc.bigword = G_dimm_enabled_sensors.bigword & ~l_temp_update_bitmap.bigword;
+ l_need_inc.dw[0] = G_dimm_enabled_sensors.dw[0] & ~l_temp_update_bitmap.dw[0];
+ l_need_inc.dw[1] = G_dimm_enabled_sensors.dw[1] & ~l_temp_update_bitmap.dw[1];
//check if we need to clear any timers (updated now but not updated previously)
- l_need_clr.bigword = l_temp_update_bitmap.bigword & ~L_temp_update_bitmap_prev.bigword;
+ l_need_clr.dw[0] = l_temp_update_bitmap.dw[0] & ~L_temp_update_bitmap_prev.dw[0];
+ l_need_clr.dw[1] = l_temp_update_bitmap.dw[1] & ~L_temp_update_bitmap_prev.dw[1];
//save off the previous bitmap of updated sensors for next time
- L_temp_update_bitmap_prev.bigword = l_temp_update_bitmap.bigword;
+ L_temp_update_bitmap_prev.dw[0] = l_temp_update_bitmap.dw[0];
+ L_temp_update_bitmap_prev.dw[1] = l_temp_update_bitmap.dw[1];
//only go further if we actually have work to do here.
- if(!l_need_inc.bigword && !l_need_clr.bigword)
+ if(!l_need_inc.dw[0] && !l_need_inc.dw[1] &&
+ !l_need_clr.dw[0] && !l_need_clr.dw[1])
{
//nothing to do
break;
}
- uint8_t l_max_port; // #ports in nimbus/#centaurs in cumulus
+ uint8_t l_max_port; // #ports in nimbus/#mem buffs in cumulus/OCM
+ uint8_t l_max_dimm_per_port; // per port in nimbus/per mem buff in cumulus/OCM
if(G_sysConfigData.mem_type == MEM_TYPE_NIMBUS)
{
l_max_port = NUM_DIMM_PORTS;
+ l_max_dimm_per_port = NUM_DIMMS_PER_I2CPORT;
+ }
+ else if(G_sysConfigData.mem_type == MEM_TYPE_OCM)
+ {
+ l_max_port = MAX_NUM_OCMBS;
+ l_max_dimm_per_port = NUM_DIMMS_PER_OCMB;
}
else // MEM_TYPE_CUMULUS
{
l_max_port = MAX_NUM_CENTAURS;
+ l_max_dimm_per_port = NUM_DIMMS_PER_CENTAUR;
}
//iterate across all ports incrementing dimm sensor timers as needed
for(l_port = 0; l_port < l_max_port; l_port++)
@@ -345,7 +365,7 @@ void amec_health_check_dimm_timeout()
}
//There's at least one dimm requiring an increment, find the dimm
- for(l_dimm = 0; l_dimm < NUM_DIMMS_PER_CENTAUR; l_dimm++)
+ for(l_dimm = 0; l_dimm < l_max_dimm_per_port; l_dimm++)
{
//not this one, check if we need to clear the dimm timeout and go to the next one
if(!(l_need_inc.bytes[l_port] & (DIMM_SENSOR0 >> l_dimm)))
@@ -467,13 +487,13 @@ void amec_health_check_dimm_timeout()
}
//skip clearing if no dimms need it
- if(!l_need_clr.bigword)
+ if( (!l_need_clr.dw[0]) && (!l_need_clr.dw[1]) )
{
break;
}
//iterate across all centaurs/ports clearing dimm sensor timers as needed
- for(l_port = 0; l_port < MAX_NUM_CENTAURS; l_port++)
+ for(l_port = 0; l_port < l_max_port; l_port++)
{
if(!l_need_clr.bytes[l_port])
@@ -482,7 +502,7 @@ void amec_health_check_dimm_timeout()
}
//iterate over all dimms
- for(l_dimm = 0; l_dimm < NUM_DIMMS_PER_CENTAUR; l_dimm++)
+ for(l_dimm = 0; l_dimm < l_max_dimm_per_port; l_dimm++)
{
//not this one, go to next one
if(!(l_need_clr.bytes[l_port] & (DIMM_SENSOR0 >> l_dimm)))
@@ -531,9 +551,9 @@ void amec_health_check_cent_temp()
/*------------------------------------------------------------------------*/
uint16_t l_ot_error, l_cur_temp, l_max_temp;
sensor_t *l_sensor;
- uint32_t l_cent;
+ uint32_t l_cent, l_max_mem_buf;
uint32_t l_callouts_count = 0;
- uint8_t l_new_callouts;
+ uint16_t l_new_callouts;
uint64_t l_huid;
errlHndl_t l_err = NULL;
@@ -560,7 +580,15 @@ void amec_health_check_cent_temp()
l_new_callouts);
//find the centaur(s) that need to be called out
- for(l_cent = 0; l_cent < MAX_NUM_CENTAURS; l_cent++)
+ if(G_sysConfigData.mem_type == MEM_TYPE_OCM)
+ {
+ l_max_mem_buf = MAX_NUM_OCMBS;
+ }
+ else // MEM_TYPE_CUMULUS
+ {
+ l_max_mem_buf = MAX_NUM_CENTAURS;
+ }
+ for(l_cent = 0; l_cent < l_max_mem_buf; l_cent++)
{
if(!(l_new_callouts & (CENTAUR0_PRESENT_MASK >> l_cent)))
{
@@ -640,9 +668,9 @@ void amec_health_check_cent_temp()
*/
void amec_health_check_cent_timeout()
{
- static uint8_t L_temp_update_bitmap_prev = 0;
- uint8_t l_need_inc, l_need_clr, l_temp_update_bitmap;
- uint8_t l_cent;
+ static uint16_t L_temp_update_bitmap_prev = 0;
+ uint16_t l_need_inc, l_need_clr, l_temp_update_bitmap;
+ uint16_t l_cent;
fru_temp_t* l_fru;
errlHndl_t l_err = NULL;
uint32_t l_callouts_count = 0;
diff --git a/src/occ_405/amec/amec_health.h b/src/occ_405/amec/amec_health.h
index 9199bb7..4506a41 100755
--- a/src/occ_405/amec/amec_health.h
+++ b/src/occ_405/amec/amec_health.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -49,7 +49,7 @@ void amec_health_check_dimm_temp(void);
void amec_health_check_dimm_timeout(void);
void amec_mem_mark_logged(uint8_t i_cent,
uint8_t i_dimm,
- uint8_t* i_clog_bitmap,
+ uint16_t* i_clog_bitmap,
uint8_t* i_dlog_bitmap);
void amec_health_check_vrm_vdd_temp(const sensor_t *i_sensor);
void amec_health_check_vrm_vdd_temp_timeout(void);
diff --git a/src/occ_405/amec/amec_sensors_centaur.c b/src/occ_405/amec/amec_sensors_centaur.c
index 8f946e6..b09e5fe 100644
--- a/src/occ_405/amec/amec_sensors_centaur.c
+++ b/src/occ_405/amec/amec_sensors_centaur.c
@@ -48,10 +48,10 @@
/******************************************************************************/
/* Globals */
/******************************************************************************/
-dimm_sensor_flags_t G_dimm_overtemp_bitmap = {0};
-dimm_sensor_flags_t G_dimm_temp_updated_bitmap = {0};
-uint8_t G_cent_overtemp_bitmap = 0;
-uint8_t G_cent_temp_updated_bitmap = 0;
+dimm_sensor_flags_t G_dimm_overtemp_bitmap = {{0}};
+dimm_sensor_flags_t G_dimm_temp_updated_bitmap = {{0}};
+uint16_t G_cent_overtemp_bitmap = 0;
+uint16_t G_cent_temp_updated_bitmap = 0;
extern uint8_t G_centaur_needs_recovery;
extern uint8_t G_centaur_nest_lfir6;
extern uint64_t G_inject_dimm;
@@ -441,7 +441,7 @@ void amec_update_centaur_temp_sensors(void)
}
}
- sensor_update(&g_amec->proc[0].temp2mscent,l_hot_centaur);
+ sensor_update(&g_amec->proc[0].tempcent,l_hot_centaur);
sensor_update(&g_amec->proc[0].tempdimmthrm,l_hot_dimm);
AMEC_DBG("HotCentaur=[%d] HotDimm=[%d]",l_hot_centaur, l_hot_dimm);
}
diff --git a/src/occ_405/amec/amec_sensors_ocmb.c b/src/occ_405/amec/amec_sensors_ocmb.c
index 88f277c..a2cd4a6 100644
--- a/src/occ_405/amec/amec_sensors_ocmb.c
+++ b/src/occ_405/amec/amec_sensors_ocmb.c
@@ -50,8 +50,8 @@
/******************************************************************************/
extern dimm_sensor_flags_t G_dimm_overtemp_bitmap;
extern dimm_sensor_flags_t G_dimm_temp_updated_bitmap;
-extern uint8_t G_cent_overtemp_bitmap;
-extern uint8_t G_cent_temp_updated_bitmap;
+extern uint16_t G_cent_overtemp_bitmap;
+extern uint16_t G_cent_temp_updated_bitmap;
extern uint8_t G_centaur_needs_recovery;
extern uint64_t G_inject_dimm;
extern uint32_t G_inject_dimm_trace[MAX_NUM_OCMBS][NUM_DIMMS_PER_OCMB];
@@ -337,7 +337,7 @@ void amec_update_ocmb_dts_sensors(OcmbMemData * i_sensor_cache, uint8_t i_membuf
}
else
{
- //don't allow temp to change more than is reasonable for 2ms
+ //don't allow temp to change more than is reasonable since last read
if(l_sens_temp > (l_prev_temp + MAX_MEM_TEMP_CHANGE))
{
l_dts = l_prev_temp + MAX_MEM_TEMP_CHANGE;
@@ -365,7 +365,7 @@ void amec_update_ocmb_dts_sensors(OcmbMemData * i_sensor_cache, uint8_t i_membuf
}
//Notify thermal thread that temperature has been updated
- G_cent_temp_updated_bitmap |= CENTAUR0_PRESENT_MASK >> i_membuf;
+ G_cent_temp_updated_bitmap |= (CENTAUR0_PRESENT_MASK >> i_membuf);
//clear error flags
l_fru->flags &= FRU_TEMP_FAST_CHANGE;
@@ -434,7 +434,7 @@ void amec_update_ocmb_temp_sensors(void)
l_hot_dimm = g_amec->proc[0].memctl[k].centaur.tempdimmax.sample;
}
}
- sensor_update(&g_amec->proc[0].temp2mscent,l_hot_mb);
+ sensor_update(&g_amec->proc[0].tempcent,l_hot_mb);
AMEC_DBG("HotMembuf=%d\n",l_hot_mb);
sensor_update(&g_amec->proc[0].tempdimmthrm,l_hot_dimm);
diff --git a/src/occ_405/amec/amec_slave_smh.c b/src/occ_405/amec/amec_slave_smh.c
index e30dd5c..cc9bf28 100755
--- a/src/occ_405/amec/amec_slave_smh.c
+++ b/src/occ_405/amec/amec_slave_smh.c
@@ -499,7 +499,7 @@ void amec_slv_common_tasks_post(void)
void amec_slv_state_0(void)
{
AMEC_DBG("\tAMEC Slave State 0\n");
-
+ static uint8_t L_membuf_addr = 0; // used to handle reading 16 OCMBs one per slave state over 8 slave states
//-------------------------------------------------------
// Update Centaur sensors (for this tick)
//-------------------------------------------------------
@@ -509,7 +509,11 @@ void amec_slv_state_0(void)
}
else if(MEM_TYPE_OCM == G_sysConfigData.mem_type)
{
- amec_update_ocmb_sensors(CENTAUR_0);
+ amec_update_ocmb_sensors(CENTAUR_0+L_membuf_addr);
+ if(L_membuf_addr)
+ L_membuf_addr = 0;
+ else
+ L_membuf_addr = 8;
}
//-------------------------------------------------------
@@ -539,6 +543,8 @@ void amec_slv_state_0(void)
void amec_slv_state_1(void)
{
AMEC_DBG("\tAMEC Slave State 1\n");
+ static uint8_t L_membuf_addr = 0; // used to handle reading 16 OCMBs one per slave state over 8 slave states
+
if(MEM_TYPE_CUMULUS == G_sysConfigData.mem_type)
{
//-------------------------------------------------------
@@ -553,8 +559,15 @@ void amec_slv_state_1(void)
}
else if(MEM_TYPE_OCM == G_sysConfigData.mem_type)
{
- amec_update_ocmb_sensors(CENTAUR_1);
- amec_update_ocmb_temp_sensors();
+ amec_update_ocmb_sensors(CENTAUR_1+L_membuf_addr);
+ if(L_membuf_addr)
+ L_membuf_addr = 0;
+ else
+ {
+ L_membuf_addr = 8;
+ // update Proc level sensors
+ amec_update_ocmb_temp_sensors();
+ }
}
}
@@ -569,6 +582,7 @@ void amec_slv_state_1(void)
void amec_slv_state_2(void)
{
AMEC_DBG("\tAMEC Slave State 2\n");
+ static uint8_t L_membuf_addr = 0; // used to handle reading 16 OCMBs one per slave state over 8 slave states
//-------------------------------------------------------
// Update Centaur sensors (for this tick)
@@ -579,7 +593,11 @@ void amec_slv_state_2(void)
}
else if(MEM_TYPE_OCM == G_sysConfigData.mem_type)
{
- amec_update_ocmb_sensors(CENTAUR_2);
+ amec_update_ocmb_sensors(CENTAUR_2+L_membuf_addr);
+ if(L_membuf_addr)
+ L_membuf_addr = 0;
+ else
+ L_membuf_addr = 8;
}
// Call VRM Vdd thermal controller
@@ -599,6 +617,7 @@ void amec_slv_state_2(void)
void amec_slv_state_3(void)
{
AMEC_DBG("\tAMEC Slave State 3\n");
+ static uint8_t L_membuf_addr = 0; // used to handle reading 16 OCMBs one per slave state over 8 slave states
//-------------------------------------------------------
// Update Centaur sensors (for this tick)
@@ -609,7 +628,11 @@ void amec_slv_state_3(void)
}
else if(MEM_TYPE_OCM == G_sysConfigData.mem_type)
{
- amec_update_ocmb_sensors(CENTAUR_3);
+ amec_update_ocmb_sensors(CENTAUR_3+L_membuf_addr);
+ if(L_membuf_addr)
+ L_membuf_addr = 0;
+ else
+ L_membuf_addr = 8;
}
}
@@ -626,6 +649,7 @@ void amec_slv_state_3(void)
void amec_slv_state_4(void)
{
AMEC_DBG("\tAMEC Slave State 4\n");
+ static uint8_t L_membuf_addr = 0; // used to handle reading 16 OCMBs one per slave state over 8 slave states
//-------------------------------------------------------
// Update Centaur sensors (for this tick)
@@ -636,7 +660,11 @@ void amec_slv_state_4(void)
}
else if(MEM_TYPE_OCM == G_sysConfigData.mem_type)
{
- amec_update_ocmb_sensors(CENTAUR_4);
+ amec_update_ocmb_sensors(CENTAUR_4+L_membuf_addr);
+ if(L_membuf_addr)
+ L_membuf_addr = 0;
+ else
+ L_membuf_addr = 8;
}
//-------------------------------------------------------
@@ -663,6 +691,7 @@ void amec_slv_state_4(void)
void amec_slv_state_5(void)
{
AMEC_DBG("\tAMEC Slave State 5\n");
+ static uint8_t L_membuf_addr = 0; // used to handle reading 16 OCMBs one per slave state over 8 slave states
//-------------------------------------------------------
// Update Centaur sensors (for this tick)
@@ -673,7 +702,11 @@ void amec_slv_state_5(void)
}
else if(MEM_TYPE_OCM == G_sysConfigData.mem_type)
{
- amec_update_ocmb_sensors(CENTAUR_5);
+ amec_update_ocmb_sensors(CENTAUR_5+L_membuf_addr);
+ if(L_membuf_addr)
+ L_membuf_addr = 0;
+ else
+ L_membuf_addr = 8;
}
//-------------------------------------------------------
@@ -696,6 +729,7 @@ void amec_slv_state_5(void)
void amec_slv_state_6(void)
{
AMEC_DBG("\tAMEC Slave State 6\n");
+ static uint8_t L_membuf_addr = 0; // used to handle reading 16 OCMBs one per slave state over 8 slave states
//-------------------------------------------------------
// Update Centaur sensors (for this tick)
@@ -706,7 +740,11 @@ void amec_slv_state_6(void)
}
else if(MEM_TYPE_OCM == G_sysConfigData.mem_type)
{
- amec_update_ocmb_sensors(CENTAUR_6);
+ amec_update_ocmb_sensors(CENTAUR_6+L_membuf_addr);
+ if(L_membuf_addr)
+ L_membuf_addr = 0;
+ else
+ L_membuf_addr = 8;
}
}
@@ -721,6 +759,7 @@ void amec_slv_state_6(void)
void amec_slv_state_7(void)
{
AMEC_DBG("\tAMEC Slave State 7\n");
+ static uint8_t L_membuf_addr = 0; // used to handle reading 16 OCMBs one per slave state over 8 slave states
//-------------------------------------------------------
// Update Centaur sensors (for this tick)
@@ -731,7 +770,11 @@ void amec_slv_state_7(void)
}
else if(MEM_TYPE_OCM == G_sysConfigData.mem_type)
{
- amec_update_ocmb_sensors(CENTAUR_7);
+ amec_update_ocmb_sensors(CENTAUR_7+L_membuf_addr);
+ if(L_membuf_addr)
+ L_membuf_addr = 0;
+ else
+ L_membuf_addr = 8;
}
}
diff --git a/src/occ_405/amec/amec_sys.h b/src/occ_405/amec/amec_sys.h
index 16924b6..c19cd53 100755
--- a/src/occ_405/amec/amec_sys.h
+++ b/src/occ_405/amec/amec_sys.h
@@ -469,7 +469,7 @@ typedef struct
vectorSensor_t util_vector;
// Memory Summary Sensors
- sensor_t temp2mscent;
+ sensor_t tempcent;
sensor_t tempdimmthrm;
sensor_t mempwrthrot;
sensor_t memotthrot;
diff --git a/src/occ_405/cent/centaur_data.c b/src/occ_405/cent/centaur_data.c
index 3ccd7bf..0e6f17d 100755
--- a/src/occ_405/cent/centaur_data.c
+++ b/src/occ_405/cent/centaur_data.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2018 */
+/* Contributors Listed Below - COPYRIGHT 2014,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -147,8 +147,8 @@ membuf_data_task_t G_membuf_data_task = {
};
-dimm_sensor_flags_t G_dimm_enabled_sensors = {0};
-dimm_sensor_flags_t G_dimm_present_sensors = {0};
+dimm_sensor_flags_t G_dimm_enabled_sensors = {{0}};
+dimm_sensor_flags_t G_dimm_present_sensors = {{0}};
//AMEC needs to know when data for a centaur has been collected.
uint32_t G_updated_centaur_mask = 0;
@@ -209,8 +209,8 @@ void cent_chan_checkstop(uint32_t i_cent)
G_present_centaurs);
TRAC_IMP("Updated bitmap of enabled dimm temperature sensors: 0x%08X %08X",
- G_dimm_enabled_sensors.words[0],
- G_dimm_enabled_sensors.words[1]);
+ (uint32_t)(G_dimm_enabled_sensors.dw[0]>> 32),
+ (uint32_t)G_dimm_enabled_sensors.dw[0]);
}
}
@@ -977,8 +977,8 @@ int cent_get_enabled_sensors()
G_dimm_present_sensors = G_dimm_enabled_sensors;
TRAC_IMP("bitmap of enabled dimm temperature sensors: 0x%08X %08X",
- G_dimm_enabled_sensors.words[0],
- G_dimm_enabled_sensors.words[1]);
+ (uint32_t)(G_dimm_enabled_sensors.dw[0]>>32),
+ (uint32_t)G_dimm_enabled_sensors.dw[0]);
}while(0);
return l_rc;
}
diff --git a/src/occ_405/cent/centaur_data.h b/src/occ_405/cent/centaur_data.h
index 2c7e259..b5177b1 100755
--- a/src/occ_405/cent/centaur_data.h
+++ b/src/occ_405/cent/centaur_data.h
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/occ/cent/centaur_data.h $ */
+/* $Source: src/occ_405/cent/centaur_data.h $ */
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2015 */
+/* Contributors Listed Below - COPYRIGHT 2014,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -45,12 +45,11 @@
// Defines/Enums
//*************************************************************************
-// Mask that is used by procedure to specify which centaurs are present
-#define ALL_CENTAURS_MASK 0x000000ff
-#define ALL_CENTAURS_MASK_GPE 0x000000ff00000000ull
+// Mask that is used by procedure to specify which centaurs/OCMBs are present
+// common with OCM, must account for max of 16 OCMBs
+#define ALL_CENTAURS_MASK 0x0000ffff
// Centaur0, used by OCC
-#define CENTAUR0_PRESENT_MASK 0x00000080ul
-#define CENTAUR0_PRESENT_MASK_GPE 0x0000008000000000ull
+#define CENTAUR0_PRESENT_MASK 0x00008000ul
// Used for specifing buffer allocations
#define NUM_CENTAUR_DATA_BUFF MAX_NUM_CENTAURS
@@ -92,10 +91,6 @@ enum eOccCentaurs
#define CENTAUR_BY_MASK(occ_cent_id) \
((CENTAUR0_PRESENT_MASK >> occ_cent_id) & ALL_CENTAURS_MASK)
-//Returns the bitmask for the passed in Centaur (uint64_t)
-#define CENTAUR_BY_MASK_GPE(occ_cent_id) \
- (((uint64_t) CENTAUR0_PRESENT_MASK_GPE >> occ_cent_id) & ALL_CENTAURS_MASK_GPE)
-
#define DIMM_SENSOR0 0x80
#define CENTAUR_SENSOR_ENABLED(occ_cent_id, sensor_num) \
@@ -147,13 +142,13 @@ extern dimm_sensor_flags_t G_dimm_temp_updated_bitmap;
extern dimm_sensor_flags_t G_dimm_timeout_logged_bitmap;
//global bitmap flagging the centaurs which we already calledout due to timeout (bitmap of centaurs)
-extern uint8_t G_cent_timeout_logged_bitmap;
+extern uint16_t G_cent_timeout_logged_bitmap;
//global bitmap of centaurs that have ever gone over the error temperature
-extern uint8_t G_cent_overtemp_bitmap;
+extern uint16_t G_cent_overtemp_bitmap;
//global bitmap of centaur temperatures that have been updated
-extern uint8_t G_cent_temp_updated_bitmap;
+extern uint16_t G_cent_temp_updated_bitmap;
//bitmap of configured MBA's (2 per centaur, lsb is centaur0/mba0)
extern uint16_t G_configured_mbas;
diff --git a/src/occ_405/cent/ocmb_data.c b/src/occ_405/cent/ocmb_data.c
index 8599b28..147d80e 100644
--- a/src/occ_405/cent/ocmb_data.c
+++ b/src/occ_405/cent/ocmb_data.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2018 */
+/* Contributors Listed Below - COPYRIGHT 2016,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -65,7 +65,7 @@ void ocmb_init(void)
// Configure OCC_405 global membuf present and sensor enabled flags
G_present_centaurs = 0;
- for(membuf_idx=0; membuf_idx<MAX_NUM_CENTAURS; ++membuf_idx)
+ for(membuf_idx=0; membuf_idx<MAX_NUM_OCMBS; ++membuf_idx)
{
// Check if this membuf is even possible to be present
if( CENTAUR_BY_MASK(membuf_idx) )
@@ -93,9 +93,11 @@ void ocmb_init(void)
G_dimm_present_sensors = G_dimm_enabled_sensors;
- TRAC_IMP("bitmap of present dimm temperature sensors: 0x%08X%08X",
- G_dimm_enabled_sensors.words[0],
- G_dimm_enabled_sensors.words[1]);
+ TRAC_IMP("bitmap of present dimm temperature sensors: 0x%08X%08X%08X%08X",
+ (uint32_t)(G_dimm_enabled_sensors.dw[0]>>32),
+ (uint32_t)G_dimm_enabled_sensors.dw[0],
+ (uint32_t)(G_dimm_enabled_sensors.dw[1]>>32),
+ (uint32_t)G_dimm_enabled_sensors.dw[1]);
// Setup the GPE request to do sensor data collection
G_membuf_data_parms.error.ffdc = 0;
diff --git a/src/occ_405/dcom/dcom.h b/src/occ_405/dcom/dcom.h
index c5ffc16..532fcae 100755
--- a/src/occ_405/dcom/dcom.h
+++ b/src/occ_405/dcom/dcom.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2018 */
+/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -107,7 +107,7 @@
#define NUM_TOD_SENSORS 3
#define SLV_INBOX_RSV_SIZE 150
#define SLV_MAILBOX_SIZE 32
-#define SLV_OUTBOX_RSV_SIZE 598
+#define SLV_OUTBOX_RSV_SIZE 550
#define DOORBELL_RSV_SIZE 1
#define DCOM_MAX_ERRH_ENTRIES 8
@@ -206,40 +206,40 @@ typedef struct __attribute__ ((packed))
uint16_t mcpifd4msp0cy[MAX_CORES]; // [52]
uint16_t mcpifi4msp0cy[MAX_CORES]; // [100]
uint16_t memReserved[MAX_NUM_MEM_CONTROLLERS]; // [148]
- uint16_t pwrproc; // [164]
- uint16_t pwr250usmemp0; // [166]
- uint16_t reserved0; // [168]
- uint16_t reserved1; // [170]
- uint16_t tempprocavg; // [172]
- uint16_t tempprocthermal; // [174]
- uint16_t utilcy[MAX_CORES]; // [176]
- uint16_t tempvdd; // [224]
- uint16_t reserved2; // [226]
- uint16_t mrd[MAX_NUM_MEM_CONTROLLERS]; // [228]
- uint16_t mwr[MAX_NUM_MEM_CONTROLLERS]; // [244]
- uint16_t coreReserved[MAX_CORES]; // [260]
- uint16_t todclock[NUM_TOD_SENSORS]; // [308]
- uint16_t temp2mscent; // [314]
- uint16_t tempdimmthrm; // [316]
- uint16_t util; // [318]
- uint16_t ips4msp0; // [320]
- uint16_t nutil3sp0cy[MAX_CORES]; // [322]
+ uint16_t pwrproc; // [180]
+ uint16_t pwr250usmemp0; // [182]
+ uint16_t reserved0; // [184]
+ uint16_t reserved1; // [186]
+ uint16_t tempprocavg; // [188]
+ uint16_t tempprocthermal; // [190]
+ uint16_t utilcy[MAX_CORES]; // [192]
+ uint16_t tempvdd; // [240]
+ uint16_t reserved2; // [242]
+ uint16_t mrd[MAX_NUM_MEM_CONTROLLERS]; // [244]
+ uint16_t mwr[MAX_NUM_MEM_CONTROLLERS]; // [276]
+ uint16_t coreReserved[MAX_CORES]; // [308]
+ uint16_t todclock[NUM_TOD_SENSORS]; // [356]
+ uint16_t tempcent; // [362]
+ uint16_t tempdimmthrm; // [364]
+ uint16_t util; // [366]
+ uint16_t ips4msp0; // [368]
+ uint16_t nutil3sp0cy[MAX_CORES]; // [370]
// Fwish (i.e., desired frequency that this OCC slave wants based on DPS
// algorithms)
- uint16_t fwish; // [370]
+ uint16_t fwish; // [418]
// Factual (i.e., actual frequency requested by this OCC slave)
- uint16_t factual; // [372]
+ uint16_t factual; // [420]
// Error history counts
- error_history_count_t errhCount[DCOM_MAX_ERRH_ENTRIES]; // [374] - 16 bytes
+ error_history_count_t errhCount[DCOM_MAX_ERRH_ENTRIES]; // [422] - 16 bytes
// Frequency Clip History
- uint32_t fClipHist; // [390] - 4 bytes
+ uint32_t fClipHist; // [438] - 4 bytes
// Reserved Bytes
union
{
- uint8_t reserved[SLV_OUTBOX_RSV_SIZE]; // [422] - 598 bytes
+ uint8_t reserved[SLV_OUTBOX_RSV_SIZE]; // [442] - 550 bytes
struct __attribute__ ((packed))
{
uint8_t _reserved_1;
@@ -250,7 +250,7 @@ typedef struct __attribute__ ((packed))
// General Firmware Message Passing
uint8_t occ_fw_mailbox[SLV_MAILBOX_SIZE]; // [992] - 32 bytes
-} dcom_slv_outbox_t __attribute__ ((aligned (128)));
+} dcom_slv_outbox_t __attribute__ ((aligned (128))); // 1024 total bytes
// Slave Inbox Doorbell
// This must be aligned to 8 bytes since that is the unit
diff --git a/src/occ_405/dimm/dimm.c b/src/occ_405/dimm/dimm.c
index 7757d2c..e87b530 100755
--- a/src/occ_405/dimm/dimm.c
+++ b/src/occ_405/dimm/dimm.c
@@ -756,7 +756,7 @@ void task_dimm_sm(struct task *i_self)
if (!L_dimms_enabled)
{
L_dimms_enabled = true;
- TRAC_INFO("task_dimm_sm: DIMM temp collection is being started (0x%08X)", G_dimm_present_sensors.words[0]);
+ TRAC_INFO("task_dimm_sm: DIMM temp collection is being started (0x%08X)", (uint32_t)(G_dimm_present_sensors.dw[0] >> 32));
G_dimm_enabled_sensors = G_dimm_present_sensors;
}
diff --git a/src/occ_405/mem/memory.h b/src/occ_405/mem/memory.h
index 1314823..e3f2cc9 100644
--- a/src/occ_405/mem/memory.h
+++ b/src/occ_405/mem/memory.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2016 */
+/* Contributors Listed Below - COPYRIGHT 2014,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -48,14 +48,13 @@ typedef struct
uint16_t min_n_per_mba; //from config data
} memory_throttle_t;
-// 64 bits encoding different bit fields corresponding to dimms
-// either on centaurs or on I2C ports, up to 8 dimms on 8 centaurs/ports
+// 128 bits encoding different bit fields corresponding to dimms
+// either on centaurs or on I2C ports
typedef union
{
- uint64_t bigword;
- uint32_t words[2];
- uint8_t bytes[8];
-}dimm_sensor_flags_t;
+ uint64_t dw[2];
+ uint8_t bytes[16];
+} dimm_sensor_flags_t;
//Memory data collect structures used for task data pointers
diff --git a/src/occ_405/occ_sys_config.h b/src/occ_405/occ_sys_config.h
index d1a9269..97d8c06 100755
--- a/src/occ_405/occ_sys_config.h
+++ b/src/occ_405/occ_sys_config.h
@@ -44,9 +44,10 @@
#define MAX_THREADS_PER_CORE 4
#define MAX_NUM_CHIP_MODULES 4
#define MAX_NUM_POWER_SUPPLIES 4
-#define MAX_NUM_MEM_CONTROLLERS 8
+#define MAX_NUM_MEM_CONTROLLERS 16
+#define MAX_NUM_CHOM_MEM_CTRL 8 // to save SRAM, limit call home (only Swift has more than 8 possible)
#define MAX_NUM_CENTAURS 8
-#define MAX_NUM_OCMBS 8
+#define MAX_NUM_OCMBS 16
#define NUM_PROC_VRMS 2
#define MAX_GPU_PRES_SIGNALS 6
#define GPU_PRES_SIGN_PER_OCC 3
diff --git a/src/occ_405/occbuildname.c b/src/occ_405/occbuildname.c
index a179b96..3d3f3eb 100755
--- a/src/occ_405/occbuildname.c
+++ b/src/occ_405/occbuildname.c
@@ -34,6 +34,6 @@ volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) =
#else
-volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_190719a\0" /*</BuildName>*/ ;
+volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_190723a\0" /*</BuildName>*/ ;
#endif
diff --git a/src/occ_405/sensor/sensor_enum.h b/src/occ_405/sensor/sensor_enum.h
index 0987497..e56fea2 100755
--- a/src/occ_405/sensor/sensor_enum.h
+++ b/src/occ_405/sensor/sensor_enum.h
@@ -137,7 +137,6 @@ enum e_gsid
// ------------------------------------------------------
// Core Sensors
// ------------------------------------------------------
-
FREQAC0, // actual frequency
FREQAC1,
FREQAC2,
@@ -424,6 +423,10 @@ enum e_gsid
MRDM5,
MRDM6,
MRDM7,
+ MRDM8,
+ MRDM9,
+ MRDM10,
+ MRDM11,
MWRM0,
MWRM1,
@@ -433,6 +436,10 @@ enum e_gsid
MWRM5,
MWRM6,
MWRM7,
+ MWRM8,
+ MWRM9,
+ MWRM10,
+ MWRM11,
MEMSPM0,
MEMSPM1,
@@ -442,6 +449,10 @@ enum e_gsid
MEMSPM5,
MEMSPM6,
MEMSPM7,
+ MEMSPM8,
+ MEMSPM9,
+ MEMSPM10,
+ MEMSPM11,
MEMSPSTATM0,
MEMSPSTATM1,
@@ -451,6 +462,10 @@ enum e_gsid
MEMSPSTATM5,
MEMSPSTATM6,
MEMSPSTATM7,
+ MEMSPSTATM8,
+ MEMSPSTATM9,
+ MEMSPSTATM10,
+ MEMSPSTATM11,
// Individual DIMM temperatures (NIMBUS)
TEMPDIMM00,
@@ -492,7 +507,7 @@ enum e_gsid
MEMOTTHROT,
// ------------------------------------------------------
- // Centaur Sensors - 8 MemC/Proc - 1 Cent/MemC - 2 PP/Cent
+ // Centaur/Memory Controller Sensors
// ------------------------------------------------------
TEMPCENT,
TEMPDIMMTHRM,
diff --git a/src/occ_405/sensor/sensor_info.c b/src/occ_405/sensor/sensor_info.c
index ceeae58..e57e4e4 100755
--- a/src/occ_405/sensor/sensor_info.c
+++ b/src/occ_405/sensor/sensor_info.c
@@ -142,7 +142,7 @@
[SENSOR_W_NUM(sensor_name,23)] = {.name = SENSOR_STRING(sensor_name ## 23), \
.sensor = { units, type, location, number, frequency, scaleFactor },}
-// This will create a set of 8 sensor entries into the sensor list table.
+// This will create a set of 12 sensor entries into the sensor list table.
// (one for each memc...) The base name of the sensor enum must be passed
// and this macro will take care of the paste & stringify operations.
#define SENS_MEMC_ENTRY_SET(sensor_name, units, type, location, number, frequency, scaleFactor) \
@@ -161,6 +161,14 @@
[SENSOR_W_NUM(sensor_name,6)] = {.name = SENSOR_STRING(sensor_name ## 6), \
.sensor = { units, type, location, number, frequency, scaleFactor },}, \
[SENSOR_W_NUM(sensor_name,7)] = {.name = SENSOR_STRING(sensor_name ## 7), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,8)] = {.name = SENSOR_STRING(sensor_name ## 8), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,9)] = {.name = SENSOR_STRING(sensor_name ## 9), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,10)] = {.name = SENSOR_STRING(sensor_name ## 10), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,11)] = {.name = SENSOR_STRING(sensor_name ## 11), \
.sensor = { units, type, location, number, frequency, scaleFactor },}
// This will create a set of 16 sensor entries into the sensor list table.
@@ -200,6 +208,28 @@
[SENSOR_W_NUM(sensor_name,15)] = {.name = SENSOR_STRING(sensor_name ## 15), \
.sensor = { units, type, location, number, frequency, scaleFactor },}
+// This will create a set of 8 sensor entries into the sensor list table.
+// (one for each centaur...) The base name of the sensor enum must be passed
+// and this macro will take care of the paste & stringify operations.
+// this should only be used for data that is specific to Centaur. Any mem controller
+// data that is common between Centaur and Open CAPI should use SENS_MEMC_ENTRY_SET
+#define SEN_CENT_ENTRY_SET(sensor_name, units, type, location, number, frequency, scaleFactor) \
+ [SENSOR_W_NUM(sensor_name,0)] = {.name = SENSOR_STRING(sensor_name ## 0), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,1)] = {.name = SENSOR_STRING(sensor_name ## 1), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,2)] = {.name = SENSOR_STRING(sensor_name ## 2), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,3)] = {.name = SENSOR_STRING(sensor_name ## 3), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,4)] = {.name = SENSOR_STRING(sensor_name ## 4), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,5)] = {.name = SENSOR_STRING(sensor_name ## 5), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,6)] = {.name = SENSOR_STRING(sensor_name ## 6), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}, \
+ [SENSOR_W_NUM(sensor_name,7)] = {.name = SENSOR_STRING(sensor_name ## 7), \
+ .sensor = { units, type, location, number, frequency, scaleFactor },}
// This table takes care of the ordering of the sensors (by GSID) and all parameters needed for AMEC or AMESTER. The order
// that is in the table below doesn't matter because we use designated initializers.
@@ -298,8 +328,8 @@ const sensor_info_t G_sensor_info[] =
SENS_MEMC_ENTRY_SET( MEMSPM, "%\0", AMEC_SENSOR_TYPE_UTIL, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, -1) ),
SENS_MEMC_ENTRY_SET( MEMSPSTATM, "%\0", AMEC_SENSOR_TYPE_UTIL, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, -1) ),
SENS_DIMM_ENTRY_SET( TEMPDIMM, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_128TH_TICK_HZ, AMEFP( 1, 0) ),
- SENS_MEMC_ENTRY_SET( TEMPDIMMAXM, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ),
- SENS_MEMC_ENTRY_SET( LOCDIMMAXM, "loc\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ),
+ SEN_CENT_ENTRY_SET( TEMPDIMMAXM, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ),
+ SEN_CENT_ENTRY_SET( LOCDIMMAXM, "loc\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ),
SENSOR_INFO_T_ENTRY( MEMPWRTHROT, "#\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_TICK_HZ, AMEFP( 1, 0) ),
SENSOR_INFO_T_ENTRY( MEMOTTHROT, "#\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_64TH_TICK_HZ, AMEFP( 1, 0) ),
diff --git a/src/occ_405/sensor/sensor_main_memory.c b/src/occ_405/sensor/sensor_main_memory.c
index c0abbe2..6191e54 100644
--- a/src/occ_405/sensor/sensor_main_memory.c
+++ b/src/occ_405/sensor/sensor_main_memory.c
@@ -131,7 +131,11 @@
MAIN_MEM_SENSOR(gsid_prefix##4 , smf_mode, master_only) , \
MAIN_MEM_SENSOR(gsid_prefix##5 , smf_mode, master_only) , \
MAIN_MEM_SENSOR(gsid_prefix##6 , smf_mode, master_only) , \
- MAIN_MEM_SENSOR(gsid_prefix##7 , smf_mode, master_only)
+ MAIN_MEM_SENSOR(gsid_prefix##7 , smf_mode, master_only) , \
+ MAIN_MEM_SENSOR(gsid_prefix##8 , smf_mode, master_only) , \
+ MAIN_MEM_SENSOR(gsid_prefix##9 , smf_mode, master_only) , \
+ MAIN_MEM_SENSOR(gsid_prefix##10, smf_mode, master_only) , \
+ MAIN_MEM_SENSOR(gsid_prefix##11, smf_mode, master_only)
/**
* Macro to build main_mem_sensor_t instances for all APSS channels.
@@ -933,9 +937,9 @@ void mm_sensors_init_names_entry(const main_mem_sensor_t * i_mm_sensor,
// Set entry struct field values
memcpy(o_entry->name, l_sensor_info->name, MAX_SENSOR_NAME_SZ);
memcpy(o_entry->units, l_sensor_info->sensor.units, MAX_SENSOR_UNIT_SZ);
- if( (MEM_TYPE_NIMBUS == G_sysConfigData.mem_type) &&
- ( ((l_gsid >= MRDM0) && (l_gsid <= MRDM7)) ||
- ((l_gsid >= MWRM0) && (l_gsid <= MWRM7)) ) )
+ if( (MEM_TYPE_CUMULUS != G_sysConfigData.mem_type) &&
+ ( ((l_gsid >= MRDM0) && (l_gsid <= MRDM11)) ||
+ ((l_gsid >= MWRM0) && (l_gsid <= MWRM11)) ) )
{
o_entry->scale_factor = AMEFP(64, -5);
}
diff --git a/src/occ_405/sensor/sensor_main_memory.h b/src/occ_405/sensor/sensor_main_memory.h
index 8befbb0..f6bd824 100644
--- a/src/occ_405/sensor/sensor_main_memory.h
+++ b/src/occ_405/sensor/sensor_main_memory.h
@@ -267,7 +267,7 @@ extern bool G_main_mem_sensors_initialized;
*/
extern bool G_smf_mode;
-extern main_mem_sensor_t G_main_mem_sensors[337];
+extern main_mem_sensor_t G_main_mem_sensors[353];
/**
* Number of main memory sensors (in G_main_mem_sensors).
diff --git a/src/occ_405/sensor/sensor_table.c b/src/occ_405/sensor/sensor_table.c
index 36124f2..fe66b16 100755
--- a/src/occ_405/sensor/sensor_table.c
+++ b/src/occ_405/sensor/sensor_table.c
@@ -76,10 +76,11 @@ extern amec_sys_t g_amec_sys;
[SENSOR_W_NUM(sensor, 4)] = ptrbase[ 4].ptrmember, \
[SENSOR_W_NUM(sensor, 5)] = ptrbase[ 5].ptrmember
-
-// Will define a set of "memory controller sensor pointers" by passing in
-// base sensor nameand ptr to [0] entry of array of 8 memcontroller sensors
-#define MEMCONTROL_SENSOR_PTRS(sensor,ptrbase,ptrmember) \
+// Will define a set of "Centaur memory controller sensor pointers" by passing in
+// base sensor name and ptr to [0] entry of array of 8 Centaur memcontroller sensors
+// this should only be used for data that is specific to Centaur. Any mem controller
+// data that is common between Centaur and Open CAPI should use MEMCONTROL_SENSOR_PTRS
+#define MEMCONTROL_CENT_SENSOR_PTRS(sensor,ptrbase,ptrmember) \
[SENSOR_W_NUM(sensor, 0)] = ptrbase[0].ptrmember, \
[SENSOR_W_NUM(sensor, 1)] = ptrbase[1].ptrmember, \
[SENSOR_W_NUM(sensor, 2)] = ptrbase[2].ptrmember, \
@@ -90,7 +91,27 @@ extern amec_sys_t g_amec_sys;
[SENSOR_W_NUM(sensor, 7)] = ptrbase[7].ptrmember
// Will define a set of "memory controller sensor pointers" by passing in
-// base sensor nameand ptr to [0] entry of array of 8 memcontroller sensors
+// base sensor name and ptr to [0] entry of array of 12 memcontroller sensors
+// This is for common Centaur and OCM mem controller data Centaur really only needs 8
+// Hw for OCM supports upto 16 but we will only make sensors for 12 to save SRAM
+// 12 is the known max being used for P9' code does support 16 if a system is made
+// using more than 12 then the data for the last 4 MCs won't be exposed in sensors
+#define MEMCONTROL_SENSOR_PTRS(sensor,ptrbase,ptrmember) \
+ [SENSOR_W_NUM(sensor, 0)] = ptrbase[ 0].ptrmember, \
+ [SENSOR_W_NUM(sensor, 1)] = ptrbase[ 1].ptrmember, \
+ [SENSOR_W_NUM(sensor, 2)] = ptrbase[ 2].ptrmember, \
+ [SENSOR_W_NUM(sensor, 3)] = ptrbase[ 3].ptrmember, \
+ [SENSOR_W_NUM(sensor, 4)] = ptrbase[ 4].ptrmember, \
+ [SENSOR_W_NUM(sensor, 5)] = ptrbase[ 5].ptrmember, \
+ [SENSOR_W_NUM(sensor, 6)] = ptrbase[ 6].ptrmember, \
+ [SENSOR_W_NUM(sensor, 7)] = ptrbase[ 7].ptrmember, \
+ [SENSOR_W_NUM(sensor, 8)] = ptrbase[ 8].ptrmember, \
+ [SENSOR_W_NUM(sensor, 9)] = ptrbase[ 9].ptrmember, \
+ [SENSOR_W_NUM(sensor,10)] = ptrbase[10].ptrmember, \
+ [SENSOR_W_NUM(sensor,11)] = ptrbase[11].ptrmember
+
+// Will define a set of "DIMM sensor pointers" by passing in
+// base sensor name and ptr to [0] entry of array of 16 DIMM sensors
#define DIMM_SENSOR_PTRS(sensor,ptrbase,ptrmember) \
[SENSOR_W_NUM(sensor, 00)] = ptrbase.ptrmember[ 0], \
[SENSOR_W_NUM(sensor, 01)] = ptrbase.ptrmember[ 1], \
@@ -187,8 +208,32 @@ extern amec_sys_t g_amec_sys;
[SENSOR_W_NUM(sensor, 4)] = NULL, \
[SENSOR_W_NUM(sensor, 5)] = NULL
+// Will define a set of "Centaur specific memc mini sensor ptrs" by passing in
+// base sensor name and ptr to [0] entry of array of 8 Centaur sensors
+#define MEMCONTROL_CENT_MINI_SENSOR_PTRS(sensor,ptr) \
+ [SENSOR_W_NUM(sensor, 0)] = ptr[ 0], \
+ [SENSOR_W_NUM(sensor, 1)] = ptr[ 1], \
+ [SENSOR_W_NUM(sensor, 2)] = ptr[ 2], \
+ [SENSOR_W_NUM(sensor, 3)] = ptr[ 3], \
+ [SENSOR_W_NUM(sensor, 4)] = ptr[ 4], \
+ [SENSOR_W_NUM(sensor, 5)] = ptr[ 5], \
+ [SENSOR_W_NUM(sensor, 6)] = ptr[ 6], \
+ [SENSOR_W_NUM(sensor, 7)] = ptr[ 7]
+
+// Will define a set of "Centaur specific memc mini-sensor pointers" as NULL, since not
+// every sensor must have a mini-sensor.
+#define MEMCONTROL_CENT_MINI_SENSOR_PTRS_NULL(sensor) \
+ [SENSOR_W_NUM(sensor, 0)] = NULL, \
+ [SENSOR_W_NUM(sensor, 1)] = NULL, \
+ [SENSOR_W_NUM(sensor, 2)] = NULL, \
+ [SENSOR_W_NUM(sensor, 3)] = NULL, \
+ [SENSOR_W_NUM(sensor, 4)] = NULL, \
+ [SENSOR_W_NUM(sensor, 5)] = NULL, \
+ [SENSOR_W_NUM(sensor, 6)] = NULL, \
+ [SENSOR_W_NUM(sensor, 7)] = NULL
+
// Will define a set of "memory controller mini sensor ptrs" by passing in
-// base sensor nameand ptr to [0] entry of array of 8 memcontroller sensors
+// base sensor name and ptr to [0] entry of array of 12 memcontroller sensors
#define MEMCONTROL_MINI_SENSOR_PTRS(sensor,ptr) \
[SENSOR_W_NUM(sensor, 0)] = ptr[ 0], \
[SENSOR_W_NUM(sensor, 1)] = ptr[ 1], \
@@ -197,7 +242,11 @@ extern amec_sys_t g_amec_sys;
[SENSOR_W_NUM(sensor, 4)] = ptr[ 4], \
[SENSOR_W_NUM(sensor, 5)] = ptr[ 5], \
[SENSOR_W_NUM(sensor, 6)] = ptr[ 6], \
- [SENSOR_W_NUM(sensor, 7)] = ptr[ 7]
+ [SENSOR_W_NUM(sensor, 7)] = ptr[ 7], \
+ [SENSOR_W_NUM(sensor, 8)] = ptr[ 8], \
+ [SENSOR_W_NUM(sensor, 9)] = ptr[ 9], \
+ [SENSOR_W_NUM(sensor,10)] = ptr[10], \
+ [SENSOR_W_NUM(sensor,11)] = ptr[11]
// Will define a set of "memc mini-sensor pointers" as NULL, since not
// every sensor must have a mini-sensor.
@@ -209,7 +258,11 @@ extern amec_sys_t g_amec_sys;
[SENSOR_W_NUM(sensor, 4)] = NULL, \
[SENSOR_W_NUM(sensor, 5)] = NULL, \
[SENSOR_W_NUM(sensor, 6)] = NULL, \
- [SENSOR_W_NUM(sensor, 7)] = NULL
+ [SENSOR_W_NUM(sensor, 7)] = NULL, \
+ [SENSOR_W_NUM(sensor, 8)] = NULL, \
+ [SENSOR_W_NUM(sensor, 9)] = NULL, \
+ [SENSOR_W_NUM(sensor,10)] = NULL, \
+ [SENSOR_W_NUM(sensor,11)] = NULL
//****************************************************************************
// Sensor Pointer Table
@@ -325,12 +378,12 @@ const sensor_ptr_t G_amec_sensor_list[] =
MEMCONTROL_SENSOR_PTRS(MEMSPM, &g_amec_sys.proc[0].memctl, memsp),
MEMCONTROL_SENSOR_PTRS(MEMSPSTATM, &g_amec_sys.proc[0].memctl, memspstat),
DIMM_SENSOR_PTRS(TEMPDIMM, &g_amec_sys.proc[0], tempdimm),
- MEMCONTROL_SENSOR_PTRS(TEMPDIMMAXM, &g_amec_sys.proc[0].memctl, centaur.tempdimmax),
- MEMCONTROL_SENSOR_PTRS(LOCDIMMAXM, &g_amec_sys.proc[0].memctl, centaur.locdimmax),
+ MEMCONTROL_CENT_SENSOR_PTRS(TEMPDIMMAXM, &g_amec_sys.proc[0].memctl, centaur.tempdimmax),
+ MEMCONTROL_CENT_SENSOR_PTRS(LOCDIMMAXM, &g_amec_sys.proc[0].memctl, centaur.locdimmax),
SENSOR_PTR(MEMPWRTHROT, &g_amec_sys.proc[0].mempwrthrot),
SENSOR_PTR(MEMOTTHROT, &g_amec_sys.proc[0].memotthrot),
- SENSOR_PTR(TEMPCENT, &g_amec_sys.proc[0].temp2mscent),
+ SENSOR_PTR(TEMPCENT, &g_amec_sys.proc[0].tempcent),
SENSOR_PTR(TEMPDIMMTHRM, &g_amec_sys.proc[0].tempdimmthrm),
// ------------------------------------------------------
@@ -497,13 +550,13 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION =
MINI_SENSOR_PTR( TEMPDIMM14, NULL),
MINI_SENSOR_PTR( TEMPDIMM15, NULL),
- MEMCONTROL_MINI_SENSOR_PTRS_NULL(TEMPDIMMAXM),
- MEMCONTROL_MINI_SENSOR_PTRS_NULL(LOCDIMMAXM),
+ MEMCONTROL_CENT_MINI_SENSOR_PTRS_NULL(TEMPDIMMAXM),
+ MEMCONTROL_CENT_MINI_SENSOR_PTRS_NULL(LOCDIMMAXM),
MINI_SENSOR_PTR( MEMPWRTHROT, NULL),
MINI_SENSOR_PTR( MEMOTTHROT, NULL),
- MINI_SENSOR_PTR( TEMPCENT, &G_dcom_slv_outbox_tx.temp2mscent),
+ MINI_SENSOR_PTR( TEMPCENT, &G_dcom_slv_outbox_tx.tempcent),
MINI_SENSOR_PTR( TEMPDIMMTHRM, &G_dcom_slv_outbox_tx.tempdimmthrm),
// ------------------------------------------------------
diff --git a/src/occ_405/thread/chom.c b/src/occ_405/thread/chom.c
index 025a174..65cc2d4 100755
--- a/src/occ_405/thread/chom.c
+++ b/src/occ_405/thread/chom.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2018 */
+/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -86,10 +86,10 @@ const uint16_t * g_chom_sensor_table[CHOM_NUM_OF_SENSORS] =
&G_dcom_slv_outbox_rx[2].tempprocthermal,
&G_dcom_slv_outbox_rx[3].tempprocthermal,
// Centaur temperature sensors
- &G_dcom_slv_outbox_rx[0].temp2mscent,
- &G_dcom_slv_outbox_rx[1].temp2mscent,
- &G_dcom_slv_outbox_rx[2].temp2mscent,
- &G_dcom_slv_outbox_rx[3].temp2mscent,
+ &G_dcom_slv_outbox_rx[0].tempcent,
+ &G_dcom_slv_outbox_rx[1].tempcent,
+ &G_dcom_slv_outbox_rx[2].tempcent,
+ &G_dcom_slv_outbox_rx[3].tempcent,
// DIMM temperature sensors
&G_dcom_slv_outbox_rx[0].tempdimmthrm,
&G_dcom_slv_outbox_rx[1].tempdimmthrm,
@@ -170,7 +170,7 @@ void chom_update_sensors()
uint16_t l_mem_rw = 0;
uint16_t l_sample = 0;
- static uint32_t L_memBWNumSamples[NUM_CHOM_MODES][MAX_NUM_MEM_CONTROLLERS] = {{0}};
+ static uint32_t L_memBWNumSamples[NUM_CHOM_MODES][MAX_NUM_CHOM_MEM_CTRL] = {{0}};
// Use FMF as default
static uint32_t * L_curNumSamplePtr = L_memBWNumSamples[CHOM_MODE_FMF];
@@ -287,7 +287,7 @@ void chom_update_sensors()
}
// update memory bandwidth
- for ( j = 0; j < MAX_NUM_MEM_CONTROLLERS; j++)
+ for ( j = 0; j < MAX_NUM_CHOM_MEM_CTRL; j++)
{
l_mem_rw = G_dcom_slv_outbox_rx[i].mrd[j] +
G_dcom_slv_outbox_rx[i].mwr[j];
OpenPOWER on IntegriCloud