summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Jones <mjjones@us.ibm.com>2013-04-10 08:59:32 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-04-22 17:05:26 -0500
commita3328662434e2d600106c75d5b571482855eabf3 (patch)
tree978eeb286f3923c5ae6a6185cf4540d83ef78928
parent399a43d3c6ffb46f6941434e02844ad2ab4da447 (diff)
downloadtalos-hostboot-a3328662434e2d600106c75d5b571482855eabf3.tar.gz
talos-hostboot-a3328662434e2d600106c75d5b571482855eabf3.zip
HWPF: Add MVPD Accessor HWP to retrieve ATTR_EX_L2_SINGLE_MEMBER_ENABLE
The existing code supports ATTR_EX_L2_SINGLE_MEMBER_ENABLE with a zero-init Targeting attribute, but this is just a temporary hack. This data is in MVPD and each platform supports it by calling a common VPD accessor HWP. Change-Id: Id9efbd762aafb3e80b5997024c09038297fe86a9 RTC: 64824 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3989 Tested-by: Jenkins Server Reviewed-by: William H. Schwartz <whs@us.ibm.com> Reviewed-by: KUMAR V. CHALLA <kvchalla@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rw-r--r--src/include/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.H72
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatAttributeService.H18
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.C124
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk6
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml53
-rw-r--r--src/usr/hwpf/plat/fapiPlatAttributeService.C12
-rw-r--r--src/usr/targeting/common/xmltohb/attribute_types.xml22
-rw-r--r--src/usr/targeting/common/xmltohb/target_types.xml1
8 files changed, 260 insertions, 48 deletions
diff --git a/src/include/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.H b/src/include/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.H
new file mode 100644
index 000000000..f3ba8df79
--- /dev/null
+++ b/src/include/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.H
@@ -0,0 +1,72 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.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: getMvpdExL2SingleMemberEnable.H,v 1.1 2013/04/10 22:02:29 mjjones Exp $
+/**
+ * @file getMvpdExL2SingleMemberEnable.H
+ *
+ * @brief MVPD Accessor for providing the ATTR_EX_L2_SINGLE_MEMBER_ENABLE
+ * attribute
+ */
+
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * mjjones 04/10/2013 Created.
+ */
+
+#ifndef _HWP_GETMVPDEXL2SINGLEMEMBERENABLE_
+#define _HWP_GETMVPDEXL2SINGLEMEMBERENABLE_
+
+#include <fapi.H>
+
+// function pointer typedef definition for HWP call support
+typedef fapi::ReturnCode (*getMvpdExL2SingleMemberEnable_FP_t)
+ (const fapi::Target &, uint32_t &);
+
+extern "C"
+{
+/**
+ * @brief Get the ATTR_EX_L2_SINGLE_MEMBER_ENABLE FAPI attribute
+ *
+ * This data in MVPD indicates which EX chiplets must be configured with the L2
+ * cache in single member mode. The data is used by the p8_xip_customize HWP. It
+ * is used by the FSP platform to build the IPL image, and the Hostboot platform
+ * to build the SLW image. The data is a bit-field.
+ *
+ * @param[in] i_procTarget - Reference to Processor Chip FAPI Target
+ * @param[out] o_val - Filled in with attribute value
+ * 0x00008000 - EX00 single member enable
+ * 0x00004000 - EX01 single member enable
+ * <snip>
+ * 0x00000002 - EX14 single member enable
+ * 0x00000001 - EX15 single member enable
+ *
+ * @return fapi::ReturnCode FAPI_RC_SUCCESS if success, else error code
+ */
+fapi::ReturnCode getMvpdExL2SingleMemberEnable(
+ const fapi::Target & i_procTarget,
+ uint32_t & o_val);
+}
+
+#endif
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
index f9834bddd..9715626dc 100644
--- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
+++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
@@ -412,6 +412,18 @@ fapi::ReturnCode fapiPlatGetProcPcieBarSize (
const fapi::Target * i_pTarget,
uint64_t (&o_pcieBarSize) [3][3] );
+/**
+ * @brief This function is called by the FAPI_ATTR_GET macro when getting
+ * ATTR_EX_L2_SINGLE_MEMBER_ENABLE. It should not be called directly.
+ *
+ * @param[in] i_pTarget Target pointer
+ * @param[out] o_val ATTR_EX_L2_SINGLE_MEMBER_ENABLE value
+ * @return ReturnCode. Zero on success, else platform specified error
+ */
+fapi::ReturnCode fapiPlatGetSingleMemberEnableAttr(
+ const fapi::Target * i_pTarget,
+ uint32_t & o_val);
+
} // namespace platAttrSvc
} // namespace fapi
@@ -706,4 +718,10 @@ fapi::ReturnCode fapiPlatGetProcPcieBarSize (
fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ? fapi::FAPI_RC_SUCCESS : \
fapi::platAttrSvc::fapiPlatGetEnableAttr ( fapi::ID, PTARGET, VAL )
+//------------------------------------------------------------------------------
+// MACROS to support MVPD attributes
+//------------------------------------------------------------------------------
+#define ATTR_EX_L2_SINGLE_MEMBER_ENABLE_GETMACRO( ID, PTARGET, VAL ) \
+ fapi::platAttrSvc::fapiPlatGetSingleMemberEnableAttr ( PTARGET, VAL )
+
#endif // FAPIPLATATTRIBUTESERVICE_H_
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.C b/src/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.C
new file mode 100644
index 000000000..ccd31d01d
--- /dev/null
+++ b/src/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.C
@@ -0,0 +1,124 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.C $ */
+/* */
+/* 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: getMvpdExL2SingleMemberEnable.C,v 1.1 2013/04/10 22:02:33 mjjones Exp $
+/**
+ * @file getMvpdExL2SingleMemberEnable.C
+ *
+ * @brief MVPD Accessor for providing the ATTR_EX_L2_SINGLE_MEMBER_ENABLE
+ * attribute
+ */
+
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * mjjones 04/10/2013 Created.
+ */
+
+#include <getMvpdExL2SingleMemberEnable.H>
+
+extern "C"
+{
+
+fapi::ReturnCode getMvpdExL2SingleMemberEnable(
+ const fapi::Target & i_procTarget,
+ uint32_t & o_val)
+{
+ /**
+ * @brief Structure of the LWP4 record, IN keyword MVPD field
+ * for the retrieval of the Single Member Enable data
+ *
+ * This could move to a common header file if multiple VPD Accessors need
+ * to get data from the LWP4 record, IN keyword MVPD field
+ */
+ struct MVPD_LWP4_IN
+ {
+ uint8_t iv_reserved0;
+ uint8_t iv_reserved1;
+ uint8_t iv_singleMemberEnable0_7;
+ uint8_t iv_singleMemberEnable8_15;
+ };
+
+ fapi::ReturnCode l_rc;
+ uint8_t * l_pField = NULL;
+ uint32_t l_fieldSize = 0;
+
+ FAPI_INF("getMvpdExL2SingleMemberEnable: entry");
+
+ // Call fapiGetMvpdField with a NULL pointer to get the field size
+ l_rc = fapiGetMvpdField(fapi::MVPD_RECORD_LWP4,
+ fapi::MVPD_KEYWORD_IN,
+ i_procTarget,
+ l_pField,
+ l_fieldSize);
+
+ if (l_rc)
+ {
+ FAPI_ERR("getMvpdExL2SingleMemberEnable: Error getting MVPD field size");
+ }
+ else
+ {
+ if (l_fieldSize < sizeof(MVPD_LWP4_IN))
+ {
+ FAPI_ERR("getMvpdExL2SingleMemberEnable: MVPD field too small (%d)",
+ l_fieldSize);
+ uint32_t & FIELD_SIZE = l_fieldSize;
+ FAPI_SET_HWP_ERROR(l_rc,
+ RC_MVPD_EX_L2_SINGLE_MEMBER_ENABLE_BAD_FIELD_SIZE);
+ }
+ else
+ {
+ // Allocate memory and call fapiGetMvpdField to get the field
+ l_pField = new uint8_t[l_fieldSize];
+
+ l_rc = fapiGetMvpdField(fapi::MVPD_RECORD_LWP4,
+ fapi::MVPD_KEYWORD_IN,
+ i_procTarget,
+ l_pField,
+ l_fieldSize);
+
+ if (l_rc)
+ {
+ FAPI_ERR(
+ "getMvpdExL2SingleMemberEnable: Error getting MVPD field");
+ }
+ else
+ {
+ MVPD_LWP4_IN * l_pData =
+ reinterpret_cast<MVPD_LWP4_IN *>(l_pField);
+
+ o_val = l_pData->iv_singleMemberEnable0_7;
+ o_val <<= 8;
+ o_val += l_pData->iv_singleMemberEnable8_15;
+
+ FAPI_INF("getMvpdExL2SingleMemberEnable: 0x%08x", o_val);
+ }
+
+ delete [] l_pField;
+ }
+ }
+
+ return l_rc;
+}
+
+}
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk b/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk
index 70aee6912..14a6c4ac9 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk
+++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk
@@ -5,7 +5,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2012
+# COPYRIGHT International Business Machines Corp. 2012,2013
#
# p1
#
@@ -21,10 +21,12 @@
#
# IBM_PROLOG_END_TAG
EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/mvpd_accessors
+EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp/mvpd_accessors
VPATH += mvpd_accessors
OBJS += getMvpdRing.o \
setMvpdRing.o \
- mvpdRingFuncs.o
+ mvpdRingFuncs.o \
+ getMvpdExL2SingleMemberEnable.o
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml b/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml
index 40a1410be..6730025b2 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml
+++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml
@@ -1,26 +1,26 @@
-<!-- IBM_PROLOG_BEGIN_TAG
- This is an automatically generated prolog.
-
- $Source: src/usr/hwpf/hwp/mvpd_pdr_errors.xml $
-
- 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 other-
- wise divested of its trade secrets, irrespective of what has
- been deposited with the U.S. Copyright Office.
-
- Origin: 30
-
- IBM_PROLOG_END_TAG -->
-
+<!-- IBM_PROLOG_BEGIN_TAG -->
+<!-- This is an automatically generated prolog. -->
+<!-- -->
+<!-- $Source: src/usr/hwpf/hwp/mvpd_accessors/mvpd_errors.xml $ -->
+<!-- -->
+<!-- IBM CONFIDENTIAL -->
+<!-- -->
+<!-- COPYRIGHT International Business Machines Corp. 2012,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: mvpd_errors.xml,v 1.3 2013/04/10 22:02:54 mjjones Exp $ -->
<hwpErrors>
<!-- *********************************************************************** -->
<hwpError>
@@ -75,4 +75,11 @@
</description>
</hwpError>
<!-- *********************************************************************** -->
+ <hwpError>
+ <rc>RC_MVPD_EX_L2_SINGLE_MEMBER_ENABLE_BAD_FIELD_SIZE</rc>
+ <description>
+ VPD Field size too small to contain the EX_L2_SINGLE_MEMBER_ENABLE data
+ </description>
+ <ffdc>FIELD_SIZE</ffdc>
+ </hwpError>
</hwpErrors>
diff --git a/src/usr/hwpf/plat/fapiPlatAttributeService.C b/src/usr/hwpf/plat/fapiPlatAttributeService.C
index af4a17ef0..da6e0f795 100644
--- a/src/usr/hwpf/plat/fapiPlatAttributeService.C
+++ b/src/usr/hwpf/plat/fapiPlatAttributeService.C
@@ -32,6 +32,7 @@
//******************************************************************************
#include <hwpf/fapi/fapiTarget.H>
+#include <hwpf/fapi/fapiHwpExecutor.H>
#include <targeting/common/targetservice.H>
#include <targeting/common/utilFilter.H>
#include <errl/errlentry.H>
@@ -39,6 +40,7 @@
#include <hwpf/hwpf_reasoncodes.H>
#include <vpd/spdenums.H>
#include <devicefw/driverif.H>
+#include <hwpf/hwp/mvpd_accessors/getMvpdExL2SingleMemberEnable.H>
// The following file checks at compile time that all HWPF attributes are
// handled by Hostboot. This is done to ensure that the HTML file listing
@@ -1422,6 +1424,16 @@ fapi::ReturnCode fapiPlatGetProcPcieBarSize (
return l_fapirc;
}
+fapi::ReturnCode fapiPlatGetSingleMemberEnableAttr(
+ const fapi::Target * i_pTarget,
+ uint32_t & o_val)
+{
+ // Call a VPD Accessor HWP to get the data
+ fapi::ReturnCode l_rc;
+ FAPI_EXEC_HWP(l_rc, getMvpdExL2SingleMemberEnable, *i_pTarget, o_val);
+ return l_rc;
+}
+
fapi::ReturnCode fapiPlatGetEnableAttr ( fapi::AttributeId i_id,
const fapi::Target * i_pTarget, uint8_t & o_enable )
{
diff --git a/src/usr/targeting/common/xmltohb/attribute_types.xml b/src/usr/targeting/common/xmltohb/attribute_types.xml
index 16071b650..1ff36becf 100644
--- a/src/usr/targeting/common/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/common/xmltohb/attribute_types.xml
@@ -10025,27 +10025,6 @@ Measured in GB</description>
<readable/>
</attribute>
-<!-- TODO: RTC story 64824: Need to review this attribute. Per John F, it calls VPD func to provide the value -->
-<attribute>
- <id>EX_L2_SINGLE_MEMBER_ENABLE</id>
- <description>
- Vector to communicate to SBE which EX chiplets must be configured with L2 in single member mode.
- One bit per EX chiplet, bit location aligned to chiplet ID
- (bit 16: EX00, bit 17: EX01, bit 18: EX02 ... bit 31: EX15)
- EX chiplets whose L2 must run in single member mode are marked by a '1'.
- </description>
- <simpleType>
- <uint32_t></uint32_t>
- </simpleType>
- <persistency>non-volatile</persistency>
- <readable/>
- <writeable/>
- <hwpfToHbAttrMap>
- <id>ATTR_EX_L2_SINGLE_MEMBER_ENABLE</id>
- <macro>DIRECT</macro>
- </hwpfToHbAttrMap>
-</attribute>
-
<!-- Note: This attribute is only used by FSP -->
<attribute>
<id>DMI_REFCLOCK_SWIZZLE</id>
@@ -10065,7 +10044,6 @@ Measured in GB</description>
</hwpfToHbAttrMap>
</attribute>
-<!-- TODO: RTC story 64824: Need to review this attribute and handle MRW data properly -->
<attribute>
<id>EI_BUS_TX_MSBSWAP</id>
<description>
diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml
index 3c319b867..5cbde3b91 100644
--- a/src/usr/targeting/common/xmltohb/target_types.xml
+++ b/src/usr/targeting/common/xmltohb/target_types.xml
@@ -434,7 +434,6 @@
<attribute><id>PROC_PB_BNDY_DMIPLL_SCAN_SELECT</id></attribute>
<attribute><id>PROC_AB_BNDY_PLL_SCAN_SELECT</id></attribute>
<attribute><id>PROC_PCI_BNDY_PLL_SCAN_SELECT</id></attribute>
- <attribute><id>EX_L2_SINGLE_MEMBER_ENABLE</id></attribute>
<attribute><id>PROC_PCIE_REFCLOCK_ENABLE</id></attribute>
<attribute><id>PROC_EX_FUNC_L3_DELTA_DATA</id></attribute>
<attribute><id>PROC_EX_FUNC_L3_LENGTH</id></attribute>
OpenPOWER on IntegriCloud