summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2013-12-09 20:47:15 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-01-09 13:33:38 -0600
commit0b5aa2c2e4a56c2ab9546a1a80bef847802c7dbd (patch)
tree6670b08f7d608bcf3f36d689a61fe1bd14d079e1 /src/include/usr
parent0396febcd4fe2abbf110f063731ff5171917e81a (diff)
downloadblackbird-hostboot-0b5aa2c2e4a56c2ab9546a1a80bef847802c7dbd.tar.gz
blackbird-hostboot-0b5aa2c2e4a56c2ab9546a1a80bef847802c7dbd.zip
Support ATTR_PROC_EX_FUNC_L3_DELTA_DATA properly
Instead of zero data, an Attribute Accessor HWP should return real data supplied by the HW team. Change-Id: I53c3ecd01bd30475b2ab861af0cb0ad422521782 CQ: SW235093 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7639 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: William H. Schwartz <whs@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rwxr-xr-xsrc/include/usr/hwpf/hwp/winkle_ring_accessors/getL3DeltaDataAttr.H58
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatAttributeService.H19
2 files changed, 77 insertions, 0 deletions
diff --git a/src/include/usr/hwpf/hwp/winkle_ring_accessors/getL3DeltaDataAttr.H b/src/include/usr/hwpf/hwp/winkle_ring_accessors/getL3DeltaDataAttr.H
new file mode 100755
index 000000000..e9b6974ad
--- /dev/null
+++ b/src/include/usr/hwpf/hwp/winkle_ring_accessors/getL3DeltaDataAttr.H
@@ -0,0 +1,58 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/hwp/winkle_ring_accessors/getL3DeltaDataAttr.H $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2013 */
+/* */
+/* 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 */
+// $Id: getL3DeltaDataAttr.H,v 1.1 2013/12/10 02:11:07 mjjones Exp $
+/**
+ * @file getL3DeltaDataAttr.H
+ *
+ * @brief Prototype for getL3DeltaDataAttr() -
+ * fetch L3 delta data attribute based on chip EC and PROC_PBIEX_ASYNC_SEL from data from static arrays (fapiL3DeltaDataAttr.H)
+ */
+
+ #ifndef _HWP_GETL3DELTADATAATTR_
+ #define _HWP_GETL3DELTADATAATTR_
+
+#include <fapi.H>
+#include <fapiL3DeltaDataAttr.H>
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode (*getL3DeltaDataAttr_FP_t)
+ (const fapi::Target &, uint32_t (&)[DELTA_DATA_SIZE]);
+
+
+extern "C"
+{
+/**
+ * @brief get processor ex func L3 delta data attribute for the specified target CPU.
+ *
+ * @param i_fapiTarget - cpu target
+ * @param o_data - out: L3 delta data data.
+ *
+ * @return fapi::ReturnCode - FAPI_RC_SUCCESS if success,
+ * relevant error code for failure.
+ */
+fapi::ReturnCode getL3DeltaDataAttr( const fapi::Target &i_fapiTarget,
+ uint32_t (&o_data)[DELTA_DATA_SIZE]);
+
+}
+
+#endif
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
index fa2ce2818..b36792f65 100644
--- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
+++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
@@ -59,6 +59,7 @@
#include <dimmConsts.H>
#include <util/singleton.H>
#include <procMemConsts.H>
+#include <fapiL3DeltaDataAttr.H>
//******************************************************************************
// Interface
@@ -678,6 +679,17 @@ fapi::ReturnCode fapiPlatGetSpdAttrAccessor (
void * o_pVal,
size_t i_len);
+/**
+ * @brief This function is called by the FAPI_ATTR_GET macro when getting the
+ * ATTR_PROC_EX_FUNC_L3_DELTA_DATA attribute. It should not be called
+ * directly.
+ *
+ * @param[in] i_pProcTarget Processor Chip Target pointer
+ * @param[out] o_data Reference to output data
+ */
+fapi::ReturnCode fapiPlatGetL3DDAttr(const fapi::Target * i_pProcTarget,
+ uint32_t (&o_data)[DELTA_DATA_SIZE]);
+
} // namespace platAttrSvc
} // namespace fapi
@@ -1746,4 +1758,11 @@ fapi::ReturnCode fapiPlatGetSpdAttrAccessor (
fapi::platAttrSvc::fapiPlatL4BankDelete\
(PTARGET, VAL, fapi::SET_L4_BANK_DELETE_MODE)
+//------------------------------------------------------------------------------
+// MACRO to support L3 DELTA DATA Ring Attribute
+//------------------------------------------------------------------------------
+#define ATTR_PROC_EX_FUNC_L3_DELTA_DATA_GETMACRO(ID, PTARGET, VAL) \
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \
+ fapi::platAttrSvc::fapiPlatGetL3DDAttr(PTARGET, VAL)
+
#endif // FAPIPLATATTRIBUTESERVICE_H_
OpenPOWER on IntegriCloud