summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTerry J. Opie <opiet@us.ibm.com>2012-06-21 10:33:59 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-06-26 13:52:35 -0500
commit280e4323aaed2d4d58ea738f9bd004281b606067 (patch)
tree912506397c932cfcfb8dcbe69e294e36fbdf068c /src
parent6f7b9237e97caeed7796420294eb3fead65f2f98 (diff)
downloadblackbird-hostboot-280e4323aaed2d4d58ea738f9bd004281b606067.tar.gz
blackbird-hostboot-280e4323aaed2d4d58ea738f9bd004281b606067.zip
Misc SPD changes
- Bug fix for TRC_MIN keyword - Break out Byte 33 into separate keywords - Bug fix for Module Specific Checking Change-Id: I7c534827b0eb02855ef049d73c8d0521928671ef RTC: 43202 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1229 Tested-by: Jenkins Server Reviewed-by: MIKE J. JONES <mjjones@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/spd/spdenums.H47
-rwxr-xr-xsrc/usr/spd/spd.C45
-rwxr-xr-xsrc/usr/spd/spdDDR3.H49
-rwxr-xr-xsrc/usr/spd/test/spdtest.H2
4 files changed, 91 insertions, 52 deletions
diff --git a/src/include/usr/spd/spdenums.H b/src/include/usr/spd/spdenums.H
index b99738cc3..2c2d6582a 100644
--- a/src/include/usr/spd/spdenums.H
+++ b/src/include/usr/spd/spdenums.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/usr/spd/spdenums.H $
-//
-// 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
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/usr/spd/spdenums.H $
+ *
+ * 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
+ */
/**
* @file spdenums.H
*
@@ -113,6 +114,8 @@ enum
SDRAM_OPTIONAL_FEATURES = SPD_FIRST_NORM_KEYWORD | 0x3d,
SDRAM_THERMAL_REFRESH_OPTIONS = SPD_FIRST_NORM_KEYWORD | 0x3e,
DIMM_BAD_DQ_DATA = SPD_FIRST_NORM_KEYWORD | 0x3f,
+ SDRAM_DIE_COUNT = SPD_FIRST_NORM_KEYWORD | 0x40,
+ SDRAM_DEVICE_TYPE_SIGNAL_LOADING = SPD_FIRST_NORM_KEYWORD | 0x41,
SPD_LAST_NORM_KEYWORD,
// ==============================================================
diff --git a/src/usr/spd/spd.C b/src/usr/spd/spd.C
index 6786ad689..ff75cc83c 100755
--- a/src/usr/spd/spd.C
+++ b/src/usr/spd/spd.C
@@ -736,7 +736,7 @@ errlHndl_t spdSpecialCases ( KeywordData i_kwdData,
break;
// ==================================================
- // 2 byte - MSB then LSB is 2 less than MSB
+ // 2 byte - MSB with mask then LSB is 2 more than MSB
case TRC_MIN:
// Check Size of buffer
err = spdCheckSize( io_buflen,
@@ -761,7 +761,7 @@ errlHndl_t spdSpecialCases ( KeywordData i_kwdData,
}
// Get LSB
- err = spdFetchData( (i_kwdData.offset - 2),
+ err = spdFetchData( (i_kwdData.offset + 2),
1, /* Read 1 byte at a time */
&tmpBuffer[1],
i_target );
@@ -1314,11 +1314,44 @@ errlHndl_t checkModSpecificKeyword ( KeywordData i_kwdData,
break;
}
- // To check the module specific flags, also need the Module Type value
- // from byte 3.
+ KeywordData * modTypeEntry = NULL;
+ err = getKeywordEntry( MODULE_TYPE,
+ i_memType,
+ modTypeEntry );
+
+ if( err )
+ {
+ break;
+ }
+
+ if( NULL == modTypeEntry )
+ {
+ TRACFCOMP( g_trac_spd,
+ ERR_MRK"Keyword Entry pointer is NULL!" );
+
+ /*@
+ * @errortype
+ * @reasoncode SPD_NULL_ENTRY
+ * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE
+ * @moduleid SPD_CHECK_MODULE_SPECIFIC_KEYWORD
+ * @userdata1 i_memType
+ * @userdata2 <UNUSED>
+ * @devdesc Entry to get Module type is NULL
+ */
+ err = new ERRORLOG::ErrlEntry( ERRORLOG::ERRL_SEV_UNRECOVERABLE,
+ SPD_CHECK_MODULE_SPECIFIC_KEYWORD,
+ SPD_NULL_ENTRY,
+ i_memType,
+ 0x0 );
+
+ break;
+ }
+
+ // To check the module specific flags, also need the Module Type
+ // value.
uint8_t modType = 0x0;
- err = spdFetchData( MEM_TYPE_ADDR,
- MEM_TYPE_ADDR_SZ,
+ err = spdFetchData( modTypeEntry->offset,
+ modTypeEntry->length,
&modType,
i_target );
diff --git a/src/usr/spd/spdDDR3.H b/src/usr/spd/spdDDR3.H
index 35f17846e..1112a1c79 100755
--- a/src/usr/spd/spdDDR3.H
+++ b/src/usr/spd/spdDDR3.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/spd/spdDDR3.H $
-//
-// 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
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/spd/spdDDR3.H $
+ *
+ * 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
+ */
#ifndef __SPDDDR3_H
#define __SPDDDR3_H
@@ -121,6 +122,8 @@ KeywordData ddr3Data[] =
{ SDRAM_OPTIONAL_FEATURES, 0x1e, 0x01, false, 0x00, 0x00, false, false, NA },
{ SDRAM_THERMAL_REFRESH_OPTIONS, 0x1f, 0x01, false, 0x00, 0x00, false, false, NA },
{ DIMM_BAD_DQ_DATA, 0xb0, 0x50, false, 0x00, 0x00, false, true, NA },
+ { SDRAM_DIE_COUNT, 0x21, 0x01, true, 0x70, 0x04, false, false, NA },
+ { SDRAM_DEVICE_TYPE_SIGNAL_LOADING,0x21, 0x01, true, 0x03, 0x00, false, false, NA },
{ MODSPEC_COM_NOM_HEIGHT_MAX, 0x3c, 0x01, true, 0x0f, 0x00, false, false, ALL },
{ MODSPEC_COM_MAX_THICK_BACK, 0x3d, 0x01, true, 0xf0, 0x04, false, false, ALL },
{ MODSPEC_COM_MAX_THICK_FRONT, 0x3d, 0x01, true, 0x0f, 0x00, false, false, ALL },
@@ -252,7 +255,7 @@ KeywordData ddr3Data[] =
{ LRMM_PERSONALITY_BYTE12, 0x72, 0x01, false, 0x00, 0x00, false, false, LRMM },
{ LRMM_PERSONALITY_BYTE13, 0x73, 0x01, false, 0x00, 0x00, false, false, LRMM },
{ LRMM_PERSONALITY_BYTE14, 0x74, 0x01, false, 0x00, 0x00, false, false, LRMM },
- // ---------------------------------------------------------------------------------------
+ //---------------------------------------------------------------------------------------
};
diff --git a/src/usr/spd/test/spdtest.H b/src/usr/spd/test/spdtest.H
index 94b6df38b..a437900a5 100755
--- a/src/usr/spd/test/spdtest.H
+++ b/src/usr/spd/test/spdtest.H
@@ -647,7 +647,7 @@ class SPDTest: public CxxTest::TestSuite
if( err )
{
fails++;
- TS_FAIL( "testspdDDR3ModSpecKwds - Failure on keywor"
+ TS_FAIL( "testspdDDR3ModSpecKwds - Failure on keyword"
"d: %04x",
keyword );
errlCommit( err,
OpenPOWER on IntegriCloud