summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2014-05-27 12:48:02 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-06-20 08:27:34 -0500
commit6a1ea51b2dca043f511ca8e2292b231b59ac8239 (patch)
treed33acd45e31507a29f68171fac7300868b9fb546 /src/usr/hwpf
parent244f33086e5acfb2fa91b9438cdbc223c602dcb2 (diff)
downloadtalos-hostboot-6a1ea51b2dca043f511ca8e2292b231b59ac8239.tar.gz
talos-hostboot-6a1ea51b2dca043f511ca8e2292b231b59ac8239.zip
SW262686: INITPROC: FSP&Hostboot - support customization of Centaur ref
CQ:SW262686 Change-Id: I4800d0c66c7e493b5ff7724b5d052765aa02dff5 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11300 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf')
-rw-r--r--src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_delta_scan_rw.h3
-rw-r--r--src/usr/hwpf/hwp/sbe_centaur_init/cen_xip_customize.C70
-rw-r--r--src/usr/hwpf/hwp/sbe_centaur_init/cen_xip_customize_errors.xml8
-rw-r--r--src/usr/hwpf/hwp/system_attributes.xml21
4 files changed, 98 insertions, 4 deletions
diff --git a/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_delta_scan_rw.h b/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_delta_scan_rw.h
index 4fb0df735..f76973185 100644
--- a/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_delta_scan_rw.h
+++ b/src/usr/hwpf/hwp/build_winkle_images/p8_slw_build/p8_delta_scan_rw.h
@@ -20,7 +20,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: p8_delta_scan_rw.h,v 1.48 2013/12/03 05:45:04 cmolsen Exp $
+// $Id: p8_delta_scan_rw.h,v 1.49 2014/05/13 13:31:51 jmcgill Exp $
#define OVERRIDE_OFFSET 8 // Byte offset of forward pointer's addr relative
// to base forward pointer's addr.
#define SIZE_IMAGE_BUF_MAX 5000000 // Max ~5MB image buffer size.
@@ -52,6 +52,7 @@
#define STANDALONE_MBOX3_VALUE_TOC_NAME "standalone_mbox3_value"
#define UNTRUSTED_BAR_TOC_NAME "fabric_config"
#define UNTRUSTED_PBA_BAR_TOC_NAME "fabric_config_pba"
+#define REFCLOCK_TERM_TOC_NAME "refclock_term"
/***** Scan setting *****/
#define OPCG_SCAN_RATIO 4
diff --git a/src/usr/hwpf/hwp/sbe_centaur_init/cen_xip_customize.C b/src/usr/hwpf/hwp/sbe_centaur_init/cen_xip_customize.C
index b51f0e4be..876c72f80 100644
--- a/src/usr/hwpf/hwp/sbe_centaur_init/cen_xip_customize.C
+++ b/src/usr/hwpf/hwp/sbe_centaur_init/cen_xip_customize.C
@@ -20,7 +20,7 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-// $Id: cen_xip_customize.C,v 1.12 2013/12/03 05:46:24 cmolsen Exp $
+// $Id: cen_xip_customize.C,v 1.14 2014/05/28 21:17:25 thi Exp $
/*------------------------------------------------------------------------------*/
/* *! TITLE : cen_xip_customize.C */
/* *! DESCRIPTION : Customizes Centaur images from a Centaur reference image. */
@@ -46,6 +46,14 @@ extern "C" {
using namespace fapi;
+
+const uint32_t FSI_GP4_DMI_REFCLOCK_TERM_START_BIT = 8;
+const uint32_t FSI_GP4_DMI_REFCLOCK_TERM_END_BIT = 9;
+
+const uint32_t FSI_GP4_DDR_REFCLOCK_TERM_START_BIT = 10;
+const uint32_t FSI_GP4_DDR_REFCLOCK_TERM_END_BIT = 11;
+
+
// Parameter list:
// const fapi::Target &i_target: Processor chip target.
// void *i_imageIn: Ptr to input image.
@@ -299,6 +307,66 @@ ReturnCode cen_xip_customize(const fapi::Target &i_target,
return rc;
}
+ // ==========================================================================
+ // CUSTOMIZE item: Centaur reference clock termination
+ // Retrieval method: Attribute.
+ // ==========================================================================
+
+ uint8_t attrDMIRefclockTerm;
+ uint8_t attrDDRRefclockTerm;
+ SbeXipItem xipTocItem;
+ void *xipTocItemPtr;
+ uint64_t *refclockTermPtr;
+ ecmdDataBufferBase refclockTerm(64);
+ SBE_XIP_ERROR_STRINGS(errorStrings);
+
+ rc = FAPI_ATTR_GET(ATTR_MEMB_DMI_REFCLOCK_RCVR_TERM, NULL, attrDMIRefclockTerm);
+ if (rc) {
+ FAPI_ERR("FAPI_ATTR_GET(ATTR_MEMB_DMI_REFCLOCK_RCVR_TERM) returned error.\n");
+ return rc;
+ }
+
+ rc = FAPI_ATTR_GET(ATTR_MEMB_DDR_REFCLOCK_RCVR_TERM, NULL, attrDDRRefclockTerm);
+ if (rc) {
+ FAPI_ERR("FAPI_ATTR_GET(ATTR_MEMB_DDR_REFCLOCK_RCVR_TERM) returned error.\n");
+ return rc;
+ }
+
+ // form customization data
+ rcLoc |= refclockTerm.insertFromRight(attrDMIRefclockTerm,
+ FSI_GP4_DMI_REFCLOCK_TERM_START_BIT,
+ (FSI_GP4_DMI_REFCLOCK_TERM_END_BIT-
+ FSI_GP4_DMI_REFCLOCK_TERM_START_BIT+1));
+ rcLoc |= refclockTerm.insertFromRight(attrDDRRefclockTerm,
+ FSI_GP4_DDR_REFCLOCK_TERM_START_BIT,
+ (FSI_GP4_DDR_REFCLOCK_TERM_END_BIT-
+ FSI_GP4_DDR_REFCLOCK_TERM_START_BIT+1));
+
+ if (rcLoc) {
+ FAPI_ERR("Error 0x%x forming refclock termination data buffer", rcLoc);
+ rc.setEcmdError(rcLoc);
+ return rc;
+ }
+
+ // look up customization location
+ rcLoc = sbe_xip_find(i_imageOut, REFCLOCK_TERM_TOC_NAME, &xipTocItem);
+ if (rcLoc) {
+ FAPI_ERR("sbe_xip_find() failed w/rc=%i and %s", rcLoc, SBE_XIP_ERROR_STRING(errorStrings, rcLoc));
+ FAPI_ERR("Probable cause:");
+ FAPI_ERR("\tThe keyword (=%s) was not found.", REFCLOCK_TERM_TOC_NAME);
+ uint32_t & RC_LOCAL = rcLoc;
+ FAPI_SET_HWP_ERROR(rc, RC_CEN_XIPC_KEYWORD_NOT_FOUND_ERROR);
+ return rc;
+ }
+
+ sbe_xip_pore2host(i_imageOut, xipTocItem.iv_address, &xipTocItemPtr);
+ refclockTermPtr = (uint64_t*)xipTocItemPtr;
+ *(refclockTermPtr + 0) = myRev64(refclockTerm.getDoubleWord(0));
+
+ //
+ // Done
+ //
+
sbe_xip_image_size( i_imageOut, &io_sizeImageOut);
return rc;
diff --git a/src/usr/hwpf/hwp/sbe_centaur_init/cen_xip_customize_errors.xml b/src/usr/hwpf/hwp/sbe_centaur_init/cen_xip_customize_errors.xml
index 74a895808..578906b6e 100644
--- a/src/usr/hwpf/hwp/sbe_centaur_init/cen_xip_customize_errors.xml
+++ b/src/usr/hwpf/hwp/sbe_centaur_init/cen_xip_customize_errors.xml
@@ -20,7 +20,7 @@
<!-- permissions and limitations under the License. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
-<!-- $Id: cen_xip_customize_errors.xml,v 1.2 2013/05/07 22:56:26 wenning Exp $ -->
+<!-- $Id: cen_xip_customize_errors.xml,v 1.3 2014/05/13 13:34:01 jmcgill Exp $ -->
<!-- Error definitions for proc_slw_build procedure -->
<hwpErrors>
<!-- *********************************************************************** -->
@@ -65,4 +65,10 @@
<ffdc>DATA_RING_BLOCK_SIZEOFTHIS</ffdc>
</hwpError>
<!-- *********************************************************************** -->
+<hwpError>
+ <rc>RC_CEN_XIPC_KEYWORD_NOT_FOUND_ERROR</rc>
+ <description>A keyword in the XIP image was not found.</description>
+ <ffdc>RC_LOCAL</ffdc>
+</hwpError>
+<!-- *********************************************************************** -->
</hwpErrors>
diff --git a/src/usr/hwpf/hwp/system_attributes.xml b/src/usr/hwpf/hwp/system_attributes.xml
index 55ef39567..997c20782 100644
--- a/src/usr/hwpf/hwp/system_attributes.xml
+++ b/src/usr/hwpf/hwp/system_attributes.xml
@@ -21,7 +21,6 @@
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
<!-- $Id: system_attributes.xml,v 1.22 2014/05/23 01:13:54 whs Exp $ -->
-
<!--
XML file specifying HWPF attributes.
These are platInit attributes associated with the system.
@@ -277,6 +276,26 @@
</attribute>
<!-- ********************************************************************* -->
<attribute>
+ <id>ATTR_MEMB_DMI_REFCLOCK_RCVR_TERM</id>
+ <targetType>TARGET_TYPE_SYSTEM</targetType>
+ <description>
+ Defines system specific value of DMI refclock receiver termination (FSI GP4 bits 8:9)
+ </description>
+ <valueType>uint8</valueType>
+ <platInit/>
+ </attribute>
+ <!-- ********************************************************************* -->
+ <attribute>
+ <id>ATTR_MEMB_DDR_REFCLOCK_RCVR_TERM</id>
+ <targetType>TARGET_TYPE_SYSTEM</targetType>
+ <description>
+ Defines system specific value of DDR refclock receiver termination (FSI GP4 bits 10:11)
+ </description>
+ <valueType>uint8</valueType>
+ <platInit/>
+ </attribute>
+ <!-- ********************************************************************* -->
+ <attribute>
<id>ATTR_MEM_FILTER_PLL_SOURCE</id>
<targetType>TARGET_TYPE_SYSTEM</targetType>
<description>
OpenPOWER on IntegriCloud