summaryrefslogtreecommitdiffstats
path: root/src/include/usr/targeting
diff options
context:
space:
mode:
authorJaymes Wilks <mjwilks@us.ibm.com>2017-07-07 14:46:34 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-07-24 16:10:46 -0400
commitc0fe969256eb9509c184b2a2cdeba39c12ceaebb (patch)
treeda0344423a822d08056638b530d1f9e0491567d0 /src/include/usr/targeting
parentcf20b92e8e08cef8e287db1c9c70cc99c1471113 (diff)
downloadtalos-hostboot-c0fe969256eb9509c184b2a2cdeba39c12ceaebb.tar.gz
talos-hostboot-c0fe969256eb9509c184b2a2cdeba39c12ceaebb.zip
Persistent read/write attribute checking for hostboot runtime
Adds support for checking persistent read/write attributes just prior to runtime attribute copy to reserved memory. Change-Id: I848a2d8149cf3f1d17ed7bf195256f7f168a1f29 RTC:163084 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42969 Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/targeting')
-rw-r--r--src/include/usr/targeting/attrrp.H16
-rw-r--r--src/include/usr/targeting/common/target.H11
2 files changed, 27 insertions, 0 deletions
diff --git a/src/include/usr/targeting/attrrp.H b/src/include/usr/targeting/attrrp.H
index 7e0006bd2..1453d0273 100644
--- a/src/include/usr/targeting/attrrp.H
+++ b/src/include/usr/targeting/attrrp.H
@@ -394,6 +394,22 @@ class AttrRP
*/
TARG_DECLARE_SINGLETON(TARGETING::AttrRP,theAttrRP);
+extern const char* ATTRRP_MSG_Q;
+
+// user-defined message subtype for MSG_MM_RP_RUNTIME_PREP
+/** @enum msg_mm_rp_runtime_prep_t
+ * @brief Message type and subtypes for the MSG_MM_RP_RUNTIME_PREP message
+ */
+enum msg_mm_rp_runtime_prep_t
+{
+ MSG_MM_RP_RUNTIME_PREP = 0x2, // prepare runtime for secure transition
+ // of attrs
+ // data[0] = MSG_MM_RP_RUNTIME_PREP_BEGIN or
+ // data[0] = MSG_MM_RP_RUNTIME_PREP_END
+ MSG_MM_RP_RUNTIME_PREP_BEGIN,
+ MSG_MM_RP_RUNTIME_PREP_END,
+};
+
} // End namespace TARGETING
#endif // __TARGETING_ATTRRP_H
diff --git a/src/include/usr/targeting/common/target.H b/src/include/usr/targeting/common/target.H
index 0681da27f..f9ba6c346 100644
--- a/src/include/usr/targeting/common/target.H
+++ b/src/include/usr/targeting/common/target.H
@@ -787,6 +787,17 @@ void handleRangeCheckFailure(const Target* i_pTarget,
const ATTRIBUTE_ID i_attr,
const uint64_t i_outOfRangeValue);
+// Function to handle validation of all persistent r/w attributes for runtime
+/**
+ * @brief Attempts to get all persistent r/w attributes for a given target.
+ * Those that are non-present for that target are skipped. All others
+ * are checked for valid enum values and ranges.
+ *
+ * @param[in] i_pTarget The target for which all attributes will be checked.
+ * Cannot be nullptr.
+ */
+void validateAllRwNvAttr(const Target* i_pTarget);
+
// The following #include ensures that persistent read/write attributes are
// value-checked for validity upon calling getAttr. This is done via
OpenPOWER on IntegriCloud