summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2013-10-29 19:16:43 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-11-08 15:21:50 -0600
commitc811df7983a6dbb0d56b96badb58ed785ddd0b72 (patch)
treefc7c1dccec5b4a282be1df4e446e43b1f73fb066 /src/include/usr/hwpf
parent06fdca58e18f8a6dae366a12e03b97c7b28d5742 (diff)
downloadtalos-hostboot-c811df7983a6dbb0d56b96badb58ed785ddd0b72.tar.gz
talos-hostboot-c811df7983a6dbb0d56b96badb58ed785ddd0b72.zip
Centaur VPD Attributes: Version, 2N_Mode_Enabled, and Address Mirroring
ATTR_VPD_VERSION - add attribute and hwp accessor to return Record VINI Keyword VZ ATTR_VPD_DRAM_2N_MODE_ENABLED - add attribute and new HWP accessor using MR hwp accessor to retrieve DRAM_2N_MODE. ATTR_VPD_DRAM_ADDRESS_MIRRORING - Change from DIMM to MBA target Change-Id: I05875c5e89966906a928d3c82925e33507962db9 RTC: 89859 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/6949 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@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')
-rw-r--r--src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.H59
-rw-r--r--src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H13
-rw-r--r--src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.H9
-rw-r--r--src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.H59
-rw-r--r--src/include/usr/hwpf/hwpf_reasoncodes.H2
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatAttributeService.H49
6 files changed, 177 insertions, 14 deletions
diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.H
new file mode 100644
index 000000000..112d34ca2
--- /dev/null
+++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.H
@@ -0,0 +1,59 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.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: getMBvpdDram2NModeEnabled.H,v 1.1 2013/10/30 21:02:44 whs Exp $
+/**
+ * @file getMBvpdDram2NModeEnabled.H
+ *
+ * @brief MBVPD Accessor for providing the ATTR_VPD_DRAM_2N_MODE_ENABLED
+ * attribute
+ */
+
+#ifndef _HWP_GETMBVPDDRAM2NMODEENABLED_
+#define _HWP_GETMBVPDDRAM2NMODEENABLED_
+
+#include <fapi.H>
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode (*getMBvpdDram2NModeEnabled_FP_t)
+ (const fapi::Target &, uint8_t &);
+
+extern "C"
+{
+/**
+ * @brief Get the ATTR_DRAM_2N_MODE_ENABLED FAPI attribute
+ *
+ * Return whether Dram 2N Mode is enabled based on the MR keyword
+ * DRAM_2N_MODE value. The DRAM_2N_Mode values for both ports of the mba
+ * must be equal, otherwise an error is returned.
+ *
+ * @param[in] i_mbaTarget - Reference to mba Target
+ * @param[out] o_val - ATTR_VPD_DRAM_2N_MODE_ENABLED enumeration value
+ *
+ * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code
+ */
+fapi::ReturnCode getMBvpdDram2NModeEnabled(
+ const fapi::Target & i_mbaTarget,
+ uint8_t & o_val);
+}
+
+#endif
diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H
index cb07272af..78d02f318 100644
--- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H
+++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdPhaseRotatorData.H
@@ -20,7 +20,7 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: getMBvpdPhaseRotatorData.H,v 1.2 2013/04/29 16:48:15 whs Exp
+// $Id: getMBvpdPhaseRotatorData.H,v 1.8 2013/11/08 18:13:43 whs Exp $
/**
* @file getMBvpdPhaseRotatorData.H
@@ -49,8 +49,9 @@ namespace fapi
// special processing flags to be added on to the MBvpdPhaseRotatorData value
enum MBvpdPhaseRotatorSpecial
{
- PHASE_ROT_HIGH_NIBBLE = 0x0100, //bits 4:7 shifted right 4
- PHASE_ROT_LOW_NIBBLE = 0x0200, //bits 0:3
+ PHASE_ROT_HIGH_NIBBLE = 0x0100, //bits 0:3 of MSB 0 to LSB 7
+ // shifted right 4
+ PHASE_ROT_LOW_NIBBLE = 0x0200, //bits 4:7 of MSB 0 to LSB 7
PHASE_ROT_PORT00=0x0300, // return vpd port 0 value for 0 and 1
PHASE_ROT_PORT11=0x0400, // return vpd port 1 value for 0 and 1
};
@@ -115,12 +116,12 @@ const uint8_t PHASE_ROT_CHK60 = 0x40; // check version for offset to use
PHASE_ROT_M1_CNTL_CSN3 = 0x2d,
PHASE_ROT_M1_CNTL_ODT0 = 0x2e,
PHASE_ROT_M1_CNTL_ODT1 = 0x2f,
- // DRAM_2N_MODE reserved = 0x30,
+ PHASE_ROT_DRAM_2N_MODE = 0x30,
PHASE_ROT_TSYS_ADR = 0x31 | PHASE_ROT_CHK60 | PHASE_ROT_PORT00,
PHASE_ROT_TSYS_DP18 = 0x31 | PHASE_ROT_CHK60 | PHASE_ROT_PORT11,
// Use these offsets for vpd less than version 6.0
- PHASE_ROT_RLO_V53 = 0x31 | PHASE_ROT_HIGH_NIBBLE,
- PHASE_ROT_WLO_V53 = 0x31 | PHASE_ROT_LOW_NIBBLE,
+ PHASE_ROT_RLO_V53 = 0x31 | PHASE_ROT_LOW_NIBBLE,
+ PHASE_ROT_WLO_V53 = 0x31 | PHASE_ROT_HIGH_NIBBLE,
PHASE_ROT_GPO_V53= 0x32,
PHASE_ROT_TSYS_ADR_V53 = 0x33 | PHASE_ROT_PORT00,
PHASE_ROT_TSYS_DP18_V53 = 0x33 | PHASE_ROT_PORT11,
diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.H
index dbc6be40f..1838834cc 100644
--- a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.H
+++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdTermData.H
@@ -50,8 +50,9 @@ namespace fapi
// special processing flags to be added on to the MBvpdTermData value
enum MBvpdTermDataSpecial
{
- TERM_DATA_HIGH_NIBBLE = 0x0100, //bits 4:7 shifted right 4
- TERM_DATA_LOW_NIBBLE = 0x0200, //bits 0:3
+ TERM_DATA_HIGH_NIBBLE = 0x0100, //bits 0:3 of MSB 0 to LSB 7
+ // shifted right 4
+ TERM_DATA_LOW_NIBBLE = 0x0200, //bits 4:7 of MSB 0 to LSB 7
};
// mask to isolate special processing flags
const uint16_t TERM_DATA_SPECIAL_MASK = 0x0300;
@@ -95,8 +96,8 @@ const uint8_t TERM_DATA_CHK60 = 0x40; // check version for keyword to use
// as a uint32. The offset is incremented by only 2 to get the next vpd value.
TERM_DATA_CKE_PRI_MAP = 0x36, //uint32_t [2]
TERM_DATA_CKE_PWR_MAP = 0x38, //uint32_t [2]
- TERM_DATA_RLO = 0x3c|TERM_DATA_CHK60|TERM_DATA_HIGH_NIBBLE, //uint8_t[2]
- TERM_DATA_WLO = 0x3c|TERM_DATA_CHK60|TERM_DATA_LOW_NIBBLE, //uint8_t[2]
+ TERM_DATA_RLO = 0x3c|TERM_DATA_CHK60|TERM_DATA_LOW_NIBBLE, //uint8_t[2]
+ TERM_DATA_WLO = 0x3c|TERM_DATA_CHK60|TERM_DATA_HIGH_NIBBLE, //uint8_t[2]
TERM_DATA_GPO = 0x3d|TERM_DATA_CHK60, //uint8_t[2]
};
}
diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.H
new file mode 100644
index 000000000..29f6d39c2
--- /dev/null
+++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.H
@@ -0,0 +1,59 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMBvpdVersion.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: getMBvpdVersion.H,v 1.1 2013/10/30 21:04:08 whs Exp $
+/**
+ * @file getMBvpdVersion.H
+ *
+ * @brief MBVPD Accessor for providing the ATTR_VPD_VERSION attribute
+ */
+
+#ifndef _HWP_GETMBVPDVERSION_
+#define _HWP_GETMBVPDVERSION_
+
+#include <fapi.H>
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode (*getMBvpdVersion_FP_t)
+ (const fapi::Target &, uint32_t &);
+
+extern "C"
+{
+/**
+ * @brief Get the ATTR_VPD_VERSION FAPI attribute
+ *
+ * Return the VPD version from MBvpd record VINI keyword VZ.
+ *
+ * The ATTR_VPD_VERSION attribute is associated with a DIMM. The platfrom must
+ * get the associated MBA chip to be passed to this hwp accessor.
+ *
+ * @param[in] i_mbaTarget - Reference to mba Target
+ * @param[out] o_val - Filled in with vpd version
+ *
+ * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code
+ */
+fapi::ReturnCode getMBvpdVersion(
+ const fapi::Target & i_mbaTarget,
+ uint32_t & o_val);
+}
+
+#endif
diff --git a/src/include/usr/hwpf/hwpf_reasoncodes.H b/src/include/usr/hwpf/hwpf_reasoncodes.H
index 6b151a998..9babe4e05 100644
--- a/src/include/usr/hwpf/hwpf_reasoncodes.H
+++ b/src/include/usr/hwpf/hwpf_reasoncodes.H
@@ -60,7 +60,7 @@ namespace fapi
MOD_VDDR_PROC_MSG = 0x15,
MOD_VDDR_PROC_VDDR_MSG = 0x16,
MOD_VDDR_SEND_MSG = 0x17,
- MOD_PLAT_ATTR_SVC_GET_MIRR_DATA = 0x18,
+ MOD_PLAT_ATTR_SVC_GET_VPD_VERSION = 0x18,
MOD_PLAT_ATTR_SVC_GET_SPARE_DATA = 0x19,
MOD_PLAT_ATTR_SVC_GET_BADDQ_DATA = 0x1A,
MOD_PLAT_ATTR_SVC_SET_BADDQ_DATA = 0x1B,
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
index d25c13c4b..0c4c7d855 100644
--- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
+++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
@@ -49,6 +49,8 @@
#include <hwpf/hwp/mvpd_accessors/getMBvpdTermData.H>
#include <hwpf/hwp/mvpd_accessors/getMBvpdSlopeInterceptData.H>
#include <hwpf/hwp/mvpd_accessors/getMBvpdSpareDramData.H>
+#include <hwpf/hwp/mvpd_accessors/getMBvpdVersion.H>
+#include <hwpf/hwp/mvpd_accessors/getMBvpdDram2NModeEnabled.H>
#include <hwpf/hwp/spd_accessors/getSpdAttrAccessor.H>
#include <vpd/spdenums.H>
#include <dimmConsts.H>
@@ -470,13 +472,13 @@ fapi::ReturnCode fapiPlatGetPhaseRotatorData (
* the Address Mirroring Data attributes
* It should not be called directly.
*
- * @param[in] i_pTarget Target DIMM pointer
- * @param[out] o_val Address Mirroring Data for DIMM
+ * @param[in] i_pTarget Target mba pointer
+ * @param[out] o_val Address Mirroring Data for mba
* @return ReturnCode. Zero on success, else platform specified error
*/
fapi::ReturnCode fapiPlatGetAddrMirrorData (
const fapi::Target * i_pTarget,
- uint8_t &o_val);
+ uint8_t (&o_val) [2][2] );
/**
* @brief This function is called by the FAPI_ATTR_GET macro when getting
@@ -527,6 +529,31 @@ fapi::ReturnCode fapiPlatDimmGetBadDqBitmap (
const fapi::Target * i_pTarget,
uint8_t (&o_data)[DIMM_DQ_MAX_DIMM_RANKS]
[DIMM_DQ_RANK_BITMAP_SIZE]);
+/**
+ * @brief This function is called by the FAPI_ATTR_GET macro when getting
+ * the vpd version
+ * It should not be called directly.
+ *
+ * @param[in] i_pTarget Target DIMM pointer
+ * @param[out] o_val vpd version
+ * @return ReturnCode. Zero on success, else platform specified error
+ */
+fapi::ReturnCode fapiPlatGetVpdVersion (
+ const fapi::Target * i_pTarget,
+ uint32_t & o_val );
+
+/**
+ * @brief This function is called by the FAPI_ATTR_GET macro when getting
+ * the Dram 2N Mode Enabled attribute
+ * It should not be called directly.
+ *
+ * @param[in] i_pTarget Target mba pointer
+ * @param[out] o_val Dram 2N Mode Enabled attr enumeration value
+ * @return ReturnCode. Zero on success, else platform specified error
+ */
+fapi::ReturnCode fapiPlatGetDram2NModeEnabled (
+ const fapi::Target * i_pTarget,
+ uint8_t & o_val );
/**
* @brief This function is called by the FAPI_ATTR_SET macro when setting
@@ -1597,4 +1624,20 @@ fapi::ReturnCode fapiPlatGetSpdAttrAccessor (
fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \
fapi::platAttrSvc::fapiPlatGetZeroAttrData(&VAL, sizeof(VAL))
+//------------------------------------------------------------------------------
+// MACROS to support MBVPD Get vpd version attribute
+//------------------------------------------------------------------------------
+#define ATTR_VPD_VERSION_GETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetVpdVersion\
+ (PTARGET, VAL)
+
+//------------------------------------------------------------------------------
+// MACROS to support MBVPD Get Dram 2N Mode Enabled
+//------------------------------------------------------------------------------
+#define ATTR_VPD_DRAM_2N_MODE_ENABLED_GETMACRO(ID, PTARGET, VAL)\
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS : fapi::platAttrSvc::fapiPlatGetDram2NModeEnabled\
+ (PTARGET, VAL)
+
#endif // FAPIPLATATTRIBUTESERVICE_H_
OpenPOWER on IntegriCloud