summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Broyles <sbroyles@us.ibm.com>2015-03-27 10:54:58 -0500
committerStephan Broyles <sbroyles@us.ibm.com>2015-04-13 11:45:58 -0500
commitc967f548e6b8b27089fe8b8df5962a86a84c68df (patch)
tree63ad7db084a36876d7c14742c3ed9309d9649de4
parent5bda764a3660b3fc6f3f16f43f05207ac5abdf08 (diff)
downloadtalos-occ-c967f548e6b8b27089fe8b8df5962a86a84c68df.tar.gz
talos-occ-c967f548e6b8b27089fe8b8df5962a86a84c68df.zip
Group 45 update from Malcolm
Change-Id: I9f3741f48c022a9751ddf63370e61c65a35f8320 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16692 Reviewed-by: Stephan Broyles <sbroyles@us.ibm.com> Tested-by: Stephan Broyles <sbroyles@us.ibm.com>
-rwxr-xr-xsrc/occ/amec/amec_amester.c79
-rw-r--r--src/occ/amec/amec_amester.h36
-rwxr-xr-xsrc/occ/amec/amec_analytics.c189
-rw-r--r--src/occ/amec/amec_init.c30
-rwxr-xr-xsrc/occ/amec/amec_pcap.c4
-rwxr-xr-xsrc/occ/amec/amec_sensors_core.c45
-rwxr-xr-xsrc/occ/amec/amec_sensors_power.c68
-rwxr-xr-xsrc/occ/amec/amec_sensors_power.h8
-rwxr-xr-xsrc/occ/amec/amec_slave_smh.c4
-rwxr-xr-xsrc/occ/amec/amec_sys.h6
-rwxr-xr-xsrc/occ/sensor/sensor_info.c6
11 files changed, 310 insertions, 165 deletions
diff --git a/src/occ/amec/amec_amester.c b/src/occ/amec/amec_amester.c
index 6cbeaf6..ac6cbd8 100755
--- a/src/occ/amec/amec_amester.c
+++ b/src/occ/amec/amec_amester.c
@@ -5,10 +5,10 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
-/* [+] Google Inc. */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
+/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
@@ -661,7 +661,7 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg,
uint16_t i,j,cc,idx,temp16;
uint16_t k;
uint32_t temp32a;
-
+ uint32_t *temp32;
/*------------------------------------------------------------------------*/
/* Code */
/*------------------------------------------------------------------------*/
@@ -703,6 +703,38 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg,
case 0x07: // Write individual AME parameters
switch (i_msg->au8CmdData_ptr[1])
{
+
+ case 20: // parameter 20: Set Probe Parameters
+ {
+ if (i_msg->au8CmdData_ptr[2]> (NUM_AMEC_FW_PROBES-1))
+ {
+ o_resp[0]=i_msg->au8CmdData_ptr[2];
+ *io_resp_length=1;
+ l_rc=COMPCODE_PARAM_OUT_OF_RANGE;
+ break;
+ }
+ if (i_msg->au8CmdData_ptr[3] < 1)
+ {
+ o_resp[0]=i_msg->au8CmdData_ptr[2];
+ *io_resp_length=1;
+ l_rc=COMPCODE_PARAM_OUT_OF_RANGE;
+ break;
+ }
+
+ temp32a=((uint32_t)i_msg->au8CmdData_ptr[4]<<24)+((uint32_t)i_msg->au8CmdData_ptr[5]<<16);
+ temp32a=temp32a+((uint32_t)i_msg->au8CmdData_ptr[6]<<8)+((uint32_t)i_msg->au8CmdData_ptr[7]);
+ temp32=(uint32_t*)temp32a;
+
+ g_amec->ptr_probe250us[i_msg->au8CmdData_ptr[2]]=temp32;
+ g_amec->size_probe250us[i_msg->au8CmdData_ptr[2]]=i_msg->au8CmdData_ptr[3];
+ g_amec->index_probe250us[i_msg->au8CmdData_ptr[2]]=0; // Reset index
+
+ o_resp[0]=i_msg->au8CmdData_ptr[2]; // Return probe #
+ *io_resp_length=1;
+ l_rc = COMPCODE_NORMAL;
+ break;
+ };
+
case 22: // parameter 22: Analytics parameters
{
g_amec->analytics_group=i_msg->au8CmdData_ptr[2]; // Set group
@@ -746,6 +778,7 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg,
break;
}
+
case 29: // parameter 29: Control vector recording modes and stream rates.
{
g_amec->stream_vector_rate=255; // First step is to set an invalid rate so no recording done at all
@@ -757,15 +790,15 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg,
switch (g_amec->stream_vector_group)
{
- case 44: //group 44 decimal (amec_analytics support)
+ case 45: //group 45 decimal (amec_analytics support)
g_amec->stream_vector_map[0]=0; // Leave space for 250usec time stamp
k = 1;
- for (i=0; i<=46; i++)
+ for (i=0; i<=(STREAM_VECTOR_SIZE_EX-2); i++)
{
g_amec->stream_vector_map[k++] = &g_amec->analytics_array[i];
}
- //gpEMP->stream_vector_map[48]=(void *) 0xffffffff; // Termination of partial vector
- g_amec->analytics_group=44;
+ //gpEMP->stream_vector_map[64]=(void *) 0xffffffff; // Termination of partial vector
+ g_amec->analytics_group=45;
g_amec->analytics_bad_output_count=2; // drop first 2 frames of output
break;
@@ -810,6 +843,28 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg,
l_rc = COMPCODE_NORMAL;
break;
+ case 20: // parameter 20: Read Probe Parameters
+ {
+ if (i_msg->au8CmdData_ptr[2]> (NUM_AMEC_FW_PROBES-1))
+ {
+ o_resp[0]=i_msg->au8CmdData_ptr[2];
+ *io_resp_length=1;
+ l_rc=COMPCODE_PARAM_OUT_OF_RANGE;
+ break;
+ }
+ o_resp[1]=g_amec->size_probe250us[i_msg->au8CmdData_ptr[2]]; // Return size of object read by probe in bytes
+ temp32=g_amec->ptr_probe250us[i_msg->au8CmdData_ptr[2]]; // Get copy of 32 bit probe ptr
+ temp32a=(uint32_t)temp32;
+ o_resp[5]=(uint8_t)temp32a;
+ o_resp[4]=(uint8_t)((uint32_t)temp32a>>8);
+ o_resp[3]=(uint8_t)((uint32_t)temp32a>>16);
+ o_resp[2]=(uint8_t)((uint32_t)temp32a>>24);
+ o_resp[0]=i_msg->au8CmdData_ptr[2]; // Return probe #
+ *io_resp_length=6;
+ l_rc=COMPCODE_NORMAL;
+ break;
+ };
+
case 22: // parameter 22: Analytics parameters
o_resp[0]=g_amec->analytics_group;
o_resp[1]=g_amec->analytics_chip;
@@ -847,7 +902,7 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg,
g_amec->read_stream_index=(uint32_t)((i_msg->au8CmdData_ptr[2]<<8)+i_msg->au8CmdData_ptr[3]);
temp1=i_msg->au8CmdData_ptr[4];
temp2=i_msg->au8CmdData_ptr[5];
- if (g_amec->read_stream_index > (STREAM_BUFFER_SIZE-10*STREAM_VECTOR_SIZE_EX))
+ if (g_amec->read_stream_index > (STREAM_BUFFER_SIZE-1*STREAM_VECTOR_SIZE_EX))
{
o_resp[0]=i_msg->au8CmdData_ptr[2];
*io_resp_length=1;
@@ -876,7 +931,7 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg,
{
temp32a=STREAM_BUFFER_SIZE+g_amec->write_stream_index-g_amec->read_stream_index;
}
- if (temp32a < 10*STREAM_VECTOR_SIZE_EX)
+ if (temp32a < 1*STREAM_VECTOR_SIZE_EX)
{
o_resp[0]=1; // Indicate insufficient data, but return a zero return code
*io_resp_length=STREAM_VECTOR_SIZE_EX+3; // # of bytes (STREAM_VECTOR_SIZE is in 16 bit words)
@@ -885,7 +940,7 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg,
}
o_resp[0]=0; // Indicate sufficient data
i=0;
- j=10*STREAM_VECTOR_SIZE_EX;
+ j=1*STREAM_VECTOR_SIZE_EX; // used to be 10*STREAM_VECTOR_SIZE_EX
cc=3; // Begin just past return code and time stamp
for(idx = i; idx < j; idx++) // Skip first 1 entry: either write_index and time stamp
@@ -904,11 +959,11 @@ uint8_t amester_manual_throttle( const IPMIMsg_t * i_msg,
}
o_resp[1] = (uint8_t)(temp16 >> 8);
o_resp[2] = (uint8_t)(temp16 & 0xff);
- *io_resp_length = 3 + 2 * (10 * STREAM_VECTOR_SIZE_EX); // # of bytes (STREAM_VECTOR_SIZE_EX is in 16 bit words)
+ *io_resp_length = 3 + 2 * (1 * STREAM_VECTOR_SIZE_EX); // # of bytes (STREAM_VECTOR_SIZE_EX is in 16 bit words)
l_rc = COMPCODE_NORMAL;
break;
- case 64: // support for THREADMODE group 44 recording
+ case 64: // support for THREADMODE group 45 recording
o_resp[0]=(uint8_t)(g_amec->analytics_threadmode);
o_resp[1]=(uint8_t)(g_amec->analytics_threadcountmax);
*io_resp_length=2;
diff --git a/src/occ/amec/amec_amester.h b/src/occ/amec/amec_amester.h
index fe36d4b..8a3510f 100644
--- a/src/occ/amec/amec_amester.h
+++ b/src/occ/amec/amec_amester.h
@@ -5,10 +5,10 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
-/* [+] Google Inc. */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
+/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
@@ -70,19 +70,19 @@
//Habanero uses IPMI, which is constrained to 256 Byte IPMI response.
//This will slow down the Amester connection on FSP-based systems
-#define IPMI_MAX_MSG_SIZE 246
+#define IPMI_MAX_MSG_SIZE 246 // BMC size
#define AMEC_AME_CMD_HEADER_SZ 2
// Autonomic Management of Energy (AME) Parameters
#define AME_API_MAJ 2 // API version major
#define AME_API_MIN 26 // API version minor
-#define AME_VERSION_MAJ 6 // Major Version (e.g. Ver. 1.4 has MAJ=1)
-#define AME_VERSION_MIN 83 // Minor Version (e.g. Ver. 1.4 has MIN=4)
+#define AME_VERSION_MAJ 7 // Major Version (e.g. Ver. 1.4 has MAJ=1)
+#define AME_VERSION_MIN 27 // Minor Version (e.g. Ver. 1.4 has MIN=4)
#define AME_YEAR 2015 // Year of Release (e.g. 2006)
-#define AME_MONTH 2 // Month of Release (e.g. September=9)
-#define AME_DAY 10 // Day of Release
+#define AME_MONTH 4 // Month of Release (e.g. September=9)
+#define AME_DAY 2 // Day of Release
#define AME_SDRS 22 // AME Sensor Data Record Size: 18 bytes
@@ -100,15 +100,15 @@
#define AME_COMPONENT_LEVEL_RSPCMD_LEN 11
// Histogram copy interval in milliseconds (default to 8 seconds)
-#define AME_HISTOGRAM_COPY_INTERVAL 8000
+#define AME_HISTOGRAM_COPY_INTERVAL 8000
// WARNING -> STREAM_BUFFER_SIZE must be a perfect multiple of the vector size.
#define STREAM_VECTOR_SIZE 32 // # of 16 bit elements in a stream vector-> must be a power of 2
#define SHIFT_VECTOR_SIZE 5 // Log base 2 of STREAM_VECTOR_SIZE for shifting
#define INJECTION_BUFFER_SIZE 32 // Size of injection buffer (must be a power of 2)
-#define STREAM_VECTOR_SIZE_EX 48 // # of 16 bit elements in a stream vector
-#define STREAM_BUFFER_SIZE (8*10*STREAM_VECTOR_SIZE_EX) // Stream buffer size in 16 bit samples for recording real time data to stream to Amester
-#define MAX_SENSORS_ANALYTICS 76 //Maximum sensors making up the analytics group 44
+#define STREAM_VECTOR_SIZE_EX 74 // # of 16 bit elements in a stream vector
+#define STREAM_BUFFER_SIZE (40*1*STREAM_VECTOR_SIZE_EX) // Stream buffer size in 16 bit samples for recording real time data to stream to Amester
+#define MAX_SENSORS_ANALYTICS 134 // Maximum sensors making up the analytics group 45 (includes all Centaur data & L4 data & supports 12 cores)
#define MSA MAX_SENSORS_ANALYTICS
#define OCA_MAX_ENTRIES 0 // no POWER7 OCA on POWER8
@@ -299,29 +299,29 @@ uint8_t amester_entry_point( const IPMIMsg_t * i_msg,
uint16_t * o_resp_length,
uint8_t * o_resp);
-// Write sensor data to trace record
+// Write sensor data to trace record
// Called periodically to write next trace record with sensor data.
void amec_tb_record(const AMEC_TB_GUID i_guid);
-// Get global information on traces (names, frequencies)
+// Get global information on traces (names, frequencies)
// Get a list of all available trace buffers in OCC and their frequencies.
void amec_tb_cmd_info(const IPMIMsg_t * i_psMsg, UINT8 *o_pu8Resp,UINT16 *o_pu16RespLength,UINT8 *o_retval);
-// Set the configuration of a trace (which sensors to trace)
+// Set the configuration of a trace (which sensors to trace)
// Choose which sensors and SCOMs to trace. Choose size of trace buffer memory.
void amec_tb_cmd_set_config(const IPMIMsg_t *i_psMsg, UINT8 *o_pu8Resp,UINT16 *o_pu16RespLength,UINT8 *o_retval);
-// Begin recording all configured traces
+// Begin recording all configured traces
void amec_tb_cmd_start_recording(const IPMIMsg_t *i_psMsg,UINT8 *o_pu8Resp,UINT16 *o_pu16RespLength,UINT8 *o_retval);
-// Stop recording all traces
+// Stop recording all traces
void amec_tb_cmd_stop_recording(const IPMIMsg_t *i_psMsg,UINT8 *o_pu8Resp,UINT16 *o_pu16RespLength,UINT8 *o_retval);
-// Get bytes from trace buffer memory
+// Get bytes from trace buffer memory
// Returns a maximum size packet starting at a given index
void amec_tb_cmd_read(const IPMIMsg_t *i_psMsg,UINT8 *o_pu8Resp,UINT16 *o_pu16RespLength,UINT8 *o_retval);
-// Returns configuration of a trace
+// Returns configuration of a trace
void amec_tb_cmd_get_config(const IPMIMsg_t *i_psMsg,UINT8 *o_pu8Resp,UINT16 *o_pu16RespLength,UINT8 *o_retval);
#endif
diff --git a/src/occ/amec/amec_analytics.c b/src/occ/amec/amec_analytics.c
index 77f6582..8b65f6d 100755
--- a/src/occ/amec/amec_analytics.c
+++ b/src/occ/amec/amec_analytics.c
@@ -5,10 +5,10 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
-/* [+] Google Inc. */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
+/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
@@ -23,6 +23,7 @@
/* */
/* IBM_PROLOG_END_TAG */
+
//*************************************************************************
// Includes
//*************************************************************************
@@ -50,6 +51,7 @@
//*************************************************************************
// Globals
//*************************************************************************
+extern uint8_t G_occ_interrupt_type;
//*************************************************************************
// Function Prototypes
@@ -178,7 +180,7 @@ void amec_analytics_main(void)
switch (g_amec->analytics_group)
{
- case 44: // Group 44
+ case 45: // Group 45
// Every 2msec (250usec * 2^stream_rate, default stream_rate=3), perform averaging of sensors.
// Averaging is required because many sensors are updated every
@@ -248,44 +250,67 @@ void amec_analytics_main(void)
tempaccum/100;
g_amec->g44_avg[(i*MSA)+15] = g_amec->g44_avg[(i*MSA)+15] +
(UINT32)g_amec->proc[i].temp2ms.sample; // hottest processor core temperature (average??)
- g_amec->g44_avg[(i*MSA)+16] = g_amec->g44_avg[(i*MSA)+16] +
- (UINT32)(g_amec->proc[i].memctl[4].mrd2ms.sample/78); // memory read bandwidth
- g_amec->g44_avg[(i*MSA)+17] = g_amec->g44_avg[(i*MSA)+17] +
- (UINT32)(g_amec->proc[i].memctl[4].mwr2ms.sample/78); // memory write bandwidth
- g_amec->g44_avg[(i*MSA)+18] = g_amec->g44_avg[(i*MSA)+18] +
- (UINT32)(g_amec->proc[i].memctl[5].mrd2ms.sample/78); // memory read bandwidth
- g_amec->g44_avg[(i*MSA)+19] = g_amec->g44_avg[(i*MSA)+19] +
- (UINT32)(g_amec->proc[i].memctl[5].mwr2ms.sample/78); // memory write bandwidth
-
- g_amec->g44_avg[(i*MSA)+20] = g_amec->g44_avg[(i*MSA)+20] |
- (UINT32)g_amec->proc[i].winkcnt2ms.sample; // winkle bitmap for all cores (OR of all 2msec)
- g_amec->g44_avg[(i*MSA)+21] = g_amec->g44_avg[(i*MSA)+21] |
- (UINT32)g_amec->proc[i].sleepcnt2ms.sample; // sleep bitmap for all cores (OR of all 2msec)
-
- g_amec->g44_avg[(i*MSA)+22] = g_amec->g44_avg[(i*MSA)+22] +
- (UINT32)(g_amec->proc[i].memctl[6].mrd2ms.sample/78); // memory read bandwidth
- g_amec->g44_avg[(i*MSA)+23] = g_amec->g44_avg[(i*MSA)+23] +
- (UINT32)(g_amec->proc[i].memctl[6].mwr2ms.sample/78); // memory write bandwidth
- g_amec->g44_avg[(i*MSA)+24] = g_amec->g44_avg[(i*MSA)+24] +
- (UINT32)(g_amec->proc[i].memctl[7].mrd2ms.sample/78); // memory read bandwidth
- g_amec->g44_avg[(i*MSA)+25] = g_amec->g44_avg[(i*MSA)+25] +
- (UINT32)(g_amec->proc[i].memctl[7].mwr2ms.sample/78); // memory write bandwidth
+
+// major changes below to accommodate Group 45
+
+ l=16; // l = index offset
+ for (j=0; j<8; j++) // Group 45 supports all 8 Centaurs per OCC
+ {
+ g_amec->g44_avg[(i*MSA)+l] = g_amec->g44_avg[(i*MSA)+l] +
+ (UINT32)(g_amec->proc[i].memctl[j].mrd2ms.sample/78); // memory read bandwidth
+ l=l+1;
+ }
+ for (j=0; j<8; j++) // Group 45 supports all 8 Centaurs per OCC
+ {
+ g_amec->g44_avg[(i*MSA)+l] = g_amec->g44_avg[(i*MSA)+l] +
+ (UINT32)(g_amec->proc[i].memctl[j].mwr2ms.sample/78); // memory write bandwidth
+ l=l+1;
+ }
+
+ for (j=0; j<8; j++) // Group 45 supports all 8 L4 caches per OCC
+ {
+ temp16 = g_amec->proc[i].memctl[j].centaur.portpair[0].perf.l4rd2ms;
+ temp16 = temp16 + g_amec->proc[i].memctl[j].centaur.portpair[1].perf.l4rd2ms;
+ g_amec->g44_avg[(i*MSA)+l] = g_amec->g44_avg[(i*MSA)+l] +
+ (UINT32)(temp16/156); // L4 read bandwidth (/156 because two portpairs added together)
+ l=l+1;
+ }
+
+ for (j=0; j<8; j++) // Group 45 supports all 8 L4 caches per OCC
+ {
+ temp16 = g_amec->proc[i].memctl[j].centaur.portpair[0].perf.l4wr2ms;
+ temp16 = temp16 + g_amec->proc[i].memctl[j].centaur.portpair[1].perf.l4wr2ms;
+ g_amec->g44_avg[(i*MSA)+l] = g_amec->g44_avg[(i*MSA)+l] +
+ (UINT32)(temp16/156); // L4 write bandwidth (/156 because two portpairs added together)
+ l=l+1;
+ }
+
+ g_amec->g44_avg[(i*MSA)+48] = g_amec->g44_avg[(i*MSA)+48] +
+ (UINT32)(g_amec->proc[i].winkcnt2ms.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].sleepcnt2ms.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++) // WARNING: Only 8 cores are allowed to be configured per OCC chip
+ for (j=0; j<12; j++) // Group 45 supports up to 12 cores to be configured per OCC chip
{
if (CORE_PRESENT(j))
{
- //average frequency for this core
- g_amec->g44_avg[(i*MSA)+30+m] = g_amec->g44_avg[(i*MSA)+30+m] +
- (UINT32)g_amec->proc[i].core[j].freqa2ms.sample/28;
+ //average frequency for this core (apply rounding for frequency for maximum 8 bit resolution): 20MHz resolution (Power8 is actually 33.25MHz steps)
+ temp32 = (UINT32)g_amec->proc[i].core[j].freqa2ms.sample/10; // 10MHz resolution
+ temp16 = (UINT16)temp32;
+ temp32 = temp32 >>1; // convert to 20MHz resolution
+ if (temp16 & 1) temp32 = temp32+1; // if LSBit of 10MHz resolution value is a 1, then round the 20MHz resolution value up by 1
+
+ g_amec->g44_avg[(i*MSA)+50+m] = g_amec->g44_avg[(i*MSA)+50+m] + temp32;
+
m++; // increment configured core counter
- if (m > 7) j=12; // safeguard in case more than 8 configured cores.
+ if (m > 11) j=12; // safeguard in case more than 12 configured cores.
}
}
m=0; // counter for actual configured # of cores - 1.
- for (j=0; j<12; j++) // WARNING: Only 8 cores are allowed to be configured per OCC chip
+ for (j=0; j<12; j++) // Group 45 supports up to 12 cores to be configured per OCC chip
{
if (CORE_PRESENT(j))
{
@@ -307,7 +332,7 @@ void amec_analytics_main(void)
temp16 = temp16 + 1;
}
}
- g_amec->g44_avg[(i*MSA)+38+m] = g_amec->g44_avg[(i*MSA)+38+m] +
+ g_amec->g44_avg[(i*MSA)+62+m] = g_amec->g44_avg[(i*MSA)+62+m] +
(UINT32)(g_amec->proc[i].core[j].util2ms.sample/50); // accumulate util sensor that feeds IPS and DPS algorithms for this core
if (g_amec->analytics_threadmode == 2)
@@ -326,34 +351,22 @@ void amec_analytics_main(void)
// accumulate average finish latency counter for this core
temp16 = ((g_amec->proc[i].core[j].mcpifi2ms.sample) >>1);
}
- if (g_amec->analytics_threadmode == 4)
- {
- if ((m&1) == 0) // Capture L4 read traffic
- {
- temp16 = g_amec->proc[0].memctl[(m/2)+4].centaur.portpair[0].perf.l4rd2ms;
- temp16 = temp16 + g_amec->proc[0].memctl[(m/2)+4].centaur.portpair[1].perf.l4rd2ms;
- temp16 = temp16 >> 1;
- }
- else
- {
- temp16 = g_amec->proc[0].memctl[(m/2)+4].centaur.portpair[0].perf.l4wr2ms;
- temp16 = temp16 + g_amec->proc[0].memctl[(m/2)+4].centaur.portpair[1].perf.l4wr2ms;
- temp16 = temp16 >> 1;
- }
- }
- g_amec->g44_avg[(i * MSA) + 46 + m] = g_amec->g44_avg[(i * MSA) + 46 + m] +
- (UINT32)(temp16 / 50); // accumulate average utilization or individual threads for this core or finish latency counter or L4 read/write counters
- g_amec->g44_avg[(i * MSA) + 54 + m] = g_amec->g44_avg[(i * MSA) + 54 + m] +
+ temp32 = (UINT32)(temp16/25); // 0.25% utilization resolution
+ temp32 = temp32 >>1; // convert to 0.5% utilization resolution
+ if (temp16 & 1) temp32 = temp32+1; // if LSBit of 0.25% utilization resolution value is a 1, then round the 0.5% utilization resolution value up by 1
+ g_amec->g44_avg[(i * MSA) + 74 + m] = g_amec->g44_avg[(i * MSA) + 74 + m] +
+ (UINT32)(temp32); // accumulate average utilization or individual threads for this core or finish latency counter
+ g_amec->g44_avg[(i * MSA) + 86 + m] = g_amec->g44_avg[(i * MSA) + 86 + m] +
(UINT32)(g_amec->proc[i].core[j].ips2ms.sample / 50); // accumulate average MIPS for this core
- g_amec->g44_avg[(i * MSA) + 62 + m] = g_amec->g44_avg[(i * MSA) + 62 + m] +
+ g_amec->g44_avg[(i * MSA) + 98 + m] = g_amec->g44_avg[(i * MSA) + 98 + m] +
(UINT32)g_amec->proc[i].core[j].temp2ms.sample; // accumulate average temperature for this core
- g_amec->g44_avg[(i * MSA) + 70 + m] = g_amec->g44_avg[(i * MSA) + 70 + m] +
- (UINT32)((g_amec->proc[i].core[j].cmbw2ms.sample) / 78); // accumulate average memory bandwidth for this core
+ g_amec->g44_avg[(i * MSA) + 110 + m] = g_amec->g44_avg[(i * MSA) + 110 + m] +
+ (UINT32)((g_amec->proc[i].core[j].cmbw2ms.sample) / 156); // accumulate average memory bandwidth for this core //@mw713 /156, was /78 (overflow issues)
temp16 = ((g_amec->proc[i].core[j].mcpifd2ms.sample) / 100); // accumulate average busy latency counter for this core
- g_amec->g44_avg[(i * MSA) + 78 + m] = g_amec->g44_avg[(i * MSA) + 78 + m] + (UINT32)temp16;
+ g_amec->g44_avg[(i * MSA) + 122 + m] = g_amec->g44_avg[(i * MSA) + 122 + m] + (UINT32)temp16;
m++; // increment configured core counter
- if (m > 7) j = 12; // safeguard in case more than 8 configured cores.
+ if (m > 11) j = 12; // safeguard in case more than 12 configured cores.
}
} // End loop processing each core
} // End loop processing each chip
@@ -365,7 +378,7 @@ void amec_analytics_main(void)
// Have we completed this interval so that we can output?
if (temp16 == 0)
{
- // Now, update Group 44 analytics packed array
+ // Now, update Group 45 analytics packed array
switch (g_amec->analytics_thermal_offset)
{
case 0:
@@ -447,7 +460,8 @@ void amec_analytics_main(void)
tempaccum = g_amec->proc[0].pwr250usmem.accumulator - tempaccum; // total accumulation over 2msec
tempaccum = tempaccum >> g_amec->stream_vector_rate;
- g_amec->analytics_array[7] = (UINT16)tempaccum;
+ tempreg = ((UINT16)tempaccum) << 8; // upper byte
+ g_amec->analytics_array[7] = tempreg;
g_amec->analytics_array[8] = 0;
// Now begins the per processor unique data
@@ -484,7 +498,7 @@ void amec_analytics_main(void)
g_amec->analytics_array[11] = (UINT16)(g_amec->g44_avg[(j * MSA) + 11] >> k); // the first two averages are 16 bits
g_amec->g44_avg[(j * MSA) + 11] = 0; // reset average for this sensor to 0
- for (i = 12; i <= 15; i++)
+ for (i = 12; i <= 72; i++)
{
temp16 = (UINT16)(g_amec->g44_avg[(j * MSA) + l] >> k);
tempreg = temp16 << 8; // upper byte
@@ -497,64 +511,7 @@ void amec_analytics_main(void)
l = l + 2;
}
- // Now copy over sleep and nap sensors.
- // WARNING--> no division as these sensors are "OR"ed together
- // every 32msec: "OR" keeps deepest state reached
- temp16 = (UINT16)g_amec->g44_avg[(j * MSA) + l];
- tempreg = temp16 << 8; // upper byte
- temp16 = (UINT16)g_amec->g44_avg[(j * MSA) + l + 1];
- tempreg = tempreg | (0xff & temp16);
- g_amec->analytics_array[i] = tempreg;
- g_amec->g44_avg[(j * MSA) + l] = 0; // Reset all indicators of cores napping to begin next N intervals
- g_amec->g44_avg[(j * MSA) + l + 1] = 0; // Reset all indicators of cores sleeping to begin next N intervals
- i = i + 1;
- l = l + 2;
-
- // Now process CPM data...instead of computing the average, the
- // worst case (minimum) CPM value was maintained. Just copy it
- // over. Then reset each CPM to be 15 (maximum value) to start next
- // monitoring interval
- // for (i=17; i<=18; i++)
- // {
- // tempreg=(UINT16)g_amec->g44_avg[(j*MSA)+l]<<12; // hi nybble
- // tempreg=tempreg | ((0xf & ((UINT16)g_amec->g44_avg[(j*MSA)+l+1]))<<8); // mid-hi nybble
- // tempreg=tempreg | ((0xf & ((UINT16)g_amec->g44_avg[(j*MSA)+l+2]))<<4); // mid-lo nybble
- // tempreg=tempreg | ((0xf & ((UINT16)g_amec->g44_avg[(j*MSA)+l+3]))); // lo nybble
- // g_amec->analytics_array[i]=tempreg;
- // g_amec->g44_avg[(j*MSA)+l] = 15; // Reset all CPM indicators to 15
- // g_amec->g44_avg[(j*MSA)+l+1] = 15; // Reset all CPM indicators to 15
- // g_amec->g44_avg[(j*MSA)+l+2] = 15; // Reset all CPM indicators to 15
- // g_amec->g44_avg[(j*MSA)+l+3] = 15; // Reset all CPM indicators to 15
- // l=l+4;
- // }
-
- // process last 2 Centaurs' memory bandwidth sensors
- for (i = 17; i <= 18; i++)
- {
- temp16 = (UINT16)(g_amec->g44_avg[(j * MSA) + l] >> k);
- tempreg = temp16 << 8; // upper byte
- temp16 = (UINT16)(g_amec->g44_avg[(j * MSA) + l + 1] >> k);
- tempreg = tempreg | (0xff & temp16);
- g_amec->analytics_array[i] = tempreg;
- g_amec->g44_avg[(j * MSA) + l] = 0; // Reset average for this sensor to 0
- g_amec->g44_avg[(j * MSA) + l + 1] = 0; // Reset average for this sensor to 0
- l = l + 2;
- }
-
- for (i = 19; i <= 46; i++)
- {
- temp16 = (UINT16)(g_amec->g44_avg[(j * MSA) + l] >> k);
- tempreg = temp16 << 8; // upper byte
- temp16 = (UINT16)(g_amec->g44_avg[(j * MSA) + l + 1] >> k);
- tempreg = tempreg | (0xff & temp16);
- g_amec->analytics_array[i] = tempreg;
- g_amec->g44_avg[(j * MSA) + l] = 0; // Reset average for this sensor to 0
- g_amec->g44_avg[(j * MSA) + l + 1] = 0; // Reset average for this sensor to 0
-
- l = l + 2;
- }
-
- // Final processing for Group 44: determine if cycling through all
+ // Final processing for Group 45: determine if cycling through all
// chips or just monitoring one chip
if (g_amec->analytics_option == 0)
{
diff --git a/src/occ/amec/amec_init.c b/src/occ/amec/amec_init.c
index 87bec68..487c9ef 100644
--- a/src/occ/amec/amec_init.c
+++ b/src/occ/amec/amec_init.c
@@ -5,10 +5,10 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
-/* [+] Google Inc. */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
+/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
@@ -23,6 +23,7 @@
/* */
/* IBM_PROLOG_END_TAG */
+
//*************************************************************************
// Includes
//*************************************************************************
@@ -310,18 +311,39 @@ void amec_init_gamec_struct(void)
g_amec->stream_vector_rate=0xff; // Invalid setting: requires IPMI command to select initial rate
//Initialize analytics parameters
- g_amec->analytics_group=44; // Default to analytics Group 44
+ g_amec->analytics_group=45; // Default to analytics Group 45
g_amec->analytics_chip=0; // Default to which chip to perform analytics on
g_amec->analytics_bad_output_count=0; // Number of frames to discard before recording analytics output
g_amec->analytics_total_chips=MAX_NUM_CHIP_MODULES; // Default to do all chips in the system
g_amec->analytics_threadmode=1; // Default is average of all N threads (may be altered with IPMI command)
- g_amec->analytics_threadcountmax=4;// Default is 4 threads per core (may be altered with IPMI command)
+ g_amec->analytics_threadcountmax=8;// Default is 8 threads per core (may be altered with IPMI command)
g_amec->analytics_total_chips=4; // For Tuleta force to only 2 DCM sockets, 4 chips
g_amec->analytics_option=1; // =0 means cycle through all chips, =1 means only work with analytics_chip
g_amec->analytics_thermal_offset=0;// Reset offset to 0 for thermal output group
g_amec->analytics_slot=4; // Time slot associated with when the amec_analytics function is called (out of 8 slots)
// Set entire averaging buffer to zero
memset (&g_amec->g44_avg, 0, 4*(MAX_SENSORS_ANALYTICS*MAX_NUM_CHIP_MODULES));
+ for(l_idx=0; l_idx<NUM_AMEC_FW_PROBES; l_idx++)
+ {
+ g_amec->ptr_probe250us[l_idx] = &g_amec->sys.pwr250us.sample;
+ g_amec->size_probe250us[l_idx] = 2; // Size of object pointed to by probe is 2 bytes
+ 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;
+ g_amec->ptr_probe250us[1] = &g_amec->sys.pwr250us.sample;
+ g_amec->ptr_probe250us[2] = &g_amec->r_cnt;
+ g_amec->ptr_probe250us[2] = g_amec->ptr_probe250us[2]+2; // Point to low 16 bits of r_cnt
+ g_amec->ptr_probe250us[3] = &g_amec->r_cnt;
+// g_amec->ptr_probe250us[4] = &g_amec->testscom1;
+// g_amec->ptr_probe250us[5] = &g_amec->traffic_delay; // holds loop delay for holding up memory traffic
+// g_amec->ptr_probe250us[6] = &g_amec->testscom1;
+// g_amec->ptr_probe250us[6] = g_amec->ptr_probe250us[6]+2; // Point to low 16 bits of testscom1
+// g_amec->ptr_probe250us[7] = &g_amec->task_centaur_data_count;
+
}
// Function Specification
diff --git a/src/occ/amec/amec_pcap.c b/src/occ/amec/amec_pcap.c
index c559248..c742851 100755
--- a/src/occ/amec/amec_pcap.c
+++ b/src/occ/amec/amec_pcap.c
@@ -5,10 +5,10 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
-/* [+] Google Inc. */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
+/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
diff --git a/src/occ/amec/amec_sensors_core.c b/src/occ/amec/amec_sensors_core.c
index ad99984..bdea518 100755
--- a/src/occ/amec/amec_sensors_core.c
+++ b/src/occ/amec/amec_sensors_core.c
@@ -5,10 +5,10 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
-/* [+] Google Inc. */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
+/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
@@ -515,6 +515,12 @@ void amec_calc_freq_and_util_sensors(gpe_bulk_core_data_t * i_core_data_ptr, uin
// Calculate Utilization
temp32 = temp32 / temp32a;
+
+ // Update per thread value for this core
+ if(l_core_sleep_winkle)
+ {
+ temp32 = 0;
+ }
g_amec->proc[0].core[i_core].thread[i].util2ms_thread = (uint16_t) temp32;
}
@@ -568,6 +574,11 @@ void amec_calc_freq_and_util_sensors(gpe_bulk_core_data_t * i_core_data_ptr, uin
// Divide by two due to a bug in the hardware
temp32 = temp32/2;
+ // See if core is sleeping/winkled
+ if(l_core_sleep_winkle)
+ {
+ temp32 = 0;
+ }
// Update Sensor for this core
sensor_update( AMECSENSOR_ARRAY_PTR(CMBW2MSP0C0,i_core), (uint16_t) temp32);
@@ -579,6 +590,12 @@ void amec_calc_freq_and_util_sensors(gpe_bulk_core_data_t * i_core_data_ptr, uin
temp32 = temp32 - temp32a;
temp32 = temp32 >> 8;
+ // See if core is sleeping/winkled
+ if(l_core_sleep_winkle)
+ {
+ temp32 = 0;
+ }
+
// Update Sensor for this core
sensor_update( AMECSENSOR_ARRAY_PTR(NOTBZE2MSP0C0,i_core), (uint16_t) temp32);
@@ -587,6 +604,12 @@ void amec_calc_freq_and_util_sensors(gpe_bulk_core_data_t * i_core_data_ptr, uin
temp32 = temp32 - temp32a;
temp32 = temp32 >> 8;
+ // See if core is sleeping/winkled
+ if(l_core_sleep_winkle)
+ {
+ temp32 = 0;
+ }
+
// Update Sensor for this core
sensor_update( AMECSENSOR_ARRAY_PTR(NOTFIN2MSP0C0,i_core), (uint16_t) temp32);
@@ -688,6 +711,19 @@ void amec_calc_ips_sensors(gpe_bulk_core_data_t * i_core_data_ptr, uint8_t i_cor
INT32 disp2 = 0;
UINT32 temp32 = 0;
UINT32 ticks_2mhz = 0; // IPS sensor interval in 2mhz ticks
+ BOOLEAN l_core_sleep_winkle = FALSE;
+ uint32_t l_pm_state_hist_reg = 0;
+
+
+ // Read the high-order bytes of PM State History register for this core
+ l_pm_state_hist_reg = i_core_data_ptr->pcb_slave.pm_history.words.high_order;
+
+ // If core is in fast/deep sleep mode or fast/winkle mode, then set a flag
+ // indicating this
+ if(l_pm_state_hist_reg & OCC_PAST_CORE_CLK_STOP)
+ {
+ l_core_sleep_winkle = TRUE;
+ }
/*------------------------------------------------------------------------*/
/* Code */
@@ -805,6 +841,11 @@ void amec_calc_ips_sensors(gpe_bulk_core_data_t * i_core_data_ptr, uint8_t i_cor
ticks_2mhz = i_core_data_ptr->empath.tod_2mhz -
g_amec->proc[0].core[i_core].prev_tod_2mhz;
temp32 = (fin2 << 1) / ticks_2mhz;
+ // See if core is sleeping/winkled
+ if(l_core_sleep_winkle)
+ {
+ temp32 = 0;
+ }
sensor_update( AMECSENSOR_ARRAY_PTR(IPS2MSP0C0,i_core), (uint16_t) temp32);
}
diff --git a/src/occ/amec/amec_sensors_power.c b/src/occ/amec/amec_sensors_power.c
index 72ed892..484060f 100755
--- a/src/occ/amec/amec_sensors_power.c
+++ b/src/occ/amec/amec_sensors_power.c
@@ -5,10 +5,10 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
-/* [+] Google Inc. */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
+/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
@@ -164,7 +164,6 @@ uint32_t amec_value_from_apss_adc(uint8_t i_chan)
#define ADCMULT_TO_UNITS 1000000
#define ADCMULT_ROUND ADCMULT_TO_UNITS/2
-#define ADCSINGLE_TO_CENTIUNITS 100
// Function Specification
//
// Name: amec_update_channel_sensor
@@ -298,8 +297,6 @@ void amec_update_apss_sensors(void)
// to Watts and the current to centiAmps
temp32 = ((l_vdd * l_bulk_voltage)+ADCMULT_ROUND)/ADCMULT_TO_UNITS;
sensor_update( AMECSENSOR_PTR(PWR250USVDD0), (uint16_t)temp32);
- temp32 = (l_vdd)/ADCSINGLE_TO_CENTIUNITS; // Current is in 0.01 Amps,
- sensor_update( AMECSENSOR_PTR(CUR250USVDD0), l_vdd);
temp32 = ((l_vcs_vio_vpcie * l_bulk_voltage)+ADCMULT_ROUND)/ADCMULT_TO_UNITS;
sensor_update( AMECSENSOR_PTR(PWR250USVCS0), (uint16_t)temp32);
@@ -325,6 +322,11 @@ void amec_update_apss_sensors(void)
temp32 += ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.memory[l_proc][1]);
temp32 += ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.memory[l_proc][2]);
temp32 += ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.memory[l_proc][3]);
+ //Only for FSP-LESS systems do we add in Centaur power because it is measured on its own A/D channel, but is part of memory power
+ if (FSP_SUPPORTED_OCC != G_occ_interrupt_type)
+ {
+ temp32 += ADC_CONVERTED_VALUE(G_sysConfigData.apss_adc_map.mem_cache);
+ }
temp32 = ((temp32 * l_bulk_voltage)+ADCMULT_ROUND)/ADCMULT_TO_UNITS;
sensor_update( AMECSENSOR_PTR(PWR250USMEM0), (uint16_t)temp32);
@@ -605,6 +607,62 @@ void amec_update_external_voltage()
sensor_update( AMECSENSOR_PTR(VOLT250USP0V1), (uint16_t) l_vcs);
}
+// Function Specification
+//
+// Name: amec_update_current_sensor
+//
+// Description: Estimates Vdd output current based on input power and Vdd voltage setting.
+// Compute CUR250USVDD0 (current out of Vdd regulator)
+//
+// Flow:
+//
+// Thread: RealTime Loop
+//
+// Changedby:
+//
+// Task Flags:
+//
+// End Function Specification
+void amec_update_current_sensor(void)
+{
+ uint8_t i;
+ uint32_t result32; //temporary result
+ uint16_t l_pow_reg_input_dW = AMECSENSOR_PTR(PWR250USVDD0)->sample * 10; // convert to dW by *10.
+ uint16_t l_vdd_reg = AMECSENSOR_PTR(VOLT250USP0V0)->sample;
+ uint32_t l_pow_reg_output_mW;
+ uint32_t l_curr_output;
+
+
+ /* Step 1 */
+
+ // 1. Get PWR250USVDD0 (the input power to regulator)
+ // 2. Look up efficiency using PWR250USVDD0 as index (and interpolate)
+ // 3. Calculate output power = PWR250USVDD0 * efficiency
+ // 4. Calculate output current = output power / Vdd set point
+
+ /* Determine regulator efficiency */
+ // use 85% efficiency all the time
+ result32 = 8500;
+
+ // Compute regulator output power. out = in * efficiency
+ // in: min=0W max=300W = 3000dW
+ // eff: min=0 max=10000=100% (.01% units)
+ // p_out: max=3000dW * 10000 = 30,000,000 (dW*0.0001) < 2^25, fits in 25 bits
+ l_pow_reg_output_mW = (uint32_t)l_pow_reg_input_dW * (uint32_t)result32;
+ // Scale up p_out by 10x to give better resolution for the following division step
+ // p_out: max=30M (dW*0.0001) in 25 bits
+ // * 10 = 300M (dW*0.00001) in 29 bits
+ l_pow_reg_output_mW *= 10;
+ // Compute current out of regulator. curr_out = power_out (*10 scaling factor) / voltage_out
+ // p_out: max=300M (dW*0.00001) in 29 bits
+ // v_out: min=5000 (0.0001 V) max=16000(0.0001 V) in 14 bits
+ // i_out: max = 300M/5000 = 60000 (dW*0.00001/(0.0001V)= 0.01A), in 16 bits.
+ // VOLT250USP0V0 in units of 0.0001 V = 0.1 mV. (multiply by 0.1 to get mV)
+ l_curr_output = l_pow_reg_output_mW / l_vdd_reg;
+ sensor_update(AMECSENSOR_PTR(CUR250USVDD0), l_curr_output);
+
+}
+
/*----------------------------------------------------------------------------*/
/* End */
/*----------------------------------------------------------------------------*/
diff --git a/src/occ/amec/amec_sensors_power.h b/src/occ/amec/amec_sensors_power.h
index e4527aa..fd69ce8 100755
--- a/src/occ/amec/amec_sensors_power.h
+++ b/src/occ/amec/amec_sensors_power.h
@@ -5,10 +5,10 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
-/* [+] Google Inc. */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
+/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
@@ -54,4 +54,8 @@ void amec_update_vrm_sensors(void);
// sensors for external voltage measurement
void amec_update_external_voltage(void);
+// Function that is called by AMEC State Machine that will update the AMEC
+// sensor for the Vdd output current estimation.
+void amec_update_current_sensor(void);
+
#endif // _AMEC_SENSORS_POWER_H
diff --git a/src/occ/amec/amec_slave_smh.c b/src/occ/amec/amec_slave_smh.c
index 9b0b783..1b5dbc0 100755
--- a/src/occ/amec/amec_slave_smh.c
+++ b/src/occ/amec/amec_slave_smh.c
@@ -356,6 +356,10 @@ void amec_slv_common_tasks_pre(void)
// Update the external voltage sensors
amec_update_external_voltage();
+ // Update estimate of Vdd regulator output current
+
+ amec_update_current_sensor(); // Compute estimate for Vdd output current
+
// Over-subscription check
amec_oversub_check();
}
diff --git a/src/occ/amec/amec_sys.h b/src/occ/amec/amec_sys.h
index 49c7272..0383701 100755
--- a/src/occ/amec/amec_sys.h
+++ b/src/occ/amec/amec_sys.h
@@ -651,6 +651,7 @@ typedef struct
uint32_t r_cnt;
// array holding sensor ptrs for writing to stream vector
void *stream_vector_map[STREAM_VECTOR_SIZE_EX];
+ void * ptr_probe250us[NUM_AMEC_FW_PROBES]; // array holding ptrs to data that is read by probe250us sensors
// 32-bit ptr to streaming buffer which contains 16 bit elements
uint16_t *ptr_stream_buffer;
// 32-bit index for next write into streaming buffer
@@ -704,11 +705,14 @@ typedef struct
// Which of 8 time slots that amec_analytics is called in
uint8_t analytics_slot;
// Used to hold selected analytics group
- uint16_t analytics_array[48];
+ 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
+ uint8_t size_probe250us[NUM_AMEC_FW_PROBES]; // size of object pointed at by each probe (1 byte, 2 bytes, or 4 bytes)
+ uint8_t index_probe250us[NUM_AMEC_FW_PROBES]; // index offset to read object pointed to by each probe (only valid for size > 2)
} amec_sys_t;
diff --git a/src/occ/sensor/sensor_info.c b/src/occ/sensor/sensor_info.c
index 977ac9b..d23f2aa 100755
--- a/src/occ/sensor/sensor_info.c
+++ b/src/occ/sensor/sensor_info.c
@@ -5,10 +5,10 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
-/* [+] Google Inc. */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
+/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
@@ -256,7 +256,7 @@ const sensor_info_t G_sensor_info[] =
SENS_CORE_ENTRY_SET( NUTIL3SP0C , "%\0", AMEC_SENSOR_TYPE_UTIL, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_3S_IN_HZ, AMEFP( 1,-2) ),
SENS_CORE_ENTRY_SET( MSTL2MSP0C , "cpi\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_2MS_IN_HZ, AMEFP( 1, 0) ),
SENS_CORE_ENTRY_SET( CMT2MSP0C , "%\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_2MS_IN_HZ, AMEFP( 1, 0) ),
- SENS_CORE_ENTRY_SET( CMBW2MSP0C , "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_2MS_IN_HZ, AMEFP( 128, -5) ),
+ SENS_CORE_ENTRY_SET( CMBW2MSP0C , "GBs\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_2MS_IN_HZ, AMEFP( 256, -5) ),
SENS_CORE_ENTRY_SET( PPICP0C , "%\0", AMEC_SENSOR_TYPE_PERF, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_2MS_IN_HZ, AMEFP( 1, 0) ),
SENS_CORE_ENTRY_SET( PWRPX250USP0C , "W\0", AMEC_SENSOR_TYPE_POWER, AMEC_SENSOR_LOC_CORE, AMEC_SENSOR_NONUM, AMEEFP_250US_IN_HZ, AMEFP( 1, 0) ),
OpenPOWER on IntegriCloud