summaryrefslogtreecommitdiffstats
path: root/src/occ_405/sensor
diff options
context:
space:
mode:
authorWilliam Bryan <wilbryan@us.ibm.com>2017-09-01 14:56:46 -0500
committerWilliam A. Bryan <wilbryan@us.ibm.com>2017-09-05 16:08:22 -0400
commit4b775f5f2da291d98a0ecdcfd40fb24c64052956 (patch)
tree713040933ff4b0a9b12d10eaf5574407adcf4ee0 /src/occ_405/sensor
parentf6b9c4c2f61472fab97c75d719ae7224f0e9e416 (diff)
downloadtalos-occ-4b775f5f2da291d98a0ecdcfd40fb24c64052956.tar.gz
talos-occ-4b775f5f2da291d98a0ecdcfd40fb24c64052956.zip
Fix I2C locking issue and sensor IDs
Change-Id: Ib6255d96ca18b45e69184bc5126e53a09d2f26fe Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45577 Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_405/sensor')
-rw-r--r--src/occ_405/sensor/sensor_main_memory.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/occ_405/sensor/sensor_main_memory.c b/src/occ_405/sensor/sensor_main_memory.c
index 7e4cb51..70fb8a5 100644
--- a/src/occ_405/sensor/sensor_main_memory.c
+++ b/src/occ_405/sensor/sensor_main_memory.c
@@ -30,9 +30,9 @@
* the OCC sensors to main memory. See the header file for more information.
*/
-//******************************************************************************
+//******************************************************************************/
// Includes
-//******************************************************************************
+//******************************************************************************/
#include <sensor_main_memory.h> // Primary header
#include <stdint.h> // For uint*_t
#include <string.h> // For memset(), memcpy()
@@ -48,9 +48,9 @@
#include <cmdh_fsp_cmds.h> // For G_apss_ch_to_function
-//******************************************************************************
+//******************************************************************************/
// Main Memory Sensors - Private Defines/Structs/Globals
-//******************************************************************************
+//******************************************************************************/
/**
* Main memory sensor struct. Represents one OCC sensor that should be copied
@@ -173,16 +173,22 @@ main_mem_sensor_t G_main_mem_sensors[] =
MAIN_MEM_SENSOR (TEMPNEST, false, false),
MAIN_MEM_CORE_SENSORS (TEMPPROCTHRMC, false, false),
MAIN_MEM_DIMM_SENSORS (TEMPDIMM, false, false),
-
+ MAIN_MEM_SENSOR (TEMPGPU0, false, false),
+ MAIN_MEM_SENSOR (TEMPGPU1, false, false),
+ MAIN_MEM_SENSOR (TEMPGPU2, false, false),
+ MAIN_MEM_SENSOR (TEMPGPU0MEM, false, false),
+ MAIN_MEM_SENSOR (TEMPGPU1MEM, false, false),
+ MAIN_MEM_SENSOR (TEMPGPU2MEM, false, false),
+
// AMEC_SENSOR_TYPE_UTIL: gsid smf_mode master_only
MAIN_MEM_CORE_SENSORS (UTILC, false, false),
MAIN_MEM_SENSOR (UTIL, false, false),
MAIN_MEM_CORE_SENSORS (NUTILC, false, false),
-
+
// AMEC_SENSOR_TYPE_FREQ: gsid smf_mode master_only
MAIN_MEM_SENSOR (FREQA, true, false),
MAIN_MEM_CORE_SENSORS (FREQAC, true, false),
-
+
// AMEC_SENSOR_TYPE_POWER: gsid smf_mode master_only
MAIN_MEM_SENSOR (PWRSYS, true, true ),
MAIN_MEM_SENSOR (PWRGPU, true, false),
@@ -191,7 +197,7 @@ main_mem_sensor_t G_main_mem_sensors[] =
MAIN_MEM_SENSOR (PWRVDD, true, false),
MAIN_MEM_SENSOR (PWRVDN, true, false),
MAIN_MEM_SENSOR (PWRMEM, true, false),
-
+
// AMEC_SENSOR_TYPE_PERF: gsid smf_mode master_only
MAIN_MEM_SENSOR (IPS, false, false),
MAIN_MEM_CORE_SENSORS (STOPDEEPACTC, true, false),
@@ -288,7 +294,7 @@ bool G_mm_sensors_bce_req_scheduled = false;
* ^
* |
* field to modify later
- *
+ *
* AA is the two byte value of field A, BBBB is the four byte value of field
* B, etc.
*
@@ -774,7 +780,7 @@ void mm_sensors_save_last_write(uint32_t i_main_mem_addr, size_t i_byte_count)
// Copy last 128 bytes into last write buffer
memcpy(G_mm_sensors_last_write_buf, &G_mm_sensors_bce_buffer[l_offset],
MM_SENSORS_MIN_WRITE_SIZE);
-
+
// Save main memory address where last 128 bytes were written
G_mm_sensors_last_write_buf_addr = i_main_mem_addr + l_offset;
}
@@ -984,7 +990,7 @@ void mm_sensors_write_sensor_names(void)
// If we previously wrote bytes to the same 128-byte aligned address, copy
// those bytes from the last write buffer. This will retain the value of
- // the bytes that precede the current names entry.
+ // the bytes that precede the current names entry.
if (G_mm_sensors_last_write_buf_addr == l_write_addr)
{
memcpy(G_mm_sensors_bce_buffer, G_mm_sensors_last_write_buf,
@@ -1181,7 +1187,7 @@ void mm_sensors_init_readings_counter(const main_mem_sensor_t * i_mm_sensor,
/**
* Stores sensor readings in the BCE buffer at the specified offset for the
* specified sensor.
- *
+ *
* @param i_mm_sensor Main memory sensor whose readings to store
* @param i_bce_buf_offset Offset in BCE buffer where readings should be stored
* @param io_readings_offset Offset to current sensor's readings within Sensor
OpenPOWER on IntegriCloud