diff options
-rw-r--r-- | src/include/usr/hwpf/plat/fapiPlatAttributeService.H | 25 | ||||
-rw-r--r-- | src/usr/hwpf/hwp/dimm_spd_attributes.xml | 29 | ||||
-rw-r--r-- | src/usr/hwpf/plat/fapiPlatAttributeService.C | 48 | ||||
-rwxr-xr-x | src/usr/vpd/spd.C | 12 |
4 files changed, 109 insertions, 5 deletions
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H index 99fb7366f..31ecaccdc 100644 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H @@ -688,6 +688,18 @@ fapi::ReturnCode fapiPlatGetL3Length(const fapi::Target * i_pProcTarget, fapi::ReturnCode fapiPlatGetPciOscswitchConfig (const fapi::Target * i_pProcTarget, uint8_t &o_val); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting the + * ATTR_SPD_MODSPEC_COM_REF_RAW_CARD attribute. + * It should not be called directly. + * + * @param[in] i_pDimmTarget Dimm Target pointer + * @param[out] o_data Reference to output data + */ +fapi::ReturnCode fapiPlatGetSpdModspecComRefRawCard + (const fapi::Target * i_pDimmTarget, + uint8_t &o_val); + } // namespace platAttrSvc @@ -1762,4 +1774,17 @@ fapi::ReturnCode fapiPlatGetPciOscswitchConfig fapi::FAPI_RC_SUCCESS : \ fapi::platAttrSvc::fapiPlatGetPciOscswitchConfig(PTARGET, VAL) +//------------------------------------------------------------------------------ +// MACRO to support Modspec raw card info +//------------------------------------------------------------------------------ +#define ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_REV_GETMACRO(ID, PTARGET, VAL) \ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : \ + fapi::platAttrSvc::fapiPlatGetSpdAttr \ + (PTARGET, SPD::MODSPEC_COM_REF_RAW_CARD_REV, &(VAL), sizeof(VAL) ) +#define ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_GETMACRO(ID, PTARGET, VAL) \ + fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\ + fapi::FAPI_RC_SUCCESS : \ + fapi::platAttrSvc::fapiPlatGetSpdModspecComRefRawCard(PTARGET, VAL) + #endif // FAPIPLATATTRIBUTESERVICE_H_ 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!", |