summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2013-11-18 13:40:12 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-12-03 14:44:23 -0600
commit83b1c3a6b7512ad61baa1affacf3176233b948b3 (patch)
tree52e147adf4531d5467a075cc8e2f7be352bac30c /src/include
parentc38de5ef9f27b3d6f21d838597adcbf1aec15ab7 (diff)
downloadblackbird-hostboot-83b1c3a6b7512ad61baa1affacf3176233b948b3.tar.gz
blackbird-hostboot-83b1c3a6b7512ad61baa1affacf3176233b948b3.zip
Support new proc/memb pll_ring_attributes
Change-Id: I5ba5fd112a43b77a2cb41349379fc113b6f6b5f4 CQ: SW234336 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7309 Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rwxr-xr-xsrc/include/usr/hwpf/hwp/pll_accessors/getPllRingAttr.H (renamed from src/include/usr/hwpf/hwp/getPllRingAttr.H)0
-rw-r--r--src/include/usr/hwpf/hwp/pll_accessors/getPllRingInfoAttr.H83
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatAttributeService.H48
3 files changed, 131 insertions, 0 deletions
diff --git a/src/include/usr/hwpf/hwp/getPllRingAttr.H b/src/include/usr/hwpf/hwp/pll_accessors/getPllRingAttr.H
index fde18436b..fde18436b 100755
--- a/src/include/usr/hwpf/hwp/getPllRingAttr.H
+++ b/src/include/usr/hwpf/hwp/pll_accessors/getPllRingAttr.H
diff --git a/src/include/usr/hwpf/hwp/pll_accessors/getPllRingInfoAttr.H b/src/include/usr/hwpf/hwp/pll_accessors/getPllRingInfoAttr.H
new file mode 100644
index 000000000..1f8208c6f
--- /dev/null
+++ b/src/include/usr/hwpf/hwp/pll_accessors/getPllRingInfoAttr.H
@@ -0,0 +1,83 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/hwp/pll_accessors/getPllRingInfoAttr.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 */
+/**
+ * @file getPllRingInfoAttr.H
+ *
+ * @brief Accessor HWP that gets attributes containing information about PLL
+ * Rings
+ */
+
+#ifndef _GETPLLRINGINFOATTR_
+#define _GETPLLRINGINFOATTR_
+
+#include <fapi.H>
+
+namespace fapi
+{
+ // Attributes supported
+ namespace getPllRingInfo
+ {
+ enum Attr
+ {
+ PROC_DMI_CUPLL_PFD360_OFFSET = 0x01,
+ PROC_DMI_CUPLL_REFCLKSEL_OFFSET = 0x02,
+ PROC_ABUS_CUPLL_PFD360_OFFSET = 0x03,
+ PROC_ABUS_CUPLL_REFCLKSEL_OFFSET = 0x04,
+ MEMB_DMI_CUPLL_PFD360_OFFSET = 0x05,
+ MEMB_DMI_CUPLL_REFCLKSEL_OFFSET = 0x06,
+ };
+ }
+}
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode (*getPllRingInfoAttr_FP_t) (
+ const fapi::Target &,
+ const fapi::getPllRingInfo::Attr,
+ void *, const size_t);
+
+extern "C"
+{
+/**
+ * @brief Accessor HWP that gets attributes containing information about PLL
+ * Rings
+ *
+ * FAPI_ATTR_GET checks at compile time that the user's attribute is the correct
+ * type. Assuming that the platform routes the access of the attribute to the
+ * corresponding attribute enum defined in this file then the size of o_pVal
+ * will be correct, in the unlikely event of a misroute where the buffer is too
+ * small, an error will be returned.
+ *
+ * @param[in] i_chip Reference to Processor/Membuf Chip fapi target
+ * @param[in] i_attr The Attribute to get
+ * @param[out] o_pVal Pointer to data buffer filled in with attribute data
+ * @param[in] i_len Size of o_pVal
+ *
+ * @return fapi::ReturnCode Indicating success or error
+ */
+fapi::ReturnCode getPllRingInfoAttr(const fapi::Target & i_chip,
+ const fapi::getPllRingInfo::Attr i_attr,
+ void * o_pVal,
+ const size_t i_len);
+}
+
+#endif
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
index 0c4c7d855..f1874f354 100644
--- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
+++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
@@ -52,6 +52,7 @@
#include <hwpf/hwp/mvpd_accessors/getMBvpdVersion.H>
#include <hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.H>
#include <hwpf/hwp/spd_accessors/getSpdAttrAccessor.H>
+#include <hwpf/hwp/pll_accessors/getPllRingInfoAttr.H>
#include <vpd/spdenums.H>
#include <dimmConsts.H>
#include <util/singleton.H>
@@ -615,6 +616,21 @@ fapi::ReturnCode fapiPlatGetPllAttr(const fapi::AttributeId i_attrId,
/**
* @brief This function is called by the FAPI_ATTR_GET macro when getting
+ * PLL ring info attributes. It should not be called directly.
+ *
+ * @param[in] i_pProcChip Pointer to Processor Chip fapi target
+ * @param[in] i_attr The Attribute to get
+ * @param[out] o_pVal Pointer to data buffer filled in with attribute data
+ * @param[in] i_len Size of o_pVal
+ */
+fapi::ReturnCode fapiPlatGetPllInfoAttr(
+ const fapi::Target * i_pProcChip,
+ const fapi::getPllRingInfo::Attr i_attr,
+ void * o_pVal,
+ const size_t i_len);
+
+/**
+ * @brief This function is called by the FAPI_ATTR_GET macro when getting
* DIMM SPD Attributes that are handled by an Accessor HWP
* It should not be called directly.
*
@@ -1523,10 +1539,16 @@ fapi::ReturnCode fapiPlatGetSpdAttrAccessor (
PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
#define ATTR_MEMB_TP_BNDY_PLL_NEST4800_MEM1866_DATA_GETMACRO(ID, PTARGET, VAL) \
PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
+#define ATTR_MEMB_TP_BNDY_PLL_FOR_RUNTIME_DATA_GETMACRO(ID, PTARGET, VAL) \
+ PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
#define ATTR_PROC_PB_BNDY_DMIPLL_FOR_DCCAL_LENGTH_GETMACRO(ID, PTARGET, VAL) \
PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
#define ATTR_PROC_AB_BNDY_PLL_FOR_DCCAL_LENGTH_GETMACRO(ID, PTARGET, VAL) \
PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
+#define ATTR_PROC_PB_BNDY_DMIPLL_FOR_RUNTIME_DATA_GETMACRO(ID, PTARGET, VAL) \
+ PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
+#define ATTR_PROC_AB_BNDY_PLL_FOR_RUNTIME_DATA_GETMACRO(ID, PTARGET, VAL) \
+ PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
// FLUSH accesses
#define ATTR_PROC_AB_BNDY_PLL_FLUSH_GETMACRO(ID, PTARGET, VAL) \
@@ -1569,10 +1591,36 @@ fapi::ReturnCode fapiPlatGetSpdAttrAccessor (
PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
#define ATTR_MEMB_TP_BNDY_PLL_NEST4800_MEM1866_LENGTH_GETMACRO(ID, PTARGET, VAL) \
PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
+#define ATTR_MEMB_TP_BNDY_PLL_FOR_RUNTIME_LENGTH_GETMACRO(ID, PTARGET, VAL) \
+ PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
#define ATTR_PROC_PB_BNDY_DMIPLL_FOR_DCCAL_LENGTH_GETMACRO(ID, PTARGET, VAL) \
PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
#define ATTR_PROC_AB_BNDY_PLL_FOR_DCCAL_LENGTH_GETMACRO(ID, PTARGET, VAL) \
PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
+#define ATTR_PROC_PB_BNDY_DMIPLL_FOR_RUNTIME_LENGTH_GETMACRO(ID, PTARGET, VAL) \
+ PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
+#define ATTR_PROC_AB_BNDY_PLL_FOR_RUNTIME_LENGTH_GETMACRO(ID, PTARGET, VAL) \
+ PLL_ATTR_GENERIC_GETMACRO(ID,PTARGET,VAL)
+
+// INFO accesses
+#define ATTR_PROC_DMI_CUPLL_PFD360_OFFSET_GETMACRO(ID, PTARGET, VAL) \
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \
+ fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::PROC_DMI_CUPLL_PFD360_OFFSET, &VAL, sizeof(VAL))
+#define ATTR_PROC_DMI_CUPLL_REFCLKSEL_OFFSET_GETMACRO(ID, PTARGET, VAL) \
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \
+ fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::PROC_DMI_CUPLL_REFCLKSEL_OFFSET, &VAL, sizeof(VAL))
+#define ATTR_PROC_ABUS_CUPLL_PFD360_OFFSET_GETMACRO(ID, PTARGET, VAL) \
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \
+ fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::PROC_ABUS_CUPLL_PFD360_OFFSET, &VAL, sizeof(VAL))
+#define ATTR_PROC_ABUS_CUPLL_REFCLKSEL_OFFSET_GETMACRO(ID, PTARGET, VAL) \
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \
+ fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::PROC_ABUS_CUPLL_REFCLKSEL_OFFSET, &VAL, sizeof(VAL))
+#define ATTR_MEMB_DMI_CUPLL_PFD360_OFFSET_GETMACRO(ID, PTARGET, VAL) \
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \
+ fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::MEMB_DMI_CUPLL_PFD360_OFFSET, &VAL, sizeof(VAL))
+#define ATTR_MEMB_DMI_CUPLL_REFCLKSEL_OFFSET_GETMACRO(ID, PTARGET, VAL) \
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \
+ fapi::platAttrSvc::fapiPlatGetPllInfoAttr(PTARGET, fapi::getPllRingInfo::MEMB_DMI_CUPLL_REFCLKSEL_OFFSET, &VAL, sizeof(VAL))
//------------------------------------------------------------------------------
// MACROs to support DIMM SPD Attributes that are handled by an Accessor HWP
OpenPOWER on IntegriCloud