summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2013-11-15 17:23:29 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-12-09 12:07:20 -0600
commit5ec9d6332a0b9c91b133690ab356dc4052a5e291 (patch)
tree19e95ce95b075f371bbbdc79abca6571351fa962 /src/include
parent8419ba440403c1b02b74ad89a91fccd85fa45ea9 (diff)
downloadtalos-hostboot-5ec9d6332a0b9c91b133690ab356dc4052a5e291.tar.gz
talos-hostboot-5ec9d6332a0b9c91b133690ab356dc4052a5e291.zip
Route ATTR_L4_BANK_DELETE_VPD to C-VPD
Create MBvpd accessor to access cvpd record VSPD keyword MX for get and set for attribute ATTR_L4_BANK_DELETE_VPD. Split and rename fapiwinkle test since its all hwp mvpd & mbvpd accessor tests Change-Id: I3bae2e89b2ef7fd30a88c269d42223c00333bb72 RTC: 91431 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7278 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/hwpf/fapi/fapiMBvpdAccess.H5
-rw-r--r--src/include/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.H71
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatAttributeService.H30
-rw-r--r--src/include/usr/vpd/cvpdenums.H1
4 files changed, 105 insertions, 2 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H
index 5082ada2d..356b65185 100644
--- a/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H
+++ b/src/include/usr/hwpf/fapi/fapiMBvpdAccess.H
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: fapiMBvpdAccess.H,v 1.5 2013/10/09 20:45:47 mjjones Exp $
+// $Id: fapiMBvpdAccess.H,v 1.8 2013/11/21 14:52:26 whs Exp $
/**
* @file fapiMBvpdAccess.H
*
@@ -69,7 +69,8 @@ namespace fapi
MBVPD_KEYWORD_MV = 0x08,
MBVPD_KEYWORD_AM = 0x09,
MBVPD_KEYWORD_VZ = 0x0a,
- MBVPD_KEYWORD_PDD = 0x0b,
+ MBVPD_KEYWORD_PDD = 0x0b,
+ MBVPD_KEYWORD_MX = 0x0c,
};
}
diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.H b/src/include/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.H
new file mode 100644
index 000000000..e02cb1239
--- /dev/null
+++ b/src/include/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.H
@@ -0,0 +1,71 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.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: accessMBvpdL4BankDelete.H,v 1.2 2013/11/21 17:17:30 whs Exp $
+/**
+ * @file accessMBvpdL4BankDelete.H
+ *
+ * @brief MBvpd accessor for the ATTR_L4_BANK_DELETE_VPD attribute
+ */
+
+#ifndef _HWP_ACCESSMBVPDL4BANKDELETE_
+#define _HWP_ACCESSMBVPDL4BANKDELETE_
+
+#include <fapi.H>
+
+namespace fapi
+{
+
+// mode
+ enum MBvpdL4BankDeleteMode
+ {
+ GET_L4_BANK_DELETE_MODE = 0, // retrieve value from vpd
+ SET_L4_BANK_DELETE_MODE = 1, // update value in vpd
+ };
+}
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode (*accessMBvpdL4BankDelete_FP_t)
+ (const fapi::Target &,
+ uint32_t &,
+ const fapi::MBvpdL4BankDeleteMode);
+
+extern "C"
+{
+/**
+ * @brief MBvpd accessor for the ATTR_L4_BANK_DELETE_VPD attribute
+ *
+ * Access L4 Bank Delete value in MBvpd record VSPD keyword MX.
+ *
+ * @param[in] i_mbTarget - Reference to mb Target
+ * @param[in,out] io_val - retrived MX value or value to use to update MX vpd
+ * @param[in] i_mode - set or get mode
+ *
+ * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code
+ */
+fapi::ReturnCode accessMBvpdL4BankDelete(
+ const fapi::Target & i_mbTarget,
+ uint32_t & io_val,
+ const fapi::MBvpdL4BankDeleteMode i_mode );
+}
+
+#endif
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
index e0dfc32d6..fa2ce2818 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/mvpd_accessors/getMBvpdSensorMap.H>
+#include <hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.H>
#include <hwpf/hwp/spd_accessors/getSpdAttrAccessor.H>
#include <hwpf/hwp/pll_accessors/getPllRingInfoAttr.H>
#include <vpd/spdenums.H>
@@ -573,6 +574,21 @@ fapi::ReturnCode fapiPlatGetDram2NModeEnabled (
uint8_t & o_val );
/**
+ * @brief This function is called by the FAPI_ATTR_GET macro and
+ * FAPI_ATTR_SET macro when getting or setting the L4 Bank Delete
+ * record VSPD keyword MX vpd value
+ * It should not be called directly.
+ *
+ * @param[in] i_pTarget Target MB pointer
+ * @param[in,out] io_val Retrieved or value to set
+ * @param[in] i_mode Get or Set mode
+ * @return ReturnCode. Zero on success, else platform specified error
+ */
+fapi::ReturnCode fapiPlatL4BankDelete (
+ const fapi::Target * i_pTarget,
+ uint32_t & io_val,
+ const fapi::MBvpdL4BankDeleteMode i_mode );
+/**
* @brief This function is called by the FAPI_ATTR_SET macro when setting
* the Bad DQ Bitmap attribute
* It should not be called directly.
@@ -1716,4 +1732,18 @@ fapi::ReturnCode fapiPlatGetSpdAttrAccessor (
fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetSensorMap\
(PTARGET, fapi::SENSOR_MAP_SECONDARY, VAL)
+//------------------------------------------------------------------------------
+// MACROS to support MBVPD Get and Set L4 Bank Delete VPD
+//------------------------------------------------------------------------------
+#define ATTR_L4_BANK_DELETE_VPD_GETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatL4BankDelete\
+ (PTARGET, VAL, fapi::GET_L4_BANK_DELETE_MODE)
+
+#define ATTR_L4_BANK_DELETE_VPD_SETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::setAttrActionsFunc(fapi::ID, PTARGET,\
+ sizeof(VAL), &VAL),\
+ fapi::platAttrSvc::fapiPlatL4BankDelete\
+ (PTARGET, VAL, fapi::SET_L4_BANK_DELETE_MODE)
+
#endif // FAPIPLATATTRIBUTESERVICE_H_
diff --git a/src/include/usr/vpd/cvpdenums.H b/src/include/usr/vpd/cvpdenums.H
index d768267fb..1abdb868c 100644
--- a/src/include/usr/vpd/cvpdenums.H
+++ b/src/include/usr/vpd/cvpdenums.H
@@ -63,6 +63,7 @@ namespace CVPD
AM = 0x09,
VZ = 0x0a,
pdD = 0x0b,
+ MX = 0x0c,
// Last Keyword
CVPD_LAST_KEYWORD,
OpenPOWER on IntegriCloud