summaryrefslogtreecommitdiffstats
path: root/src/occ_405/sensor
diff options
context:
space:
mode:
authorWilliam Bryan <wilbryan@us.ibm.com>2018-01-03 12:30:29 -0600
committerWilliam A. Bryan <wilbryan@us.ibm.com>2018-03-27 11:57:42 -0400
commitbd605ba0a030b3490f0edebd8fb704722b6eab0d (patch)
tree34fc7b10f06fef7baf9d101f78b816a6129753d8 /src/occ_405/sensor
parentc8538f3c894d5f28f688f7a081507c3ef14d6c24 (diff)
downloadtalos-occ-bd605ba0a030b3490f0edebd8fb704722b6eab0d.tar.gz
talos-occ-bd605ba0a030b3490f0edebd8fb704722b6eab0d.zip
Memory Throttle Sensors
RTC:131184 Change-Id: I2582a1eb9d599f700182f17047cc95accad03725 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51407 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_405/sensor')
-rwxr-xr-xsrc/occ_405/sensor/sensor_enum.h45
-rwxr-xr-xsrc/occ_405/sensor/sensor_info.c18
-rw-r--r--src/occ_405/sensor/sensor_main_memory.c21
-rwxr-xr-xsrc/occ_405/sensor/sensor_table.c21
4 files changed, 56 insertions, 49 deletions
diff --git a/src/occ_405/sensor/sensor_enum.h b/src/occ_405/sensor/sensor_enum.h
index 433530e..51439b1 100755
--- a/src/occ_405/sensor/sensor_enum.h
+++ b/src/occ_405/sensor/sensor_enum.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -351,31 +351,6 @@ enum e_gsid
NUTILC22,
NUTILC23,
- MSTLC0,
- MSTLC1,
- MSTLC2,
- MSTLC3,
- MSTLC4,
- MSTLC5,
- MSTLC6,
- MSTLC7,
- MSTLC8,
- MSTLC9,
- MSTLC10,
- MSTLC11,
- MSTLC12,
- MSTLC13,
- MSTLC14,
- MSTLC15,
- MSTLC16,
- MSTLC17,
- MSTLC18,
- MSTLC19,
- MSTLC20,
- MSTLC21,
- MSTLC22,
- MSTLC23,
-
TEMPC0,
TEMPC1,
TEMPC2,
@@ -497,6 +472,24 @@ enum e_gsid
MWRM6,
MWRM7,
+ MEMSPM0,
+ MEMSPM1,
+ MEMSPM2,
+ MEMSPM3,
+ MEMSPM4,
+ MEMSPM5,
+ MEMSPM6,
+ MEMSPM7,
+
+ MEMSPSTATM0,
+ MEMSPSTATM1,
+ MEMSPSTATM2,
+ MEMSPSTATM3,
+ MEMSPSTATM4,
+ MEMSPSTATM5,
+ MEMSPSTATM6,
+ MEMSPSTATM7,
+
MIRCM0,
MIRCM1,
MIRCM2,
diff --git a/src/occ_405/sensor/sensor_info.c b/src/occ_405/sensor/sensor_info.c
index 06f3ff1..98d6b1a 100755
--- a/src/occ_405/sensor/sensor_info.c
+++ b/src/occ_405/sensor/sensor_info.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -65,21 +65,17 @@
[sensor_name] = {.name = #sensor_name, \
.sensor = { units, type, location, number, frequency, scaleFactor },}
-// This will paste a number onto a sensor name base to create the full enum
+// These will paste a number onto a sensor name base to create the full enum
// representation of the sensor name
#define SENSOR_W_NUM(sensor_name, num) sensor_name##num
-// This will paste a number onto a sensor name base to create the full enum
-// representation of the sensor name
#define SENSOR_W_CENTAUR_NUM_HELPER(sensor_name, memc,centL,cent,ppL,pp) sensor_name##memc##centL##cent##ppL##pp
#define SENSOR_W_CENTAUR_NUM(sensor_name, memc,cent,pp) SENSOR_W_CENTAUR_NUM_HELPER(sensor_name,memc,C,cent,P,pp)
-// This will stringify the enum so to create the sensor name. This will help
+// These will stringify the enum so to create the sensor name. This will help
// save keystrokes, as well as reduce typos & copy paste errors.
#define SENSOR_STRING(sensor_name) #sensor_name
-// This will stringify the enum so to create the sensor name. This will help
-// save keystrokes, as well as reduce typos & copy paste errors.
#define CENTAUR_SENSOR_STRING_HELPER(sensor_name, memc,centL,cent,ppL,pp) SENSOR_STRING(sensor_name##memc##centL##cent##ppL##pp)
#define CENTAUR_SENSOR_STRING(sensor_name,memc,cent,pp) CENTAUR_SENSOR_STRING_HELPER(sensor_name, memc,C,cent,P,pp)
@@ -175,7 +171,6 @@
[SENSOR_W_NUM(sensor_name,7)] = {.name = SENSOR_STRING(sensor_name ## 7), \
.sensor = { units, type, location, number, frequency, scaleFactor },}
-
// This will create a set of 16 sensor entries into the sensor list table.
// (one for each DIMM...) The base name of the sensor enum must be passed
// and this macro will take care of the paste & stringify operations.
@@ -351,15 +346,16 @@ const sensor_info_t G_sensor_info[] =
SENS_CORE_ENTRY_SET( TEMPPROCTHRMC, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ),
SENS_CORE_ENTRY_SET( UTILC, "%\0", AMEC_SENSOR_TYPE_UTIL, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1,-2) ),
SENS_CORE_ENTRY_SET( NUTILC, "%\0", AMEC_SENSOR_TYPE_UTIL, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_3S_IN_HZ, AMEFP( 1,-2) ),
- SENS_CORE_ENTRY_SET( MSTLC, "cpi\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ),
SENS_CORE_ENTRY_SET( TEMPC, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ),
SENS_CORE_ENTRY_SET( STOPDEEPREQC, "ss\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ),
SENS_CORE_ENTRY_SET( STOPDEEPACTC, "ss\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ),
SENS_CORE_ENTRY_SET( VOLTDROOPCNTC, "#\0",AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ),
/* ==MemSensors== NameString Units Type Location Number Freq ScaleFactor */
- SENS_MEMC_ENTRY_SET( MRDM, "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 128, -5) ),
- SENS_MEMC_ENTRY_SET( MWRM, "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 128, -5) ),
+ SENS_MEMC_ENTRY_SET( MRDM, "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 64, -5) ),
+ SENS_MEMC_ENTRY_SET( MWRM, "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 64, -5) ),
+ 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_MEMC_ENTRY_SET( MIRCM, "eps\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ),
SENS_MEMC_ENTRY_SET( MLP2M, "eps\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_MEM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_8TH_TICK_HZ, AMEFP( 1, 0) ),
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) ),
diff --git a/src/occ_405/sensor/sensor_main_memory.c b/src/occ_405/sensor/sensor_main_memory.c
index d0fa338..41b8d6c 100644
--- a/src/occ_405/sensor/sensor_main_memory.c
+++ b/src/occ_405/sensor/sensor_main_memory.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2017,2017 */
+/* Contributors Listed Below - COPYRIGHT 2017,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -134,6 +134,19 @@ typedef struct __attribute__ ((packed))
MAIN_MEM_SENSOR(gsid_prefix##15 , smf_mode, master_only)
/**
+ * Macro to build main_mem_sensor_t instances for all memory controllers.
+ */
+#define MAIN_MEM_MEMORY_SENSORS(gsid_prefix, smf_mode, master_only) \
+ MAIN_MEM_SENSOR(gsid_prefix##0 , smf_mode, master_only) , \
+ MAIN_MEM_SENSOR(gsid_prefix##1 , smf_mode, master_only) , \
+ MAIN_MEM_SENSOR(gsid_prefix##2 , smf_mode, master_only) , \
+ MAIN_MEM_SENSOR(gsid_prefix##3 , smf_mode, master_only) , \
+ 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)
+
+/**
* Macro to build main_mem_sensor_t instances for all APSS channels.
*/
#define MAIN_MEM_APSSCH_SENSORS(gsid_prefix, smf_mode, master_only) \
@@ -222,7 +235,11 @@ main_mem_sensor_t G_main_mem_sensors[] =
MAIN_MEM_SENSOR (PROCPWRTHROT, false, false),
MAIN_MEM_SENSOR (PROCOTTHROT, false, false),
MAIN_MEM_SENSOR (MEMPWRTHROT, false, false),
- MAIN_MEM_SENSOR (MEMOTTHROT, false, false)
+ MAIN_MEM_SENSOR (MEMOTTHROT, false, false),
+ MAIN_MEM_MEMORY_SENSORS (MRDM, false, false),
+ MAIN_MEM_MEMORY_SENSORS (MWRM, false, false),
+ MAIN_MEM_MEMORY_SENSORS (MEMSPSTATM, true, false),
+ MAIN_MEM_MEMORY_SENSORS (MEMSPM, false, false),
};
/**
diff --git a/src/occ_405/sensor/sensor_table.c b/src/occ_405/sensor/sensor_table.c
index 9538958..ed21237 100755
--- a/src/occ_405/sensor/sensor_table.c
+++ b/src/occ_405/sensor/sensor_table.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2017 */
+/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -38,7 +38,7 @@ extern amec_sys_t g_amec_sys;
// Will paste number onto enum 'sensor base name'
#define SENSOR_W_NUM(sensor,num) sensor##num
-// This will paste a number onto a sensor name base to create the full enum
+// These will paste a number onto a sensor name base to create the full enum
// representation of the sensor name
#define SENSOR_W_CENTAUR_NUM_HELPER(sensor_name, memc,centL,cent,ppL,pp) sensor_name##memc##centL##cent##ppL##pp
#define SENSOR_W_CENTAUR_NUM(sensor_name, memc,cent,pp) SENSOR_W_CENTAUR_NUM_HELPER(sensor_name,memc,C,cent,P,pp)
@@ -115,7 +115,7 @@ extern amec_sys_t g_amec_sys;
[SENSOR_W_NUM(sensor, 15)] = ptrbase.ptrmember[15]
// Will define a set of "centaur_port_pair sensor pointers" by passing in
-// base sensor nameand ptr to [0] entry of array of 16 memcontroller sensors
+// base sensor name and ptr to [0] entry of array of 16 memcontroller sensors
#define PORTPAIR_SENSOR_PTRS(sensor,ptrbase,ptrmember,ptrsnsr) \
[SENSOR_W_CENTAUR_NUM(sensor, 0, 0, 0)] = ptrbase[0].ptrmember[0].ptrsnsr, \
[SENSOR_W_CENTAUR_NUM(sensor, 0, 0, 1)] = ptrbase[0].ptrmember[1].ptrsnsr, \
@@ -134,7 +134,6 @@ extern amec_sys_t g_amec_sys;
[SENSOR_W_CENTAUR_NUM(sensor, 7, 0, 0)] = ptrbase[7].ptrmember[0].ptrsnsr, \
[SENSOR_W_CENTAUR_NUM(sensor, 7, 0, 1)] = ptrbase[7].ptrmember[1].ptrsnsr
-
// Will create an entry in the G_amec_mini_sensor_list with a pointer at
// the sensor index (gsid) passed in by "sensor"
#define MINI_SENSOR_PTR(sensor,ptr) [sensor] = ptr
@@ -391,7 +390,6 @@ const sensor_ptr_t G_amec_sensor_list[] =
CORE_SENSOR_PTRS( TEMPPROCTHRMC , &g_amec_sys.proc[0].core, tempprocthermal),
CORE_SENSOR_PTRS( UTILC , &g_amec_sys.proc[0].core, util),
CORE_SENSOR_PTRS( NUTILC , &g_amec_sys.proc[0].core, nutil3s),
- CORE_SENSOR_PTRS( MSTLC , &g_amec_sys.proc[0].core, mstl2ms),
CORE_SENSOR_PTRS( TEMPC, &g_amec_sys.proc[0].core, tempc),
CORE_SENSOR_PTRS( STOPDEEPREQC, &g_amec_sys.proc[0].core, stopdeepreqc),
CORE_SENSOR_PTRS( STOPDEEPACTC, &g_amec_sys.proc[0].core, stopdeepactc),
@@ -400,8 +398,10 @@ const sensor_ptr_t G_amec_sensor_list[] =
// ------------------------------------------------------
// Memory Sensors
// ------------------------------------------------------
- MEMCONTROL_SENSOR_PTRS(MRDM, &g_amec_sys.proc[0].memctl, mrd2ms),
- MEMCONTROL_SENSOR_PTRS(MWRM, &g_amec_sys.proc[0].memctl, mwr2ms),
+ MEMCONTROL_SENSOR_PTRS(MRDM, &g_amec_sys.proc[0].memctl, mrd),
+ MEMCONTROL_SENSOR_PTRS(MWRM, &g_amec_sys.proc[0].memctl, mwr),
+ MEMCONTROL_SENSOR_PTRS(MEMSPM, &g_amec_sys.proc[0].memctl, memsp),
+ MEMCONTROL_SENSOR_PTRS(MEMSPSTATM, &g_amec_sys.proc[0].memctl, memspstat),
MEMCONTROL_SENSOR_PTRS(MIRCM, &g_amec_sys.proc[0].memctl, centaur.mirc2ms),
MEMCONTROL_SENSOR_PTRS(MLP2M, &g_amec_sys.proc[0].memctl, centaur.mlp2ms),
DIMM_SENSOR_PTRS(TEMPDIMM, &g_amec_sys.proc[0], tempdimm),
@@ -572,7 +572,6 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION =
CORE_MINI_SENSOR_PTRS_NULL( TEMPPROCTHRMC ),
CORE_MINI_SENSOR_PTRS( UTILC, &G_dcom_slv_outbox_tx.utilcy ),
CORE_MINI_SENSOR_PTRS( NUTILC, &G_dcom_slv_outbox_tx.nutil3sp0cy ),
- CORE_MINI_SENSOR_PTRS_NULL( MSTLC ),
CORE_MINI_SENSOR_PTRS_NULL( TEMPC ),
CORE_MINI_SENSOR_PTRS_NULL( STOPDEEPREQC ),
CORE_MINI_SENSOR_PTRS_NULL( STOPDEEPACTC ),
@@ -582,8 +581,10 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION =
// Memory Sensors
// ------------------------------------------------------
- MEMCONTROL_MINI_SENSOR_PTRS(MRDM, &G_dcom_slv_outbox_tx.mrd2msp0mx), //
- MEMCONTROL_MINI_SENSOR_PTRS(MWRM, &G_dcom_slv_outbox_tx.mwr2msp0mx), //
+ MEMCONTROL_MINI_SENSOR_PTRS(MRDM, &G_dcom_slv_outbox_tx.mrd),
+ MEMCONTROL_MINI_SENSOR_PTRS(MWRM, &G_dcom_slv_outbox_tx.mwr),
+ MEMCONTROL_MINI_SENSOR_PTRS_NULL(MEMSPM),
+ MEMCONTROL_MINI_SENSOR_PTRS_NULL(MEMSPSTATM),
MEMCONTROL_MINI_SENSOR_PTRS_NULL(MIRCM),
MEMCONTROL_MINI_SENSOR_PTRS_NULL(MLP2M),
OpenPOWER on IntegriCloud