summaryrefslogtreecommitdiffstats
path: root/src/occ_405/sensor
diff options
context:
space:
mode:
authorDoug Gilbert <dgilbert@us.ibm.com>2017-08-30 11:49:34 -0500
committerMartha Broyles <mbroyles@us.ibm.com>2017-09-21 09:58:02 -0400
commit2fe9ab3dcaa6a7208cb5f92619dbc0f5fd83201f (patch)
tree9aacf8882747f683c77eca2da0fc07525a4034c4 /src/occ_405/sensor
parentf92b6d26c9d2f3d1fe0e25de3768ce972d7051d1 (diff)
downloadtalos-occ-2fe9ab3dcaa6a7208cb5f92619dbc0f5fd83201f.tar.gz
talos-occ-2fe9ab3dcaa6a7208cb5f92619dbc0f5fd83201f.zip
Add Droop counter sensors
Change-Id: If4c367eaeaaf746619d537d4d8424cf018591563 RTC: 155684 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45574 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>
Diffstat (limited to 'src/occ_405/sensor')
-rwxr-xr-xsrc/occ_405/sensor/sensor_enum.h31
-rwxr-xr-xsrc/occ_405/sensor/sensor_info.c2
-rw-r--r--src/occ_405/sensor/sensor_main_memory.c13
-rwxr-xr-xsrc/occ_405/sensor/sensor_table.c6
4 files changed, 51 insertions, 1 deletions
diff --git a/src/occ_405/sensor/sensor_enum.h b/src/occ_405/sensor/sensor_enum.h
index 62745d3..f3fe743 100755
--- a/src/occ_405/sensor/sensor_enum.h
+++ b/src/occ_405/sensor/sensor_enum.h
@@ -130,6 +130,12 @@ enum e_gsid
TEMPQ3,
TEMPQ4,
TEMPQ5,
+ VOLTDROOPCNTQ0,
+ VOLTDROOPCNTQ1,
+ VOLTDROOPCNTQ2,
+ VOLTDROOPCNTQ3,
+ VOLTDROOPCNTQ4,
+ VOLTDROOPCNTQ5,
// ------------------------------------------------------
// Regulator Sensors
@@ -444,6 +450,31 @@ enum e_gsid
STOPDEEPACTC22,
STOPDEEPACTC23,
+ VOLTDROOPCNTC0,
+ VOLTDROOPCNTC1,
+ VOLTDROOPCNTC2,
+ VOLTDROOPCNTC3,
+ VOLTDROOPCNTC4,
+ VOLTDROOPCNTC5,
+ VOLTDROOPCNTC6,
+ VOLTDROOPCNTC7,
+ VOLTDROOPCNTC8,
+ VOLTDROOPCNTC9,
+ VOLTDROOPCNTC10,
+ VOLTDROOPCNTC11,
+ VOLTDROOPCNTC12,
+ VOLTDROOPCNTC13,
+ VOLTDROOPCNTC14,
+ VOLTDROOPCNTC15,
+ VOLTDROOPCNTC16,
+ VOLTDROOPCNTC17,
+ VOLTDROOPCNTC18,
+ VOLTDROOPCNTC19,
+ VOLTDROOPCNTC20,
+ VOLTDROOPCNTC21,
+ VOLTDROOPCNTC22,
+ VOLTDROOPCNTC23,
+
// ------------------------------------------------------
// Memory Sensors
// ------------------------------------------------------
diff --git a/src/occ_405/sensor/sensor_info.c b/src/occ_405/sensor/sensor_info.c
index 0592908..8602f5c 100755
--- a/src/occ_405/sensor/sensor_info.c
+++ b/src/occ_405/sensor/sensor_info.c
@@ -328,6 +328,7 @@ const sensor_info_t G_sensor_info[] =
SENSOR_INFO_T_ENTRY( PROCOTTHROT, "#\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_64TH_TICK_HZ, AMEFP( 1, 0) ),
SENS_QUAD_ENTRY_SET( TEMPQ, "C\0", AMEC_SENSOR_TYPE_TEMP, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ),
+ SENS_QUAD_ENTRY_SET( VOLTDROOPCNTQ, "#\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_PROC, AMEC_SENSOR_NONUM, AMEEFP_EVERY_16TH_TICK_HZ, AMEFP( 1, 0) ),
/* ==ReguSensors== NameString Units Type Location Number Freq ScaleFactor */
SENSOR_INFO_T_ENTRY( VOLTVDD, "mV\0", AMEC_SENSOR_TYPE_VOLTAGE, AMEC_SENSOR_LOC_VRM, AMEC_SENSOR_NONUM, AMEEFP_EVERY_2ND_TICK_HZ, AMEFP( 1, -1) ),
@@ -349,6 +350,7 @@ const sensor_info_t G_sensor_info[] =
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) ),
diff --git a/src/occ_405/sensor/sensor_main_memory.c b/src/occ_405/sensor/sensor_main_memory.c
index 70fb8a5..2cc4952 100644
--- a/src/occ_405/sensor/sensor_main_memory.c
+++ b/src/occ_405/sensor/sensor_main_memory.c
@@ -102,6 +102,17 @@ typedef struct __attribute__ ((packed))
MAIN_MEM_SENSOR(gsid_prefix##23 , smf_mode, master_only)
/**
+ * Macro to build main_mem_sensor_t instance for all quads
+ */
+#define MAIN_MEM_QUAD_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)
+
+/**
* Macro to build main_mem_sensor_t instances for all memory DIMMs.
*/
#define MAIN_MEM_DIMM_SENSORS(gsid_prefix, smf_mode, master_only) \
@@ -168,6 +179,8 @@ main_mem_sensor_t G_main_mem_sensors[] =
MAIN_MEM_SENSOR (VOLTVDDSENSE, true, false),
MAIN_MEM_SENSOR (VOLTVDN, true, false),
MAIN_MEM_SENSOR (VOLTVDNSENSE, true, false),
+ MAIN_MEM_CORE_SENSORS (VOLTDROOPCNTC, true, false),
+ MAIN_MEM_QUAD_SENSORS (VOLTDROOPCNTQ, true, false),
// AMEC_SENSOR_TYPE_TEMP: gsid smf_mode master_only
MAIN_MEM_SENSOR (TEMPNEST, false, false),
diff --git a/src/occ_405/sensor/sensor_table.c b/src/occ_405/sensor/sensor_table.c
index b4128a3..c2dabdb 100755
--- a/src/occ_405/sensor/sensor_table.c
+++ b/src/occ_405/sensor/sensor_table.c
@@ -366,7 +366,8 @@ const sensor_ptr_t G_amec_sensor_list[] =
// ------------------------------------------------------
// Quad Sensors (6 each)
// ------------------------------------------------------
- QUAD_SENSOR_PTRS( TEMPQ, &g_amec_sys.proc[0].quad, tempq),
+ QUAD_SENSOR_PTRS( TEMPQ, &g_amec_sys.proc[0].quad, tempq),
+ QUAD_SENSOR_PTRS( VOLTDROOPCNTQ, &g_amec_sys.proc[0].quad, voltdroopcntq),
// ------------------------------------------------------
// Regulator Sensors
@@ -393,6 +394,7 @@ const sensor_ptr_t G_amec_sensor_list[] =
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),
+ CORE_SENSOR_PTRS( VOLTDROOPCNTC, &g_amec_sys.proc[0].core, voltdroopcntc),
// ------------------------------------------------------
// Memory Sensors
@@ -546,6 +548,7 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION =
// Quad Sensors (6 each)
// ------------------------------------------------------
QUAD_MINI_SENSOR_PTRS_NULL( TEMPQ ),
+ QUAD_MINI_SENSOR_PTRS_NULL( VOLTDROOPCNTQ),
// ------------------------------------------------------
// Regulator Sensors
@@ -571,6 +574,7 @@ const minisensor_ptr_t G_amec_mini_sensor_list[] INIT_SECTION =
CORE_MINI_SENSOR_PTRS_NULL( TEMPC ),
CORE_MINI_SENSOR_PTRS_NULL( STOPDEEPREQC ),
CORE_MINI_SENSOR_PTRS_NULL( STOPDEEPACTC ),
+ CORE_MINI_SENSOR_PTRS_NULL( VOLTDROOPCNTC),
// ------------------------------------------------------
// Memory Sensors
OpenPOWER on IntegriCloud