summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2012-11-20 14:56:20 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-12-06 15:28:39 -0600
commitc96efe7a05d16170dd57cc0c367d5f5692bec68b (patch)
tree05f953ed389ba1174dfbaef50f710a0be9644bf8 /src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H
parent9c5a8f943bccd40389a36f010666f69b743115e9 (diff)
downloadtalos-hostboot-c96efe7a05d16170dd57cc0c367d5f5692bec68b.tar.gz
talos-hostboot-c96efe7a05d16170dd57cc0c367d5f5692bec68b.zip
HWPF: Add FAPI Attr Sync Functionality and enable FSP-HB Attr Overrides
Change-Id: I64939aa0655659e48400bca0c4aa09afe333889c RTC: 46992 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2397 Tested-by: Jenkins Server Reviewed-by: Van H. Lee <vanlee@us.ibm.com> Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H')
-rwxr-xr-xsrc/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H94
1 files changed, 94 insertions, 0 deletions
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H b/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H
new file mode 100755
index 000000000..ab2a5ee3d
--- /dev/null
+++ b/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H
@@ -0,0 +1,94 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2012 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
+/**
+ * @file fapiPlatAttrOverrdieSync.H
+ *
+ * @brief Defines the functions for Attribute Override and Sync
+ */
+
+#ifndef FAPIPLATATTROVERRIDESYNC_H_
+#define FAPIPLATATTROVERRIDESYNC_H_
+
+//******************************************************************************
+// Includes
+//******************************************************************************
+#include <stdint.h>
+#include <hwpf/fapi/fapiAttributeTank.H>
+
+//******************************************************************************
+// Interface
+//******************************************************************************
+namespace fapi
+{
+
+namespace attrOverrideSync
+{
+
+/**
+ * @brief Monitors for incoming messages from the FSP. This must be called
+ * by a task specifically started to monitor for these messages
+ */
+void monitorForFspMessages();
+
+/**
+ * @brief Sends Attribute Overrides and Syncs to the FSP
+ *
+ * This is called at the end of an IStep. It:
+ * - Clears the FSP Attribute Overrides
+ * - Sends the Hostboot Attribute Overrides to the FSP
+ * - Sends the Hostboot Attribute Syncs to the FSP
+ */
+void sendAttrOverridesAndSyncsToFsp();
+
+/**
+ * @brief This function returns the OverrideAttributeTank singleton. Other
+ * modules must call this rather than using Singleton<>
+ */
+AttributeTank & theOverrideAttrTank();
+
+/**
+ * @brief This function returns the SyncAttributeTank singleton. Other
+ * modules must call this rather than using Singleton<>
+ */
+AttributeTank & theSyncAttrTank();
+
+} // namespace attrOverrideSync
+
+} // namespace fapi
+
+/**
+ * @brief Macro that is called on a FAPI_ATTR_GET that returns any Attribute
+ * Override
+ */
+#define FAPI_PLAT_GET_ATTR_OVERRIDE(ID, PTARGET, VAL) \
+ fapi::getAttributeT(ID, PTARGET, fapi::attrOverrideSync::theOverrideAttrTank(), VAL)
+
+/**
+ * @brief Macro that is called on a FAPI_ATTR_SET that clears any non-const
+ * Attribute Override and saves the Attribute to Sync
+ */
+#define FAPI_PLAT_ATTR_SET_ACTIONS(ID, PTARGET, VAL) \
+ fapi::attrOverrideSync::theOverrideAttrTank().clearNonConstAttribute(ID, PTARGET), \
+ fapi::setAttributeT(ID, PTARGET, fapi::attrOverrideSync::theSyncAttrTank(), VAL)
+
+#endif // FAPIPLATATTROVERRIDESYNC_H_
OpenPOWER on IntegriCloud