summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2014-05-19 20:31:14 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-05-29 11:15:18 -0500
commit6681d384d729d448ef2b864a1f28d8982ad8f3cc (patch)
tree62906fc34533bd51be7e1d3b67063b4badaa08f0 /src/usr
parent6750245027d53c6ba0b671f522e26971dc142653 (diff)
downloadtalos-hostboot-6681d384d729d448ef2b864a1f28d8982ad8f3cc.tar.gz
talos-hostboot-6681d384d729d448ef2b864a1f28d8982ad8f3cc.zip
Get raw card info
Add fapi attribute to return Module Specific Reference Raw Card and Revision. Revision can be returned directly from the generic fapiPlatGetSpdAttr. Merge Ref Raw Card Extention and Ref Raw Card so caller has a single enumeration. Change-Id: I8cc71ac758d57453b5aaae0daed4df9ff26b6d31 Backport: release-fips811 RTC: 107809 CQ: SW262043 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11171 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/hwpf/hwp/dimm_spd_attributes.xml29
-rw-r--r--src/usr/hwpf/plat/fapiPlatAttributeService.C48
-rwxr-xr-xsrc/usr/vpd/spd.C12
3 files changed, 84 insertions, 5 deletions
diff --git a/src/usr/hwpf/hwp/dimm_spd_attributes.xml b/src/usr/hwpf/hwp/dimm_spd_attributes.xml
index 5f68ccb7d..962f728a7 100644
--- a/src/usr/hwpf/hwp/dimm_spd_attributes.xml
+++ b/src/usr/hwpf/hwp/dimm_spd_attributes.xml
@@ -20,7 +20,7 @@
<!-- permissions and limitations under the License. -->
<!-- -->
<!-- IBM_PROLOG_END_TAG -->
-<!-- $Id: dimm_spd_attributes.xml,v 1.34 2014/01/10 22:52:22 bellows Exp $ -->
+<!-- $Id: dimm_spd_attributes.xml,v 1.35 2014/05/23 16:33:05 whs Exp $ -->
<!-- XML file specifying DIMM SPD attributes used by HW Procedures. -->
<attributes>
@@ -2464,5 +2464,32 @@ Data will be pulled from backplane VPD if IS DIMMs present.</description>
<persistent/>
</attribute>
+<attribute>
+ <id>ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_REV</id>
+ <targetType>TARGET_TYPE_DIMM</targetType>
+ <description>
+ Reference Raw Card Revision
+ Located in DDR3 SPD byte 62 bits 6-5.
+ Located in DDR4 SPD byte 130 bits 6-5.
+ </description>
+ <valueType>uint8</valueType>
+ <platInit/>
+</attribute>
+
+<attribute>
+ <id>ATTR_SPD_MODSPEC_COM_REF_RAW_CARD</id>
+ <targetType>TARGET_TYPE_DIMM</targetType>
+ <description>
+ Reference Raw Card
+ Located in DDR3 SPD byte 62 bit 7 + bits 4-0.
+ Located in DDR4 SPD byte 130 bit 7 + bits 4-0.
+ </description>
+ <valueType>uint8</valueType>
+ <enum>
+ A = 0x00, B = 0x01, C = 0x02, D = 0x03, E = 0x04, F = 0x05, G = 0x06, H = 0x07, J = 0x08, K = 0x09, L = 0x0a, M = 0x0b, N = 0x0c, P = 0x0d, R = 0x0e, T = 0x0f, U = 0x10, V = 0x11, W = 0x12, Y = 0x13, AA = 0x14, AB = 0x15, AC = 0x16, AD = 0x17, AE = 0x18, AF = 0x19, AG = 0x1a, AH = 0x1b, AJ = 0x1c, AK = 0x1d, AL = 0x1e, AM = 0x20, AN = 0x21, AP = 0x22, AR = 0x23, AT = 0x24, AU = 0x25, AV = 0x26, AW = 0x27, AY = 0x28, BA = 0x29, BB = 0x2a, BC = 0x2b, BD = 0x2c, BE = 0x2d, BF = 0x2e, BG = 0x2f, BH = 0x30, BJ = 0x31, BK = 0x32, BL = 0x33, BM = 0x34, BN = 0x35, BP = 0x36, BR = 0x37, BT = 0x38, BU = 0x39, BV = 0x3a, BW = 0x3b, BY = 0x3c, CA = 0x3d, CB = 0x3e, ZZ = 0x3f
+ </enum>
+ <platInit/>
+</attribute>
+
</attributes>
diff --git a/src/usr/hwpf/plat/fapiPlatAttributeService.C b/src/usr/hwpf/plat/fapiPlatAttributeService.C
index 2a0802ad2..ac58d87b4 100644
--- a/src/usr/hwpf/plat/fapiPlatAttributeService.C
+++ b/src/usr/hwpf/plat/fapiPlatAttributeService.C
@@ -1506,6 +1506,54 @@ fapi::ReturnCode fapiPlatGetPciOscswitchConfig
return l_rc;
}
+//-----------------------------------------------------------------------------
+fapi::ReturnCode fapiPlatGetSpdModspecComRefRawCard
+ (const fapi::Target * i_pDimmTarget,
+ uint8_t &o_val)
+{
+ fapi::ReturnCode l_rc;
+ uint8_t l_cardExt = 0;
+ uint8_t l_card = 0;
+
+ do {
+
+ // Get the Reference Raw Card Extention (0 or 1)
+ l_rc = fapiPlatGetSpdAttr(i_pDimmTarget,
+ SPD::MODSPEC_COM_REF_RAW_CARD_EXT,
+ &l_cardExt, sizeof(l_cardExt));
+ if (l_rc)
+ {
+ break; //break with error
+ }
+
+ // Get the Refernce Raw Card (bits 4-0)
+ // When Reference Raw Card Extension = 0
+ // Reference raw cards A through AL
+ // When Reference Raw Card Extension = 1
+ // Reference raw cards AM through CB
+ l_rc = fapiPlatGetSpdAttr(i_pDimmTarget, SPD::MODSPEC_COM_REF_RAW_CARD,
+ &l_card, sizeof(l_card));
+ if (l_rc)
+ {
+ break; //break with error
+ }
+
+ // Raw Card = 0x1f(ZZ) means no JEDEC reference raw card design used.
+ // Have one ZZ in the return merged enumeration.
+ if (0x1f == l_card)
+ {
+ l_cardExt = 1; //Just one ZZ in the enumeration (0x3f)
+ }
+
+ // Merge into a single enumeration
+ o_val = (l_cardExt <<5) | l_card;
+
+ } while (0);
+
+ return l_rc;
+}
+
+
} // End platAttrSvc namespace
} // End fapi namespace
diff --git a/src/usr/vpd/spd.C b/src/usr/vpd/spd.C
index 235c07dc2..048f8a42c 100755
--- a/src/usr/vpd/spd.C
+++ b/src/usr/vpd/spd.C
@@ -1367,7 +1367,8 @@ errlHndl_t checkModSpecificKeyword ( KeywordData i_kwdData,
// Check Unbuffered Memory Module (UMM)
if (UMM == modType)
{
- if (UMM != i_kwdData.modSpec)
+ if ((UMM != i_kwdData.modSpec) &&
+ (ALL != i_kwdData.modSpec) )
{
TRACFCOMP( g_trac_spd,
ERR_MRK"Keyword (0x%04x) is not valid with UMM modules!",
@@ -1409,7 +1410,8 @@ errlHndl_t checkModSpecificKeyword ( KeywordData i_kwdData,
// Check Registered Memory Module (RMM)
else if (RMM == modType)
{
- if (RMM != i_kwdData.modSpec)
+ if ((RMM != i_kwdData.modSpec) &&
+ (ALL != i_kwdData.modSpec) )
{
TRACFCOMP( g_trac_spd,
ERR_MRK"Keyword (0x%04x) is not valid with RMM modules!",
@@ -1451,7 +1453,8 @@ errlHndl_t checkModSpecificKeyword ( KeywordData i_kwdData,
// Check Clocked Memory Module (CMM)
else if (CMM == modType)
{
- if (CMM != i_kwdData.modSpec)
+ if ((CMM != i_kwdData.modSpec) &&
+ (ALL != i_kwdData.modSpec) )
{
TRACFCOMP( g_trac_spd,
ERR_MRK"Keyword (0x%04x) is not valid with CMM modules!",
@@ -1493,7 +1496,8 @@ errlHndl_t checkModSpecificKeyword ( KeywordData i_kwdData,
// Check Load Reduction Memory Module (LRMM)
else if (LRMM == modType)
{
- if (LRMM != i_kwdData.modSpec)
+ if ((LRMM != i_kwdData.modSpec) &&
+ (ALL != i_kwdData.modSpec) )
{
TRACFCOMP( g_trac_spd,
ERR_MRK"Keyword (0x%04x) is not valid with LRMM modules!",
OpenPOWER on IntegriCloud