summaryrefslogtreecommitdiffstats
path: root/src/import
diff options
context:
space:
mode:
authorJoe McGill <jmcgill@us.ibm.com>2017-11-07 15:14:38 -0600
committerChristian R. Geddes <crgeddes@us.ibm.com>2017-12-14 18:55:33 -0500
commit2b0de939d297c40b6727a50b9a9e36a08445a13b (patch)
tree644483f539f38192090dbe2e03d592999c1df02f /src/import
parentb7bc33f10f895a54c2b700d32302981f658a497e (diff)
downloadtalos-hostboot-2b0de939d297c40b6727a50b9a9e36a08445a13b.tar.gz
talos-hostboot-2b0de939d297c40b6727a50b9a9e36a08445a13b.zip
support customized application of filter PLL buckets from AW MVPD keyword
pervasive_attributes.xml sbe_attributes.xml create ATTR_FILTER_PLL_BUCKET to encapsulate BGoffset selection p9.filter.pll.overlay.scan.initfile generate correct BGoffset value based on ATTR_FILTER_PLL_BUCKET value build must process 4x (ATTR values 1..4) to generate set of ring images p9_xip_customize.C consume AW keyword from MVPD, set ATTR_FILTER_PLL_BUCKET for HB platform and customize into SBE image if attribute is present in image p9_sbe_npll_initf.C p9_sbe_npll_initf_errors.xml re-scan perv_pll_bndy ring with selected BGoffset overlay when ATTR_fILTER_PLL_BUCKET is non-zero p9_sbe_chiplet_pll_initf.C p9_sbe_chiplet_pll_initf_errors.xml adapt to error XML updates in p9_sbe_npll_initf Change-Id: Id09074d12e95ffc44337e32ec683056d8ec390f3 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49442 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Claus M. Olsen <cmolsen@us.ibm.com> Reviewed-by: Sumit Kumar <sumit_kumar@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/49459 Reviewed-by: Hostboot Team <hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/import')
-rw-r--r--src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C88
-rwxr-xr-xsrc/import/chips/p9/procedures/xml/attribute_info/pervasive_attributes.xml10
-rwxr-xr-xsrc/import/chips/p9/procedures/xml/error_info/p9_sbe_chiplet_pll_initf_errors.xml8
-rwxr-xr-xsrc/import/chips/p9/procedures/xml/error_info/p9_sbe_npll_initf_errors.xml14
-rw-r--r--src/import/chips/p9/procedures/xml/error_info/p9_xip_customize_errors.xml11
5 files changed, 118 insertions, 13 deletions
diff --git a/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C b/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C
index 2fdb46607..bfc425dca 100644
--- a/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C
+++ b/src/import/chips/p9/procedures/hwp/customize/p9_xip_customize.C
@@ -73,6 +73,8 @@ enum ChipPosIdentifier
EC_POSITION = 0x00800000
};
+const uint8_t MAX_FILTER_PLL_BUCKETS = 4;
+
typedef struct
{
//Read as:0000 0000 000X 000X 000X 000X 000X 000X (binary;X=[0,1]) EQ:[0:05]
@@ -166,32 +168,27 @@ fapi2::ReturnCode writeMboxRegs (
// for backwards compatiblity with images that don't contain
// the OB/MC PLL bucket attributes, ensure that the item exists
// prior to attempting an update which would otherwise fail
- if (p9_xip_find(i_image, "ATTR_OB0_PLL_BUCKET", &l_item) !=
- P9_XIP_ITEM_NOT_FOUND)
+ if (!p9_xip_find(i_image, "ATTR_OB0_PLL_BUCKET", &l_item))
{
MBOX_ATTR_WRITE(ATTR_OB0_PLL_BUCKET, i_procTarget, i_image);
}
- if (p9_xip_find(i_image, "ATTR_OB1_PLL_BUCKET", &l_item) !=
- P9_XIP_ITEM_NOT_FOUND)
+ if (!p9_xip_find(i_image, "ATTR_OB1_PLL_BUCKET", &l_item))
{
MBOX_ATTR_WRITE(ATTR_OB1_PLL_BUCKET, i_procTarget, i_image);
}
- if (p9_xip_find(i_image, "ATTR_OB2_PLL_BUCKET", &l_item) !=
- P9_XIP_ITEM_NOT_FOUND)
+ if (!p9_xip_find(i_image, "ATTR_OB2_PLL_BUCKET", &l_item))
{
MBOX_ATTR_WRITE(ATTR_OB2_PLL_BUCKET, i_procTarget, i_image);
}
- if (p9_xip_find(i_image, "ATTR_OB3_PLL_BUCKET", &l_item) !=
- P9_XIP_ITEM_NOT_FOUND)
+ if (!p9_xip_find(i_image, "ATTR_OB3_PLL_BUCKET", &l_item))
{
MBOX_ATTR_WRITE(ATTR_OB3_PLL_BUCKET, i_procTarget, i_image);
}
- if (p9_xip_find(i_image, "ATTR_MC_PLL_BUCKET", &l_item) !=
- P9_XIP_ITEM_NOT_FOUND)
+ if (!p9_xip_find(i_image, "ATTR_MC_PLL_BUCKET", &l_item))
{
MBOX_ATTR_WRITE(ATTR_MC_PLL_BUCKET, FAPI_SYSTEM, i_image);
}
@@ -1950,12 +1947,79 @@ ReturnCode p9_xip_customize (
FAPI_DBG("Input image size: %d", l_inputImageSize);
+#ifndef WIN32
+
///////////////////////////////////////////////////////////////////////////
- // CUSTOMIZE item: Write mailbox attributes
+ // CUSTOMIZE item: Update Filter PLL attribute from MVPD AW keyword
// System phase: HB_SBE
///////////////////////////////////////////////////////////////////////////
-#ifndef WIN32
+ if (i_sysPhase == SYSPHASE_HB_SBE)
+ {
+ uint8_t l_filterPllBucket = 0;
+ uint32_t l_sizeMvpdFieldExpected = 4;
+ uint32_t l_sizeMvpdField = 0;
+ uint8_t* l_bufMvpdField = (uint8_t*)i_ringBuf1;
+ P9XipItem l_item;
+
+ FAPI_TRY( getMvpdField(MVPD_RECORD_CP00,
+ MVPD_KEYWORD_AW,
+ i_procTarget,
+ NULL,
+ l_sizeMvpdField),
+ "getMvpdField(NULL buffer) failed w/rc=0x%08x",
+ (uint64_t)fapi2::current_err );
+
+ FAPI_ASSERT( l_sizeMvpdField == l_sizeMvpdFieldExpected,
+ fapi2::XIPC_MVPD_FIELD_SIZE_MESS().
+ set_CHIP_TARGET(i_procTarget).
+ set_MVPD_FIELD_SIZE(l_sizeMvpdField).
+ set_EXPECTED_SIZE(l_sizeMvpdFieldExpected),
+ "MVPD field size bug:\n"
+ " Returned MVPD field size of AW keyword = %d\n"
+ " Anticipated MVPD field size = %d",
+ l_sizeMvpdField,
+ l_sizeMvpdFieldExpected );
+
+ FAPI_TRY( getMvpdField(MVPD_RECORD_CP00,
+ MVPD_KEYWORD_AW,
+ i_procTarget,
+ l_bufMvpdField,
+ l_sizeMvpdField),
+ "getMvpdField(valid buffer) failed w/rc=0x%08x",
+ (uint64_t)fapi2::current_err );
+
+ // extract data
+ l_filterPllBucket = (uint8_t)(*l_bufMvpdField);
+
+ FAPI_ASSERT( l_filterPllBucket <= MAX_FILTER_PLL_BUCKETS,
+ fapi2::XIPC_MVPD_AW_FIELD_VALUE_ERR().
+ set_CHIP_TARGET(i_procTarget).
+ set_MVPD_VALUE(l_filterPllBucket),
+ "MVPD AW field bug:\n"
+ " Value of filter PLL bucket select = %d\n"
+ " Anticipated range = 0..%d\n",
+ l_filterPllBucket,
+ MAX_FILTER_PLL_BUCKETS );
+
+ // set FAPI attribute
+ FAPI_TRY(FAPI_ATTR_SET( fapi2::ATTR_FILTER_PLL_BUCKET,
+ i_procTarget,
+ l_filterPllBucket ),
+ "Error from FAPI_ATTR_SET (ATTR_FILTER_PLL_BUCKET)" );
+
+ // customize attribute in SBE image, if field exists
+ if (!p9_xip_find(io_image, "ATTR_FILTER_PLL_BUCKET", &l_item))
+ {
+ MBOX_ATTR_WRITE(ATTR_FILTER_PLL_BUCKET, i_procTarget, io_image);
+ }
+ }
+
+
+ ///////////////////////////////////////////////////////////////////////////
+ // CUSTOMIZE item: Write mailbox attributes
+ // System phase: HB_SBE
+ ///////////////////////////////////////////////////////////////////////////
if (i_sysPhase == SYSPHASE_HB_SBE)
{
diff --git a/src/import/chips/p9/procedures/xml/attribute_info/pervasive_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/pervasive_attributes.xml
index 25648f418..4c7cc2bc6 100755
--- a/src/import/chips/p9/procedures/xml/attribute_info/pervasive_attributes.xml
+++ b/src/import/chips/p9/procedures/xml/attribute_info/pervasive_attributes.xml
@@ -141,6 +141,16 @@
</attribute>
<attribute>
+ <id>ATTR_FILTER_PLL_BUCKET</id>
+ <targetType>TARGET_TYPE_PROC_CHIP</targetType>
+ <description>Select Filter PLL BGoffset programming</description>
+ <valueType>uint8</valueType>
+ <persistRuntime/>
+ <writeable/>
+ <initToZero/>
+</attribute>
+
+<attribute>
<id>ATTR_OB0_PLL_BUCKET</id>
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
<description>Select OBUS0 pll setting from one of the supported frequencies</description>
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_sbe_chiplet_pll_initf_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_sbe_chiplet_pll_initf_errors.xml
index 7647500ef..d90fd65ea 100755
--- a/src/import/chips/p9/procedures/xml/error_info/p9_sbe_chiplet_pll_initf_errors.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_sbe_chiplet_pll_initf_errors.xml
@@ -48,4 +48,12 @@
<ffdc>OB3_BUCKET_INDEX</ffdc>
</hwpError>
<!-- ******************************************************************** -->
+ <hwpError>
+ <sbeError/>
+ <rc>RC_P9_SBE_CHIPLET_PLL_INITF_UNSUPPORTED_MC_BUCKET</rc>
+ <description>Unsupported MC PLL bucket select</description>
+ <ffdc>TARGET</ffdc>
+ <ffdc>BUCKET_INDEX</ffdc>
+ </hwpError>
+ <!-- ******************************************************************** -->
</hwpErrors>
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_sbe_npll_initf_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_sbe_npll_initf_errors.xml
index 8fc8a2500..842783c76 100755
--- a/src/import/chips/p9/procedures/xml/error_info/p9_sbe_npll_initf_errors.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_sbe_npll_initf_errors.xml
@@ -27,7 +27,7 @@
<!-- ******************************************************************** -->
<hwpError>
<sbeError/>
- <rc>RC_P9_SBE_NPLL_INITF_UNSUPPORTED_BUCKET</rc>
+ <rc>RC_P9_SBE_NPLL_INITF_UNSUPPORTED_NPLL_BUCKET</rc>
<description>Unsupported Nest PLL bucket value</description>
<ffdc>TARGET</ffdc>
<ffdc>BUCKET_INDEX</ffdc>
@@ -37,4 +37,16 @@
</callout>
</hwpError>
<!-- ******************************************************************** -->
+ <hwpError>
+ <sbeError/>
+ <rc>RC_P9_SBE_NPLL_INITF_UNSUPPORTED_FPLL_BUCKET</rc>
+ <description>Unsupported Filter PLL bucket value</description>
+ <ffdc>TARGET</ffdc>
+ <ffdc>BUCKET_INDEX</ffdc>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>HIGH</priority>
+ </callout>
+ </hwpError>
+ <!-- ******************************************************************** -->
</hwpErrors>
diff --git a/src/import/chips/p9/procedures/xml/error_info/p9_xip_customize_errors.xml b/src/import/chips/p9/procedures/xml/error_info/p9_xip_customize_errors.xml
index 6ed8f88b6..c5a55f7d3 100644
--- a/src/import/chips/p9/procedures/xml/error_info/p9_xip_customize_errors.xml
+++ b/src/import/chips/p9/procedures/xml/error_info/p9_xip_customize_errors.xml
@@ -170,6 +170,17 @@
</hwpError>
<!-- ********************************************************************* -->
<hwpError>
+ <rc>RC_XIPC_MVPD_AW_FIELD_VALUE_ERR</rc>
+ <description>Out of range value observed in MVPD AW keyword</description>
+ <ffdc>CHIP_TARGET</ffdc>
+ <ffdc>MVPD_VALUE</ffdc>
+ <callout>
+ <procedure>CODE</procedure>
+ <priority>HIGH</priority>
+ </callout>
+ </hwpError>
+ <!-- ********************************************************************* -->
+ <hwpError>
<rc>RC_XIPC_RS4_REDUNDANT_ERROR</rc>
<description>rs4_redundant() failed</description>
<ffdc>CHIP_TARGET</ffdc>
OpenPOWER on IntegriCloud