summaryrefslogtreecommitdiffstats
path: root/src/occ_405/sensor/sensor_main_memory.h
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2019-04-02 16:19:30 -0500
committerChristopher J. Cain <cjcain@us.ibm.com>2019-04-26 13:33:59 -0500
commita880ffe3a854a8eb219ea92e7fbc4845d8fa2511 (patch)
tree1ad7c55fae5557c0f737a8286f63c24ed2f30e9a /src/occ_405/sensor/sensor_main_memory.h
parentcf4c143eb571de19c03d1c66e963feb6bed4f190 (diff)
downloadtalos-occ-a880ffe3a854a8eb219ea92e7fbc4845d8fa2511.tar.gz
talos-occ-a880ffe3a854a8eb219ea92e7fbc4845d8fa2511.zip
Support for Secure Memory Facility (SMF) mode
- block AMESTER commands - block memory peek command - Only dump sensors supported in SMF mode Change-Id: I1283ecb726edf3f14a8d410c34f512ab6d587d0f RTC: 164116 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/75477 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Diffstat (limited to 'src/occ_405/sensor/sensor_main_memory.h')
-rw-r--r--src/occ_405/sensor/sensor_main_memory.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/src/occ_405/sensor/sensor_main_memory.h b/src/occ_405/sensor/sensor_main_memory.h
index f989e13..8befbb0 100644
--- a/src/occ_405/sensor/sensor_main_memory.h
+++ b/src/occ_405/sensor/sensor_main_memory.h
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2017,2017 */
+/* Contributors Listed Below - COPYRIGHT 2017,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -60,7 +60,7 @@
* These buffers contain the dynamic sensor data, such as the current sample,
* timestamp, and maximum value. The OCC alternates between the two buffers so
* that one buffer is always complete and readable by OPAL.
- *
+ *
* For more information see the OCC Firmware Interface Specification document.
*/
@@ -235,6 +235,20 @@ typedef struct __attribute__ ((packed))
sizeof(mm_sensor_readings_full_t) : \
sizeof(mm_sensor_readings_counter_t))
+/**
+ * Main memory sensor struct. Represents one OCC sensor that should be copied
+ * to main memory. Uses bit fields to reduce memory usage.
+ */
+typedef struct __attribute__ ((packed))
+{
+ uint16_t gsid; ///< Global Sensor ID
+ uint8_t smf_mode : 1; ///< Is sensor copied when SMF mode enabled?
+ uint8_t master_only : 1; ///< Is sensor only available from master OCC?
+ uint8_t valid : 1; ///< Is sensor valid (able to be copied)?
+ uint8_t enabled : 1; ///< Is sensor enabled (chosen to be copied)?
+ uint8_t struct_ver : 2; ///< See MM_SENSOR_NAMES_STRUCT_VERSION_VALUES
+} main_mem_sensor_t;
+
//******************************************************************************
// Globals
@@ -251,7 +265,17 @@ extern bool G_main_mem_sensors_initialized;
* enabled only a subset of sensors will be copied to main memory. Default
* value is false (not enabled).
*/
-extern bool G_main_mem_sensors_smf_mode_enabled;
+extern bool G_smf_mode;
+
+extern main_mem_sensor_t G_main_mem_sensors[337];
+
+/**
+ * Number of main memory sensors (in G_main_mem_sensors).
+ *
+ * Note that some sensors might not be valid or enabled, and as a result they
+ * will not be copied to main memory.
+ */
+#define MAIN_MEM_SENSOR_COUNT (sizeof(G_main_mem_sensors) / sizeof(G_main_mem_sensors[0]))
//******************************************************************************
OpenPOWER on IntegriCloud